diff --git a/cr/docs/cr.robotin.maxref.xml b/cr/docs/cr.robotin.maxref.xml new file mode 100755 index 0000000000000000000000000000000000000000..f113d57d976c8d06455109dbf0e695b450e941fe --- /dev/null +++ b/cr/docs/cr.robotin.maxref.xml @@ -0,0 +1,98 @@ + + + + + + + + Robotics Operating System (ROS) Turtlebot3 Burger Inputs (Reader). + + + + + Receives ROS messages (Velocity, Odometry, Laser Scan, IMU, Sensors State, Joints State, Transformation) from Turtlebot3 Robot via ROS Messages. + + + + + Creative Robotics Lab + CR + ROS + Robotics + Turtlebot3 + + + + + + Messages: Open, Close + + + + + + + Input data from the TurtleBot3 robot + Further description in http://emanual.robotis.com/docs/en/platform/turtlebot3/overview/ + + + + + + + Enter the robot IP. + + + + + + + Velocities (linear, angular) data + The linear/translational speed (x,y,z in m/s) and angular/rotational speed (x,y,z in rad/s) of the robot. Full details: http://docs.ros.org/api/geometry_msgs/html/msg/Twist.html + + + Odometry data + The Turtlebot3’s odometry information based on the encoder and IMU. Odometry is the use of data from motion sensors to estimate change in position over time. It estimates the robot position relative to a starting location. It measures how many times the wheels have rotated, and by multiplying with the circumference of its wheels, computes the distance. Data include position (x,y,z), orientation (x,y,z,w), linear speed (x,y,z), and angular speed (x,y,z). Full details: http://docs.ros.org/kinetic/api/nav_msgs/html/msg/Odometry.html + + + Laser Scan data + The scan values of the LiDAR mounted on top of the Turtlebot3. The Laser Distance Sensor LDS-01 is a 2D laser scanner capable of sensing 360 degrees that collects a set of data around the robot to use for SLAM (Simultaneous Localization and Mapping) and Navigation. Detection distance: 12 cm ~ 350 cm. Sampling Rate: 1.8kHz. Full details: http://docs.ros.org/api/sensor_msgs/html/msg/LaserScan.html + + + Inertial Measurement Unit (IMU) data + Inertial measurement unit (IMU) is a combination of Accelerometers, Gyroscopes, and Magnetometer. Estimate the robot's orientation (x,y,z,w), angular/rotational velocity (x,y,z) in rad/sec, and linear acceleration (x,y,z) in m/s^2. Full details: http://docs.ros.org/api/sensor_msgs/html/msg/Imu.html + + + Sensors State data + Turtlebot3 Sensors state: button status, voltage level, encoder values. Full details: https://github.com/ROBOTIS-GIT/turtlebot3_msgs/blob/master/msg/SensorState.msg + + + Joints State data + The state of a set of torque controlled joints (left wheel/right wheel). Full details: http://docs.ros.org/api/sensor_msgs/html/msg/JointState.html + + + Transformation data + The transform from base_link to imu_link. It defines where the IMU sensor is mounted relative to the robot's chassis so that the sensor readings can be correctly transformed into the robot's frame of reference. This transform should be static; the IMU frame moves and rotates together with the robot frame, so relative position of IMU frame does not change. Data include translation (x,y,z) and rotation (x,y,z,w). Full details: http://docs.ros.org/api/tf/html/msg/tfMessage.html + + + + + + + + Open a connection to the robot + + + + + Close the connection to the robot + + + + + + + + + + \ No newline at end of file diff --git a/cr/docs/cr.robotout.maxref.xml b/cr/docs/cr.robotout.maxref.xml new file mode 100755 index 0000000000000000000000000000000000000000..87388d34f59b72099369fb5933e02b482d07cdfd --- /dev/null +++ b/cr/docs/cr.robotout.maxref.xml @@ -0,0 +1,78 @@ + + + + + + + + Robotics Operating System (ROS) Turtlebot3 Burger Outputs (Writer). + + + + + Send Velocities (Linear, Angular) to Turtlebot3 Robot via ROS Messages. + + + + + Creative Robotics Lab + CR + ROS + Robotics + Turtlebot3 + + + + + + Messages: Open, Close, Break, Bang + + + Send data to robot, as specified in Turtlebot3: http://docs.ros.org/api/geometry_msgs/html/msg/Twist.html + Control the linear/translational speed (x,y,z in m/s) and angular/rotational speed (x,y,z in rad/s) of the robot. Further description in http://emanual.robotis.com/docs/en/platform/turtlebot3/overview/ + + + + + + + + + + Enter the robot IP. + + + + + + + + + + + Open a connection to the robot + + + + + Close the connection to the robot + + + + + Send the velocities message to the robot + + + + + Send a break (zero velocities) message to the robot + + + + + + + + + + \ No newline at end of file diff --git a/cr/externals/cr.boardout.mxo/Contents/MacOS/cr.boardout b/cr/externals/cr.boardout.mxo/Contents/MacOS/cr.boardout index 5da69fd119e16238214af16f754656c60f1cb67a..9bf140bc4a7d74aad6840a3d936720966de55fce 100755 Binary files a/cr/externals/cr.boardout.mxo/Contents/MacOS/cr.boardout and b/cr/externals/cr.boardout.mxo/Contents/MacOS/cr.boardout differ diff --git a/cr/externals/cr.robotin.mxo/Contents/Info.plist b/cr/externals/cr.robotin.mxo/Contents/Info.plist new file mode 100644 index 0000000000000000000000000000000000000000..bfdb212aafdb15203c52fbeb98aec35f6cebd947 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Info.plist @@ -0,0 +1,44 @@ + + + + + BuildMachineOSBuild + 16G1314 + CFBundleDevelopmentRegion + English + CFBundleExecutable + cr.robotin + CFBundleInfoDictionaryVersion + 7.0.1 + CFBundleLongVersionString + cr.robotin 7.0.1, Copyright 2014 Cycling '74 + CFBundlePackageType + iLaX + CFBundleShortVersionString + 7.0.1 + CFBundleSignature + max2 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 7.0.1 + CSResourcesFileMapped + + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 8E3004b + DTPlatformVersion + GM + DTSDKBuild + 16E185 + DTSDKName + macosx10.12 + DTXcode + 0833 + DTXcodeBuild + 8E3004b + + diff --git a/cr/externals/cr.robotin.mxo/Contents/MacOS/cr.robotin b/cr/externals/cr.robotin.mxo/Contents/MacOS/cr.robotin new file mode 100755 index 0000000000000000000000000000000000000000..d083a3c8fa2c032dea789c639aa666afcfefcb0f Binary files /dev/null and b/cr/externals/cr.robotin.mxo/Contents/MacOS/cr.robotin differ diff --git a/cr/externals/cr.robotin.mxo/Contents/PkgInfo b/cr/externals/cr.robotin.mxo/Contents/PkgInfo new file mode 100644 index 0000000000000000000000000000000000000000..0febb6eb9eebdfa768ac5563c31e92629c7a71ab --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/PkgInfo @@ -0,0 +1 @@ +iLaXmax2 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestAction.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestAction.h new file mode 100644 index 0000000000000000000000000000000000000000..4a6042d1e2e4b8b518e721535c64b629753a2c2f --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestAction_h +#define _ROS_actionlib_TestAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "actionlib/TestActionGoal.h" +#include "actionlib/TestActionResult.h" +#include "actionlib/TestActionFeedback.h" + +namespace actionlib +{ + + class TestAction : public ros::Msg + { + public: + typedef actionlib::TestActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef actionlib::TestActionResult _action_result_type; + _action_result_type action_result; + typedef actionlib::TestActionFeedback _action_feedback_type; + _action_feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestActionFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..aab52afa6b766d5a1914bb0b809cb19c9407c886 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestActionFeedback_h +#define _ROS_actionlib_TestActionFeedback_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib::TestFeedback _feedback_type; + _feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestActionGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..6cb740255cd2206e07a30b30ddee71bfbf944194 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestActionGoal_h +#define _ROS_actionlib_TestActionGoal_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef actionlib::TestGoal _goal_type; + _goal_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestActionResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..d534d0ac6bb7be28dee15ece12e847a9a893f927 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestActionResult_h +#define _ROS_actionlib_TestActionResult_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib::TestResult _result_type; + _result_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..83798cfd667f0d183001a120b00901b3996a65ea --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestFeedback.h @@ -0,0 +1,62 @@ +#ifndef _ROS_actionlib_TestFeedback_h +#define _ROS_actionlib_TestFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib +{ + + class TestFeedback : public ros::Msg + { + public: + typedef int32_t _feedback_type; + _feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..40d3a99bf09012210685fe356ec31479881aa6ff --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestGoal.h @@ -0,0 +1,62 @@ +#ifndef _ROS_actionlib_TestGoal_h +#define _ROS_actionlib_TestGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib +{ + + class TestGoal : public ros::Msg + { + public: + typedef int32_t _goal_type; + _goal_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestRequestAction.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestRequestAction.h new file mode 100644 index 0000000000000000000000000000000000000000..52a2fe9c76042a9a7b95466c4460e64497ecc5f8 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestRequestAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestRequestAction_h +#define _ROS_actionlib_TestRequestAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "actionlib/TestRequestActionGoal.h" +#include "actionlib/TestRequestActionResult.h" +#include "actionlib/TestRequestActionFeedback.h" + +namespace actionlib +{ + + class TestRequestAction : public ros::Msg + { + public: + typedef actionlib::TestRequestActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef actionlib::TestRequestActionResult _action_result_type; + _action_result_type action_result; + typedef actionlib::TestRequestActionFeedback _action_feedback_type; + _action_feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestRequestActionFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestRequestActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..0d585c0c2eb66a90ad6554e48a0c1fb0e9f2b2da --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestRequestActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestRequestActionFeedback_h +#define _ROS_actionlib_TestRequestActionFeedback_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib::TestRequestFeedback _feedback_type; + _feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestRequestActionGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestRequestActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..24c6c4873c56feaf9f12641443e95dd557416e3a --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestRequestActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestRequestActionGoal_h +#define _ROS_actionlib_TestRequestActionGoal_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef actionlib::TestRequestGoal _goal_type; + _goal_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestRequestActionResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestRequestActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..a71e715af33a32f9f133d83aed12f3a8c079cbaf --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestRequestActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestRequestActionResult_h +#define _ROS_actionlib_TestRequestActionResult_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib::TestRequestResult _result_type; + _result_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestRequestFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestRequestFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..f1fc24796db62f1505a4b34ad733ce8530261ae1 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestRequestFeedback.h @@ -0,0 +1,38 @@ +#ifndef _ROS_actionlib_TestRequestFeedback_h +#define _ROS_actionlib_TestRequestFeedback_h + +#include +#include +#include +#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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestRequestGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestRequestGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..321ebd31dd50a51d5535d4768d089fd2b9cdf85a --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestRequestGoal.h @@ -0,0 +1,215 @@ +#ifndef _ROS_actionlib_TestRequestGoal_h +#define _ROS_actionlib_TestRequestGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/duration.h" + +namespace actionlib +{ + + class TestRequestGoal : public ros::Msg + { + public: + typedef int32_t _terminate_status_type; + _terminate_status_type terminate_status; + typedef bool _ignore_cancel_type; + _ignore_cancel_type ignore_cancel; + typedef const char* _result_text_type; + _result_text_type result_text; + typedef int32_t _the_result_type; + _the_result_type the_result; + typedef bool _is_simple_client_type; + _is_simple_client_type is_simple_client; + typedef ros::Duration _delay_accept_type; + _delay_accept_type delay_accept; + typedef ros::Duration _delay_terminate_type; + _delay_terminate_type delay_terminate; + typedef ros::Duration _pause_status_type; + _pause_status_type 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); + varToArr(outbuffer + offset, length_result_text); + 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; + arrToVar(length_result_text, (inbuffer + offset)); + 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestRequestResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestRequestResult.h new file mode 100644 index 0000000000000000000000000000000000000000..97887253a38fb9a4fd34781b69ec9d86371ccd4e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestRequestResult.h @@ -0,0 +1,80 @@ +#ifndef _ROS_actionlib_TestRequestResult_h +#define _ROS_actionlib_TestRequestResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib +{ + + class TestRequestResult : public ros::Msg + { + public: + typedef int32_t _the_result_type; + _the_result_type the_result; + typedef bool _is_simple_server_type; + _is_simple_server_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestResult.h new file mode 100644 index 0000000000000000000000000000000000000000..5c9718c93420a89c67c4593345a4b42a3092fb4e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TestResult.h @@ -0,0 +1,62 @@ +#ifndef _ROS_actionlib_TestResult_h +#define _ROS_actionlib_TestResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib +{ + + class TestResult : public ros::Msg + { + public: + typedef int32_t _result_type; + _result_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsAction.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsAction.h new file mode 100644 index 0000000000000000000000000000000000000000..30c73cc9e1baa5f049f2ddfed062d85b08b87199 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TwoIntsAction_h +#define _ROS_actionlib_TwoIntsAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "actionlib/TwoIntsActionGoal.h" +#include "actionlib/TwoIntsActionResult.h" +#include "actionlib/TwoIntsActionFeedback.h" + +namespace actionlib +{ + + class TwoIntsAction : public ros::Msg + { + public: + typedef actionlib::TwoIntsActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef actionlib::TwoIntsActionResult _action_result_type; + _action_result_type action_result; + typedef actionlib::TwoIntsActionFeedback _action_feedback_type; + _action_feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsActionFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..8cd4862fa04dc2fc63c5de31f90f8d2bb315f3bf --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TwoIntsActionFeedback_h +#define _ROS_actionlib_TwoIntsActionFeedback_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib::TwoIntsFeedback _feedback_type; + _feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsActionGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..7d33c178e992bd70886c1c55113a98a3c7c9fe36 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TwoIntsActionGoal_h +#define _ROS_actionlib_TwoIntsActionGoal_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef actionlib::TwoIntsGoal _goal_type; + _goal_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsActionResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..e36c808fe5c1825e51eddc0e1eb51f4b6bce6e21 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TwoIntsActionResult_h +#define _ROS_actionlib_TwoIntsActionResult_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib::TwoIntsResult _result_type; + _result_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..3789c4dcd8515d892575dfd08c4a1775a3f0a8de --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsFeedback.h @@ -0,0 +1,38 @@ +#ifndef _ROS_actionlib_TwoIntsFeedback_h +#define _ROS_actionlib_TwoIntsFeedback_h + +#include +#include +#include +#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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..088c6ec3e44b437a116275e0ab4f83b0bef06c07 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsGoal.h @@ -0,0 +1,102 @@ +#ifndef _ROS_actionlib_TwoIntsGoal_h +#define _ROS_actionlib_TwoIntsGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib +{ + + class TwoIntsGoal : public ros::Msg + { + public: + typedef int64_t _a_type; + _a_type a; + typedef int64_t _b_type; + _b_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsResult.h new file mode 100644 index 0000000000000000000000000000000000000000..51d3cce117fbfdda46ca849c54c076f2c1ccd9ba --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsResult.h @@ -0,0 +1,70 @@ +#ifndef _ROS_actionlib_TwoIntsResult_h +#define _ROS_actionlib_TwoIntsResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib +{ + + class TwoIntsResult : public ros::Msg + { + public: + typedef int64_t _sum_type; + _sum_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_msgs/GoalID.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_msgs/GoalID.h new file mode 100644 index 0000000000000000000000000000000000000000..24391a3e87bff4310514346601667becd9c0000e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_msgs/GoalID.h @@ -0,0 +1,79 @@ +#ifndef _ROS_actionlib_msgs_GoalID_h +#define _ROS_actionlib_msgs_GoalID_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" + +namespace actionlib_msgs +{ + + class GoalID : public ros::Msg + { + public: + typedef ros::Time _stamp_type; + _stamp_type stamp; + typedef const char* _id_type; + _id_type id; + + GoalID(): + stamp(), + id("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->stamp.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp.sec); + *(outbuffer + offset + 0) = (this->stamp.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp.nsec); + uint32_t length_id = strlen(this->id); + varToArr(outbuffer + offset, length_id); + offset += 4; + memcpy(outbuffer + offset, this->id, length_id); + offset += length_id; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->stamp.sec = ((uint32_t) (*(inbuffer + offset))); + this->stamp.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp.sec); + this->stamp.nsec = ((uint32_t) (*(inbuffer + offset))); + this->stamp.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp.nsec); + uint32_t length_id; + arrToVar(length_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_id-1]=0; + this->id = (char *)(inbuffer + offset-1); + offset += length_id; + return offset; + } + + const char * getType(){ return "actionlib_msgs/GoalID"; }; + const char * getMD5(){ return "302881f31927c1df708a2dbab0e80ee8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_msgs/GoalStatus.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_msgs/GoalStatus.h new file mode 100644 index 0000000000000000000000000000000000000000..349524c3a935d8ff0570d407373c3e7ccca353d7 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_msgs/GoalStatus.h @@ -0,0 +1,78 @@ +#ifndef _ROS_actionlib_msgs_GoalStatus_h +#define _ROS_actionlib_msgs_GoalStatus_h + +#include +#include +#include +#include "ros/msg.h" +#include "actionlib_msgs/GoalID.h" + +namespace actionlib_msgs +{ + + class GoalStatus : public ros::Msg + { + public: + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef uint8_t _status_type; + _status_type status; + typedef const char* _text_type; + _text_type text; + enum { PENDING = 0 }; + enum { ACTIVE = 1 }; + enum { PREEMPTED = 2 }; + enum { SUCCEEDED = 3 }; + enum { ABORTED = 4 }; + enum { REJECTED = 5 }; + enum { PREEMPTING = 6 }; + enum { RECALLING = 7 }; + enum { RECALLED = 8 }; + enum { LOST = 9 }; + + GoalStatus(): + goal_id(), + status(0), + text("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->goal_id.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->status >> (8 * 0)) & 0xFF; + offset += sizeof(this->status); + uint32_t length_text = strlen(this->text); + varToArr(outbuffer + offset, length_text); + offset += 4; + memcpy(outbuffer + offset, this->text, length_text); + offset += length_text; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->goal_id.deserialize(inbuffer + offset); + this->status = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->status); + uint32_t length_text; + arrToVar(length_text, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_text; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_text-1]=0; + this->text = (char *)(inbuffer + offset-1); + offset += length_text; + return offset; + } + + const char * getType(){ return "actionlib_msgs/GoalStatus"; }; + const char * getMD5(){ return "d388f9b87b3c471f784434d671988d4a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_msgs/GoalStatusArray.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_msgs/GoalStatusArray.h new file mode 100644 index 0000000000000000000000000000000000000000..9e39b5f845a39019cd8fd58bf4ba49cd97a45854 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_msgs/GoalStatusArray.h @@ -0,0 +1,70 @@ +#ifndef _ROS_actionlib_msgs_GoalStatusArray_h +#define _ROS_actionlib_msgs_GoalStatusArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" + +namespace actionlib_msgs +{ + + class GoalStatusArray : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t status_list_length; + typedef actionlib_msgs::GoalStatus _status_list_type; + _status_list_type st_status_list; + _status_list_type * status_list; + + GoalStatusArray(): + header(), + status_list_length(0), status_list(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->status_list_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->status_list_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->status_list_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->status_list_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->status_list_length); + for( uint32_t i = 0; i < status_list_length; i++){ + offset += this->status_list[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t status_list_lengthT = ((uint32_t) (*(inbuffer + offset))); + status_list_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + status_list_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + status_list_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->status_list_length); + if(status_list_lengthT > status_list_length) + this->status_list = (actionlib_msgs::GoalStatus*)realloc(this->status_list, status_list_lengthT * sizeof(actionlib_msgs::GoalStatus)); + status_list_length = status_list_lengthT; + for( uint32_t i = 0; i < status_list_length; i++){ + offset += this->st_status_list.deserialize(inbuffer + offset); + memcpy( &(this->status_list[i]), &(this->st_status_list), sizeof(actionlib_msgs::GoalStatus)); + } + return offset; + } + + const char * getType(){ return "actionlib_msgs/GoalStatusArray"; }; + const char * getMD5(){ return "8b2b82f13216d0a8ea88bd3af735e619"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingAction.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingAction.h new file mode 100644 index 0000000000000000000000000000000000000000..16eef59a9284fadd87a7b404b93b4a3e7e0fca40 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_AveragingAction_h +#define _ROS_actionlib_tutorials_AveragingAction_h + +#include +#include +#include +#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: + typedef actionlib_tutorials::AveragingActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef actionlib_tutorials::AveragingActionResult _action_result_type; + _action_result_type action_result; + typedef actionlib_tutorials::AveragingActionFeedback _action_feedback_type; + _action_feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingActionFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..e269f39d2baac0f75e40a45550f8859e219cdc87 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_AveragingActionFeedback_h +#define _ROS_actionlib_tutorials_AveragingActionFeedback_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib_tutorials::AveragingFeedback _feedback_type; + _feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingActionGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..e9f718ff814ab411a806e8e599be705f838d350d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_AveragingActionGoal_h +#define _ROS_actionlib_tutorials_AveragingActionGoal_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef actionlib_tutorials::AveragingGoal _goal_type; + _goal_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingActionResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..db99e51744122f79d4fcff69945c38235e51343c --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_AveragingActionResult_h +#define _ROS_actionlib_tutorials_AveragingActionResult_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib_tutorials::AveragingResult _result_type; + _result_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..e71ad1f0682e9e8f92c1beed7203fba59d0a2181 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingFeedback.h @@ -0,0 +1,134 @@ +#ifndef _ROS_actionlib_tutorials_AveragingFeedback_h +#define _ROS_actionlib_tutorials_AveragingFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib_tutorials +{ + + class AveragingFeedback : public ros::Msg + { + public: + typedef int32_t _sample_type; + _sample_type sample; + typedef float _data_type; + _data_type data; + typedef float _mean_type; + _mean_type mean; + typedef float _std_dev_type; + _std_dev_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..e1cc2ad30300c9c3ef71097facf35a02b4db9a4d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingGoal.h @@ -0,0 +1,62 @@ +#ifndef _ROS_actionlib_tutorials_AveragingGoal_h +#define _ROS_actionlib_tutorials_AveragingGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib_tutorials +{ + + class AveragingGoal : public ros::Msg + { + public: + typedef int32_t _samples_type; + _samples_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingResult.h new file mode 100644 index 0000000000000000000000000000000000000000..e476e594205cedf0daecf247281b218ffb11c648 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingResult.h @@ -0,0 +1,86 @@ +#ifndef _ROS_actionlib_tutorials_AveragingResult_h +#define _ROS_actionlib_tutorials_AveragingResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib_tutorials +{ + + class AveragingResult : public ros::Msg + { + public: + typedef float _mean_type; + _mean_type mean; + typedef float _std_dev_type; + _std_dev_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciAction.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciAction.h new file mode 100644 index 0000000000000000000000000000000000000000..2fd1c636d52a49896640f93f2b3c6afe25ec6244 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_FibonacciAction_h +#define _ROS_actionlib_tutorials_FibonacciAction_h + +#include +#include +#include +#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: + typedef actionlib_tutorials::FibonacciActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef actionlib_tutorials::FibonacciActionResult _action_result_type; + _action_result_type action_result; + typedef actionlib_tutorials::FibonacciActionFeedback _action_feedback_type; + _action_feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciActionFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..241ebad304c32ead12da8eab99cd600207ab58f9 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_FibonacciActionFeedback_h +#define _ROS_actionlib_tutorials_FibonacciActionFeedback_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib_tutorials::FibonacciFeedback _feedback_type; + _feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciActionGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..dd1361794f2e177c698d7be1ee764aa2f2c5f4b9 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_FibonacciActionGoal_h +#define _ROS_actionlib_tutorials_FibonacciActionGoal_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef actionlib_tutorials::FibonacciGoal _goal_type; + _goal_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciActionResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..35c9d48c53e61ab072dab9f9c3a453d4a2e73bdf --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_FibonacciActionResult_h +#define _ROS_actionlib_tutorials_FibonacciActionResult_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib_tutorials::FibonacciResult _result_type; + _result_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..87eaf8fa71158f56d1e0aef1fd2792033c708e85 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciFeedback.h @@ -0,0 +1,82 @@ +#ifndef _ROS_actionlib_tutorials_FibonacciFeedback_h +#define _ROS_actionlib_tutorials_FibonacciFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib_tutorials +{ + + class FibonacciFeedback : public ros::Msg + { + public: + uint32_t sequence_length; + typedef int32_t _sequence_type; + _sequence_type st_sequence; + _sequence_type * sequence; + + FibonacciFeedback(): + sequence_length(0), sequence(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->sequence_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->sequence_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->sequence_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->sequence_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->sequence_length); + for( uint32_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; + uint32_t sequence_lengthT = ((uint32_t) (*(inbuffer + offset))); + sequence_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + sequence_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + sequence_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->sequence_length); + if(sequence_lengthT > sequence_length) + this->sequence = (int32_t*)realloc(this->sequence, sequence_lengthT * sizeof(int32_t)); + sequence_length = sequence_lengthT; + for( uint32_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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..e711de10bf8b534544eecee3a0f1946b9d345a4c --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciGoal.h @@ -0,0 +1,62 @@ +#ifndef _ROS_actionlib_tutorials_FibonacciGoal_h +#define _ROS_actionlib_tutorials_FibonacciGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib_tutorials +{ + + class FibonacciGoal : public ros::Msg + { + public: + typedef int32_t _order_type; + _order_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciResult.h new file mode 100644 index 0000000000000000000000000000000000000000..dc710239d0f034bf6af44caeae9a25d8d45eaaeb --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciResult.h @@ -0,0 +1,82 @@ +#ifndef _ROS_actionlib_tutorials_FibonacciResult_h +#define _ROS_actionlib_tutorials_FibonacciResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib_tutorials +{ + + class FibonacciResult : public ros::Msg + { + public: + uint32_t sequence_length; + typedef int32_t _sequence_type; + _sequence_type st_sequence; + _sequence_type * sequence; + + FibonacciResult(): + sequence_length(0), sequence(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->sequence_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->sequence_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->sequence_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->sequence_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->sequence_length); + for( uint32_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; + uint32_t sequence_lengthT = ((uint32_t) (*(inbuffer + offset))); + sequence_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + sequence_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + sequence_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->sequence_length); + if(sequence_lengthT > sequence_length) + this->sequence = (int32_t*)realloc(this->sequence, sequence_lengthT * sizeof(int32_t)); + sequence_length = sequence_lengthT; + for( uint32_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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/base_local_planner/Position2DInt.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/base_local_planner/Position2DInt.h new file mode 100644 index 0000000000000000000000000000000000000000..79beed25ad6d3686cf7eed2d0455863d05f97b5a --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/base_local_planner/Position2DInt.h @@ -0,0 +1,102 @@ +#ifndef _ROS_base_local_planner_Position2DInt_h +#define _ROS_base_local_planner_Position2DInt_h + +#include +#include +#include +#include "ros/msg.h" + +namespace base_local_planner +{ + + class Position2DInt : public ros::Msg + { + public: + typedef int64_t _x_type; + _x_type x; + typedef int64_t _y_type; + _y_type y; + + Position2DInt(): + x(0), + y(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int64_t real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + int64_t real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int64_t real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + int64_t real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + return offset; + } + + const char * getType(){ return "base_local_planner/Position2DInt"; }; + const char * getMD5(){ return "3b834ede922a0fff22c43585c533b49f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/bond/Constants.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/bond/Constants.h new file mode 100644 index 0000000000000000000000000000000000000000..9594342f62f1b3cda9bc743bcdf04cb6c4a69217 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/bond/Constants.h @@ -0,0 +1,44 @@ +#ifndef _ROS_bond_Constants_h +#define _ROS_bond_Constants_h + +#include +#include +#include +#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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/bond/Status.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/bond/Status.h new file mode 100644 index 0000000000000000000000000000000000000000..b9fa9a5484bb6dffb37e8252605f3c769186689f --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/bond/Status.h @@ -0,0 +1,144 @@ +#ifndef _ROS_bond_Status_h +#define _ROS_bond_Status_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace bond +{ + + class Status : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _id_type; + _id_type id; + typedef const char* _instance_id_type; + _instance_id_type instance_id; + typedef bool _active_type; + _active_type active; + typedef float _heartbeat_timeout_type; + _heartbeat_timeout_type heartbeat_timeout; + typedef float _heartbeat_period_type; + _heartbeat_period_type 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); + varToArr(outbuffer + offset, length_id); + offset += 4; + memcpy(outbuffer + offset, this->id, length_id); + offset += length_id; + uint32_t length_instance_id = strlen(this->instance_id); + varToArr(outbuffer + offset, length_instance_id); + 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; + arrToVar(length_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_id-1]=0; + this->id = (char *)(inbuffer + offset-1); + offset += length_id; + uint32_t length_instance_id; + arrToVar(length_instance_id, (inbuffer + offset)); + 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 \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryAction.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryAction.h new file mode 100644 index 0000000000000000000000000000000000000000..ec67771ad20f89dd11949574e0529a39e35de879 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_FollowJointTrajectoryAction_h +#define _ROS_control_msgs_FollowJointTrajectoryAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "control_msgs/FollowJointTrajectoryActionGoal.h" +#include "control_msgs/FollowJointTrajectoryActionResult.h" +#include "control_msgs/FollowJointTrajectoryActionFeedback.h" + +namespace control_msgs +{ + + class FollowJointTrajectoryAction : public ros::Msg + { + public: + typedef control_msgs::FollowJointTrajectoryActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef control_msgs::FollowJointTrajectoryActionResult _action_result_type; + _action_result_type action_result; + typedef control_msgs::FollowJointTrajectoryActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + FollowJointTrajectoryAction(): + action_goal(), + action_result(), + action_feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->action_goal.serialize(outbuffer + offset); + offset += this->action_result.serialize(outbuffer + offset); + offset += this->action_feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->action_goal.deserialize(inbuffer + offset); + offset += this->action_result.deserialize(inbuffer + offset); + offset += this->action_feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/FollowJointTrajectoryAction"; }; + const char * getMD5(){ return "bc4f9b743838566551c0390c65f1a248"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryActionFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..d5d037a75ff917a6c3ec027e1f1fee8e40174a8e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_FollowJointTrajectoryActionFeedback_h +#define _ROS_control_msgs_FollowJointTrajectoryActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/FollowJointTrajectoryFeedback.h" + +namespace control_msgs +{ + + class FollowJointTrajectoryActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::FollowJointTrajectoryFeedback _feedback_type; + _feedback_type feedback; + + FollowJointTrajectoryActionFeedback(): + header(), + status(), + feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/FollowJointTrajectoryActionFeedback"; }; + const char * getMD5(){ return "d8920dc4eae9fc107e00999cce4be641"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryActionGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..4aa00c6466386c37e775dd0231b6578def6f0a39 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_FollowJointTrajectoryActionGoal_h +#define _ROS_control_msgs_FollowJointTrajectoryActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "control_msgs/FollowJointTrajectoryGoal.h" + +namespace control_msgs +{ + + class FollowJointTrajectoryActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef control_msgs::FollowJointTrajectoryGoal _goal_type; + _goal_type goal; + + FollowJointTrajectoryActionGoal(): + header(), + goal_id(), + goal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->goal_id.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->goal_id.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/FollowJointTrajectoryActionGoal"; }; + const char * getMD5(){ return "cff5c1d533bf2f82dd0138d57f4304bb"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryActionResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..aa6b2b3f9126e21ecb097bc0f2b6381e13e367ac --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_FollowJointTrajectoryActionResult_h +#define _ROS_control_msgs_FollowJointTrajectoryActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/FollowJointTrajectoryResult.h" + +namespace control_msgs +{ + + class FollowJointTrajectoryActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::FollowJointTrajectoryResult _result_type; + _result_type result; + + FollowJointTrajectoryActionResult(): + header(), + status(), + result() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->result.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->result.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/FollowJointTrajectoryActionResult"; }; + const char * getMD5(){ return "c4fb3b000dc9da4fd99699380efcc5d9"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..6f27eccc9615209bea284219616d9d044a3b2f35 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryFeedback.h @@ -0,0 +1,97 @@ +#ifndef _ROS_control_msgs_FollowJointTrajectoryFeedback_h +#define _ROS_control_msgs_FollowJointTrajectoryFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "trajectory_msgs/JointTrajectoryPoint.h" + +namespace control_msgs +{ + + class FollowJointTrajectoryFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t joint_names_length; + typedef char* _joint_names_type; + _joint_names_type st_joint_names; + _joint_names_type * joint_names; + typedef trajectory_msgs::JointTrajectoryPoint _desired_type; + _desired_type desired; + typedef trajectory_msgs::JointTrajectoryPoint _actual_type; + _actual_type actual; + typedef trajectory_msgs::JointTrajectoryPoint _error_type; + _error_type error; + + FollowJointTrajectoryFeedback(): + header(), + joint_names_length(0), joint_names(NULL), + desired(), + actual(), + error() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_names_length); + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_joint_namesi = strlen(this->joint_names[i]); + varToArr(outbuffer + offset, length_joint_namesi); + offset += 4; + memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); + offset += length_joint_namesi; + } + offset += this->desired.serialize(outbuffer + offset); + offset += this->actual.serialize(outbuffer + offset); + offset += this->error.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_names_length); + if(joint_names_lengthT > joint_names_length) + this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); + joint_names_length = joint_names_lengthT; + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_st_joint_names; + arrToVar(length_st_joint_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_joint_names-1]=0; + this->st_joint_names = (char *)(inbuffer + offset-1); + offset += length_st_joint_names; + memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); + } + offset += this->desired.deserialize(inbuffer + offset); + offset += this->actual.deserialize(inbuffer + offset); + offset += this->error.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/FollowJointTrajectoryFeedback"; }; + const char * getMD5(){ return "10817c60c2486ef6b33e97dcd87f4474"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..1185615ab3e4e6aa493fb04046e4180047dad372 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryGoal.h @@ -0,0 +1,119 @@ +#ifndef _ROS_control_msgs_FollowJointTrajectoryGoal_h +#define _ROS_control_msgs_FollowJointTrajectoryGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "trajectory_msgs/JointTrajectory.h" +#include "control_msgs/JointTolerance.h" +#include "ros/duration.h" + +namespace control_msgs +{ + + class FollowJointTrajectoryGoal : public ros::Msg + { + public: + typedef trajectory_msgs::JointTrajectory _trajectory_type; + _trajectory_type trajectory; + uint32_t path_tolerance_length; + typedef control_msgs::JointTolerance _path_tolerance_type; + _path_tolerance_type st_path_tolerance; + _path_tolerance_type * path_tolerance; + uint32_t goal_tolerance_length; + typedef control_msgs::JointTolerance _goal_tolerance_type; + _goal_tolerance_type st_goal_tolerance; + _goal_tolerance_type * goal_tolerance; + typedef ros::Duration _goal_time_tolerance_type; + _goal_time_tolerance_type goal_time_tolerance; + + FollowJointTrajectoryGoal(): + trajectory(), + path_tolerance_length(0), path_tolerance(NULL), + goal_tolerance_length(0), goal_tolerance(NULL), + goal_time_tolerance() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->trajectory.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->path_tolerance_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->path_tolerance_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->path_tolerance_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->path_tolerance_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->path_tolerance_length); + for( uint32_t i = 0; i < path_tolerance_length; i++){ + offset += this->path_tolerance[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->goal_tolerance_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->goal_tolerance_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->goal_tolerance_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->goal_tolerance_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->goal_tolerance_length); + for( uint32_t i = 0; i < goal_tolerance_length; i++){ + offset += this->goal_tolerance[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->goal_time_tolerance.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->goal_time_tolerance.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->goal_time_tolerance.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->goal_time_tolerance.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->goal_time_tolerance.sec); + *(outbuffer + offset + 0) = (this->goal_time_tolerance.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->goal_time_tolerance.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->goal_time_tolerance.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->goal_time_tolerance.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->goal_time_tolerance.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->trajectory.deserialize(inbuffer + offset); + uint32_t path_tolerance_lengthT = ((uint32_t) (*(inbuffer + offset))); + path_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + path_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + path_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->path_tolerance_length); + if(path_tolerance_lengthT > path_tolerance_length) + this->path_tolerance = (control_msgs::JointTolerance*)realloc(this->path_tolerance, path_tolerance_lengthT * sizeof(control_msgs::JointTolerance)); + path_tolerance_length = path_tolerance_lengthT; + for( uint32_t i = 0; i < path_tolerance_length; i++){ + offset += this->st_path_tolerance.deserialize(inbuffer + offset); + memcpy( &(this->path_tolerance[i]), &(this->st_path_tolerance), sizeof(control_msgs::JointTolerance)); + } + uint32_t goal_tolerance_lengthT = ((uint32_t) (*(inbuffer + offset))); + goal_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + goal_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + goal_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->goal_tolerance_length); + if(goal_tolerance_lengthT > goal_tolerance_length) + this->goal_tolerance = (control_msgs::JointTolerance*)realloc(this->goal_tolerance, goal_tolerance_lengthT * sizeof(control_msgs::JointTolerance)); + goal_tolerance_length = goal_tolerance_lengthT; + for( uint32_t i = 0; i < goal_tolerance_length; i++){ + offset += this->st_goal_tolerance.deserialize(inbuffer + offset); + memcpy( &(this->goal_tolerance[i]), &(this->st_goal_tolerance), sizeof(control_msgs::JointTolerance)); + } + this->goal_time_tolerance.sec = ((uint32_t) (*(inbuffer + offset))); + this->goal_time_tolerance.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->goal_time_tolerance.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->goal_time_tolerance.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->goal_time_tolerance.sec); + this->goal_time_tolerance.nsec = ((uint32_t) (*(inbuffer + offset))); + this->goal_time_tolerance.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->goal_time_tolerance.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->goal_time_tolerance.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->goal_time_tolerance.nsec); + return offset; + } + + const char * getType(){ return "control_msgs/FollowJointTrajectoryGoal"; }; + const char * getMD5(){ return "69636787b6ecbde4d61d711979bc7ecb"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryResult.h new file mode 100644 index 0000000000000000000000000000000000000000..819f27265783893ac4844ee7bc36dbaaea7d3299 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryResult.h @@ -0,0 +1,85 @@ +#ifndef _ROS_control_msgs_FollowJointTrajectoryResult_h +#define _ROS_control_msgs_FollowJointTrajectoryResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class FollowJointTrajectoryResult : public ros::Msg + { + public: + typedef int32_t _error_code_type; + _error_code_type error_code; + typedef const char* _error_string_type; + _error_string_type error_string; + enum { SUCCESSFUL = 0 }; + enum { INVALID_GOAL = -1 }; + enum { INVALID_JOINTS = -2 }; + enum { OLD_HEADER_TIMESTAMP = -3 }; + enum { PATH_TOLERANCE_VIOLATED = -4 }; + enum { GOAL_TOLERANCE_VIOLATED = -5 }; + + FollowJointTrajectoryResult(): + error_code(0), + error_string("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int32_t real; + uint32_t base; + } u_error_code; + u_error_code.real = this->error_code; + *(outbuffer + offset + 0) = (u_error_code.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_error_code.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_error_code.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_error_code.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->error_code); + uint32_t length_error_string = strlen(this->error_string); + varToArr(outbuffer + offset, length_error_string); + offset += 4; + memcpy(outbuffer + offset, this->error_string, length_error_string); + offset += length_error_string; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int32_t real; + uint32_t base; + } u_error_code; + u_error_code.base = 0; + u_error_code.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_error_code.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_error_code.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_error_code.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->error_code = u_error_code.real; + offset += sizeof(this->error_code); + uint32_t length_error_string; + arrToVar(length_error_string, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_error_string; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_error_string-1]=0; + this->error_string = (char *)(inbuffer + offset-1); + offset += length_error_string; + return offset; + } + + const char * getType(){ return "control_msgs/FollowJointTrajectoryResult"; }; + const char * getMD5(){ return "493383b18409bfb604b4e26c676401d2"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommand.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommand.h new file mode 100644 index 0000000000000000000000000000000000000000..0b37e5c4f007962922ffff9cdc2c1fcad4c2d9ad --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommand.h @@ -0,0 +1,102 @@ +#ifndef _ROS_control_msgs_GripperCommand_h +#define _ROS_control_msgs_GripperCommand_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class GripperCommand : public ros::Msg + { + public: + typedef double _position_type; + _position_type position; + typedef double _max_effort_type; + _max_effort_type max_effort; + + GripperCommand(): + position(0), + max_effort(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_position; + u_position.real = this->position; + *(outbuffer + offset + 0) = (u_position.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_position.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_position.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_position.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_position.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_position.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_position.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_position.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_max_effort; + u_max_effort.real = this->max_effort; + *(outbuffer + offset + 0) = (u_max_effort.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_effort.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_effort.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_effort.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max_effort.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max_effort.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max_effort.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max_effort.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max_effort); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_position; + u_position.base = 0; + u_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->position = u_position.real; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_max_effort; + u_max_effort.base = 0; + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max_effort = u_max_effort.real; + offset += sizeof(this->max_effort); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommand"; }; + const char * getMD5(){ return "680acaff79486f017132a7f198d40f08"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandAction.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandAction.h new file mode 100644 index 0000000000000000000000000000000000000000..68d8356e00af1a7200f6bbbd101a6fdfd34ecf0d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_GripperCommandAction_h +#define _ROS_control_msgs_GripperCommandAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "control_msgs/GripperCommandActionGoal.h" +#include "control_msgs/GripperCommandActionResult.h" +#include "control_msgs/GripperCommandActionFeedback.h" + +namespace control_msgs +{ + + class GripperCommandAction : public ros::Msg + { + public: + typedef control_msgs::GripperCommandActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef control_msgs::GripperCommandActionResult _action_result_type; + _action_result_type action_result; + typedef control_msgs::GripperCommandActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + GripperCommandAction(): + action_goal(), + action_result(), + action_feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->action_goal.serialize(outbuffer + offset); + offset += this->action_result.serialize(outbuffer + offset); + offset += this->action_feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->action_goal.deserialize(inbuffer + offset); + offset += this->action_result.deserialize(inbuffer + offset); + offset += this->action_feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommandAction"; }; + const char * getMD5(){ return "950b2a6ebe831f5d4f4ceaba3d8be01e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandActionFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..67f99c9c1b0d3e4d62a7e0d069e85fb2d1191de4 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_GripperCommandActionFeedback_h +#define _ROS_control_msgs_GripperCommandActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/GripperCommandFeedback.h" + +namespace control_msgs +{ + + class GripperCommandActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::GripperCommandFeedback _feedback_type; + _feedback_type feedback; + + GripperCommandActionFeedback(): + header(), + status(), + feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommandActionFeedback"; }; + const char * getMD5(){ return "653dff30c045f5e6ff3feb3409f4558d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandActionGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..efb19d1d8e90ee1c35e1bf46cacad720cef176c0 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_GripperCommandActionGoal_h +#define _ROS_control_msgs_GripperCommandActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "control_msgs/GripperCommandGoal.h" + +namespace control_msgs +{ + + class GripperCommandActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef control_msgs::GripperCommandGoal _goal_type; + _goal_type goal; + + GripperCommandActionGoal(): + header(), + goal_id(), + goal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->goal_id.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->goal_id.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommandActionGoal"; }; + const char * getMD5(){ return "aa581f648a35ed681db2ec0bf7a82bea"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandActionResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..704f18db86b87b781cb3042736f81c9b9fc9e424 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_GripperCommandActionResult_h +#define _ROS_control_msgs_GripperCommandActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/GripperCommandResult.h" + +namespace control_msgs +{ + + class GripperCommandActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::GripperCommandResult _result_type; + _result_type result; + + GripperCommandActionResult(): + header(), + status(), + result() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->result.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->result.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommandActionResult"; }; + const char * getMD5(){ return "143702cb2df0f163c5283cedc5efc6b6"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..15d0397b4f6a94a6b3b4b114f98faf6bcaccf700 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandFeedback.h @@ -0,0 +1,138 @@ +#ifndef _ROS_control_msgs_GripperCommandFeedback_h +#define _ROS_control_msgs_GripperCommandFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class GripperCommandFeedback : public ros::Msg + { + public: + typedef double _position_type; + _position_type position; + typedef double _effort_type; + _effort_type effort; + typedef bool _stalled_type; + _stalled_type stalled; + typedef bool _reached_goal_type; + _reached_goal_type reached_goal; + + GripperCommandFeedback(): + position(0), + effort(0), + stalled(0), + reached_goal(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_position; + u_position.real = this->position; + *(outbuffer + offset + 0) = (u_position.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_position.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_position.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_position.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_position.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_position.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_position.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_position.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_effort; + u_effort.real = this->effort; + *(outbuffer + offset + 0) = (u_effort.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_effort.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_effort.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_effort.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_effort.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_effort.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_effort.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_effort.base >> (8 * 7)) & 0xFF; + offset += sizeof(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; + union { + double real; + uint64_t base; + } u_position; + u_position.base = 0; + u_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->position = u_position.real; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_effort; + u_effort.base = 0; + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->effort = u_effort.real; + offset += sizeof(this->effort); + union { + bool real; + uint8_t base; + } u_stalled; + u_stalled.base = 0; + u_stalled.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->stalled = u_stalled.real; + offset += sizeof(this->stalled); + union { + bool real; + uint8_t base; + } u_reached_goal; + u_reached_goal.base = 0; + u_reached_goal.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->reached_goal = u_reached_goal.real; + offset += sizeof(this->reached_goal); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommandFeedback"; }; + const char * getMD5(){ return "e4cbff56d3562bcf113da5a5adeef91f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..544a864749da9aba26022127edc6a835f4866a34 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandGoal.h @@ -0,0 +1,44 @@ +#ifndef _ROS_control_msgs_GripperCommandGoal_h +#define _ROS_control_msgs_GripperCommandGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "control_msgs/GripperCommand.h" + +namespace control_msgs +{ + + class GripperCommandGoal : public ros::Msg + { + public: + typedef control_msgs::GripperCommand _command_type; + _command_type command; + + GripperCommandGoal(): + command() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->command.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->command.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommandGoal"; }; + const char * getMD5(){ return "86fd82f4ddc48a4cb6856cfa69217e43"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandResult.h new file mode 100644 index 0000000000000000000000000000000000000000..e28b26016feaf8649a9558ae6110e38e8f3dfaa0 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandResult.h @@ -0,0 +1,138 @@ +#ifndef _ROS_control_msgs_GripperCommandResult_h +#define _ROS_control_msgs_GripperCommandResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class GripperCommandResult : public ros::Msg + { + public: + typedef double _position_type; + _position_type position; + typedef double _effort_type; + _effort_type effort; + typedef bool _stalled_type; + _stalled_type stalled; + typedef bool _reached_goal_type; + _reached_goal_type reached_goal; + + GripperCommandResult(): + position(0), + effort(0), + stalled(0), + reached_goal(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_position; + u_position.real = this->position; + *(outbuffer + offset + 0) = (u_position.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_position.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_position.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_position.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_position.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_position.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_position.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_position.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_effort; + u_effort.real = this->effort; + *(outbuffer + offset + 0) = (u_effort.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_effort.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_effort.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_effort.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_effort.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_effort.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_effort.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_effort.base >> (8 * 7)) & 0xFF; + offset += sizeof(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; + union { + double real; + uint64_t base; + } u_position; + u_position.base = 0; + u_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->position = u_position.real; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_effort; + u_effort.base = 0; + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->effort = u_effort.real; + offset += sizeof(this->effort); + union { + bool real; + uint8_t base; + } u_stalled; + u_stalled.base = 0; + u_stalled.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->stalled = u_stalled.real; + offset += sizeof(this->stalled); + union { + bool real; + uint8_t base; + } u_reached_goal; + u_reached_goal.base = 0; + u_reached_goal.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->reached_goal = u_reached_goal.real; + offset += sizeof(this->reached_goal); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommandResult"; }; + const char * getMD5(){ return "e4cbff56d3562bcf113da5a5adeef91f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointControllerState.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointControllerState.h new file mode 100644 index 0000000000000000000000000000000000000000..b70ef6d2fb228acdcc90c2ca713f7da0f085509d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointControllerState.h @@ -0,0 +1,382 @@ +#ifndef _ROS_control_msgs_JointControllerState_h +#define _ROS_control_msgs_JointControllerState_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace control_msgs +{ + + class JointControllerState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef double _set_point_type; + _set_point_type set_point; + typedef double _process_value_type; + _process_value_type process_value; + typedef double _process_value_dot_type; + _process_value_dot_type process_value_dot; + typedef double _error_type; + _error_type error; + typedef double _time_step_type; + _time_step_type time_step; + typedef double _command_type; + _command_type command; + typedef double _p_type; + _p_type p; + typedef double _i_type; + _i_type i; + typedef double _d_type; + _d_type d; + typedef double _i_clamp_type; + _i_clamp_type i_clamp; + typedef bool _antiwindup_type; + _antiwindup_type antiwindup; + + JointControllerState(): + header(), + set_point(0), + process_value(0), + process_value_dot(0), + error(0), + time_step(0), + command(0), + p(0), + i(0), + d(0), + i_clamp(0), + antiwindup(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_set_point; + u_set_point.real = this->set_point; + *(outbuffer + offset + 0) = (u_set_point.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_set_point.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_set_point.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_set_point.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_set_point.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_set_point.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_set_point.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_set_point.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->set_point); + union { + double real; + uint64_t base; + } u_process_value; + u_process_value.real = this->process_value; + *(outbuffer + offset + 0) = (u_process_value.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_process_value.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_process_value.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_process_value.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_process_value.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_process_value.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_process_value.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_process_value.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->process_value); + union { + double real; + uint64_t base; + } u_process_value_dot; + u_process_value_dot.real = this->process_value_dot; + *(outbuffer + offset + 0) = (u_process_value_dot.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_process_value_dot.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_process_value_dot.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_process_value_dot.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_process_value_dot.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_process_value_dot.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_process_value_dot.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_process_value_dot.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->process_value_dot); + union { + double real; + uint64_t base; + } u_error; + u_error.real = this->error; + *(outbuffer + offset + 0) = (u_error.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_error.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_error.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_error.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_error.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_error.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_error.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_error.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->error); + union { + double real; + uint64_t base; + } u_time_step; + u_time_step.real = this->time_step; + *(outbuffer + offset + 0) = (u_time_step.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_time_step.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_time_step.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_time_step.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_time_step.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_time_step.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_time_step.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_time_step.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->time_step); + union { + double real; + uint64_t base; + } u_command; + u_command.real = this->command; + *(outbuffer + offset + 0) = (u_command.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_command.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_command.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_command.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_command.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_command.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_command.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_command.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->command); + union { + double real; + uint64_t base; + } u_p; + u_p.real = this->p; + *(outbuffer + offset + 0) = (u_p.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_p.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_p.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_p.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_p.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_p.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_p.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_p.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->p); + union { + double real; + uint64_t base; + } u_i; + u_i.real = this->i; + *(outbuffer + offset + 0) = (u_i.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i); + union { + double real; + uint64_t base; + } u_d; + u_d.real = this->d; + *(outbuffer + offset + 0) = (u_d.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_d.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_d.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_d.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_d.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_d.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_d.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_d.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->d); + union { + double real; + uint64_t base; + } u_i_clamp; + u_i_clamp.real = this->i_clamp; + *(outbuffer + offset + 0) = (u_i_clamp.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i_clamp.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i_clamp.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i_clamp.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i_clamp.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i_clamp.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i_clamp.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i_clamp.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i_clamp); + union { + bool real; + uint8_t base; + } u_antiwindup; + u_antiwindup.real = this->antiwindup; + *(outbuffer + offset + 0) = (u_antiwindup.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->antiwindup); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_set_point; + u_set_point.base = 0; + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->set_point = u_set_point.real; + offset += sizeof(this->set_point); + union { + double real; + uint64_t base; + } u_process_value; + u_process_value.base = 0; + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->process_value = u_process_value.real; + offset += sizeof(this->process_value); + union { + double real; + uint64_t base; + } u_process_value_dot; + u_process_value_dot.base = 0; + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->process_value_dot = u_process_value_dot.real; + offset += sizeof(this->process_value_dot); + union { + double real; + uint64_t base; + } u_error; + u_error.base = 0; + u_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->error = u_error.real; + offset += sizeof(this->error); + union { + double real; + uint64_t base; + } u_time_step; + u_time_step.base = 0; + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->time_step = u_time_step.real; + offset += sizeof(this->time_step); + union { + double real; + uint64_t base; + } u_command; + u_command.base = 0; + u_command.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_command.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_command.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_command.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_command.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_command.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_command.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_command.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->command = u_command.real; + offset += sizeof(this->command); + union { + double real; + uint64_t base; + } u_p; + u_p.base = 0; + u_p.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->p = u_p.real; + offset += sizeof(this->p); + union { + double real; + uint64_t base; + } u_i; + u_i.base = 0; + u_i.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i = u_i.real; + offset += sizeof(this->i); + union { + double real; + uint64_t base; + } u_d; + u_d.base = 0; + u_d.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->d = u_d.real; + offset += sizeof(this->d); + union { + double real; + uint64_t base; + } u_i_clamp; + u_i_clamp.base = 0; + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i_clamp = u_i_clamp.real; + offset += sizeof(this->i_clamp); + union { + bool real; + uint8_t base; + } u_antiwindup; + u_antiwindup.base = 0; + u_antiwindup.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->antiwindup = u_antiwindup.real; + offset += sizeof(this->antiwindup); + return offset; + } + + const char * getType(){ return "control_msgs/JointControllerState"; }; + const char * getMD5(){ return "987ad85e4756f3aef7f1e5e7fe0595d1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTolerance.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTolerance.h new file mode 100644 index 0000000000000000000000000000000000000000..051971eea27ac02358bfb543a622dd635f337038 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTolerance.h @@ -0,0 +1,151 @@ +#ifndef _ROS_control_msgs_JointTolerance_h +#define _ROS_control_msgs_JointTolerance_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class JointTolerance : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef double _position_type; + _position_type position; + typedef double _velocity_type; + _velocity_type velocity; + typedef double _acceleration_type; + _acceleration_type acceleration; + + JointTolerance(): + name(""), + position(0), + velocity(0), + acceleration(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + union { + double real; + uint64_t base; + } u_position; + u_position.real = this->position; + *(outbuffer + offset + 0) = (u_position.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_position.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_position.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_position.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_position.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_position.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_position.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_position.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_velocity; + u_velocity.real = this->velocity; + *(outbuffer + offset + 0) = (u_velocity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_velocity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_velocity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_velocity.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_velocity.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_velocity.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_velocity.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_velocity.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->velocity); + union { + double real; + uint64_t base; + } u_acceleration; + u_acceleration.real = this->acceleration; + *(outbuffer + offset + 0) = (u_acceleration.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_acceleration.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_acceleration.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_acceleration.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_acceleration.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_acceleration.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_acceleration.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_acceleration.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->acceleration); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + union { + double real; + uint64_t base; + } u_position; + u_position.base = 0; + u_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->position = u_position.real; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_velocity; + u_velocity.base = 0; + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->velocity = u_velocity.real; + offset += sizeof(this->velocity); + union { + double real; + uint64_t base; + } u_acceleration; + u_acceleration.base = 0; + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->acceleration = u_acceleration.real; + offset += sizeof(this->acceleration); + return offset; + } + + const char * getType(){ return "control_msgs/JointTolerance"; }; + const char * getMD5(){ return "f544fe9c16cf04547e135dd6063ff5be"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryAction.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryAction.h new file mode 100644 index 0000000000000000000000000000000000000000..96bbaa488b1686516ebea2e894139b651943b3ac --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_JointTrajectoryAction_h +#define _ROS_control_msgs_JointTrajectoryAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "control_msgs/JointTrajectoryActionGoal.h" +#include "control_msgs/JointTrajectoryActionResult.h" +#include "control_msgs/JointTrajectoryActionFeedback.h" + +namespace control_msgs +{ + + class JointTrajectoryAction : public ros::Msg + { + public: + typedef control_msgs::JointTrajectoryActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef control_msgs::JointTrajectoryActionResult _action_result_type; + _action_result_type action_result; + typedef control_msgs::JointTrajectoryActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + JointTrajectoryAction(): + action_goal(), + action_result(), + action_feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->action_goal.serialize(outbuffer + offset); + offset += this->action_result.serialize(outbuffer + offset); + offset += this->action_feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->action_goal.deserialize(inbuffer + offset); + offset += this->action_result.deserialize(inbuffer + offset); + offset += this->action_feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryAction"; }; + const char * getMD5(){ return "a04ba3ee8f6a2d0985a6aeaf23d9d7ad"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryActionFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..8df7fee09150195e67aab627eded53ee440df4ec --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_JointTrajectoryActionFeedback_h +#define _ROS_control_msgs_JointTrajectoryActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/JointTrajectoryFeedback.h" + +namespace control_msgs +{ + + class JointTrajectoryActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::JointTrajectoryFeedback _feedback_type; + _feedback_type feedback; + + JointTrajectoryActionFeedback(): + header(), + status(), + feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryActionFeedback"; }; + const char * getMD5(){ return "aae20e09065c3809e8a8e87c4c8953fd"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryActionGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..8c432bb5ae7458cfc6490faad9c4d3915495af9f --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_JointTrajectoryActionGoal_h +#define _ROS_control_msgs_JointTrajectoryActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "control_msgs/JointTrajectoryGoal.h" + +namespace control_msgs +{ + + class JointTrajectoryActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef control_msgs::JointTrajectoryGoal _goal_type; + _goal_type goal; + + JointTrajectoryActionGoal(): + header(), + goal_id(), + goal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->goal_id.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->goal_id.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryActionGoal"; }; + const char * getMD5(){ return "a99e83ef6185f9fdd7693efe99623a86"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryActionResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..2a11d224d36cd8b5341c79a371ceeecf97ee824d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_JointTrajectoryActionResult_h +#define _ROS_control_msgs_JointTrajectoryActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/JointTrajectoryResult.h" + +namespace control_msgs +{ + + class JointTrajectoryActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::JointTrajectoryResult _result_type; + _result_type result; + + JointTrajectoryActionResult(): + header(), + status(), + result() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->result.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->result.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryActionResult"; }; + const char * getMD5(){ return "1eb06eeff08fa7ea874431638cb52332"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryControllerState.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryControllerState.h new file mode 100644 index 0000000000000000000000000000000000000000..148db3a7900e5c1d65bbd9047d6ab3d4e9fa1363 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryControllerState.h @@ -0,0 +1,97 @@ +#ifndef _ROS_control_msgs_JointTrajectoryControllerState_h +#define _ROS_control_msgs_JointTrajectoryControllerState_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "trajectory_msgs/JointTrajectoryPoint.h" + +namespace control_msgs +{ + + class JointTrajectoryControllerState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t joint_names_length; + typedef char* _joint_names_type; + _joint_names_type st_joint_names; + _joint_names_type * joint_names; + typedef trajectory_msgs::JointTrajectoryPoint _desired_type; + _desired_type desired; + typedef trajectory_msgs::JointTrajectoryPoint _actual_type; + _actual_type actual; + typedef trajectory_msgs::JointTrajectoryPoint _error_type; + _error_type error; + + JointTrajectoryControllerState(): + header(), + joint_names_length(0), joint_names(NULL), + desired(), + actual(), + error() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_names_length); + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_joint_namesi = strlen(this->joint_names[i]); + varToArr(outbuffer + offset, length_joint_namesi); + offset += 4; + memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); + offset += length_joint_namesi; + } + offset += this->desired.serialize(outbuffer + offset); + offset += this->actual.serialize(outbuffer + offset); + offset += this->error.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_names_length); + if(joint_names_lengthT > joint_names_length) + this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); + joint_names_length = joint_names_lengthT; + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_st_joint_names; + arrToVar(length_st_joint_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_joint_names-1]=0; + this->st_joint_names = (char *)(inbuffer + offset-1); + offset += length_st_joint_names; + memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); + } + offset += this->desired.deserialize(inbuffer + offset); + offset += this->actual.deserialize(inbuffer + offset); + offset += this->error.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryControllerState"; }; + const char * getMD5(){ return "10817c60c2486ef6b33e97dcd87f4474"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..9dfe808d1ad01bfeb70ddfcf3902fa36fad650f5 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryFeedback.h @@ -0,0 +1,38 @@ +#ifndef _ROS_control_msgs_JointTrajectoryFeedback_h +#define _ROS_control_msgs_JointTrajectoryFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class JointTrajectoryFeedback : public ros::Msg + { + public: + + JointTrajectoryFeedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryFeedback"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..b699132e456fedba7acef0d08063bfe885fe772e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryGoal.h @@ -0,0 +1,44 @@ +#ifndef _ROS_control_msgs_JointTrajectoryGoal_h +#define _ROS_control_msgs_JointTrajectoryGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "trajectory_msgs/JointTrajectory.h" + +namespace control_msgs +{ + + class JointTrajectoryGoal : public ros::Msg + { + public: + typedef trajectory_msgs::JointTrajectory _trajectory_type; + _trajectory_type trajectory; + + JointTrajectoryGoal(): + trajectory() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->trajectory.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->trajectory.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryGoal"; }; + const char * getMD5(){ return "2a0eff76c870e8595636c2a562ca298e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryResult.h new file mode 100644 index 0000000000000000000000000000000000000000..623ed9cd099c212a6be65d4d93450b096de4d6d4 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryResult.h @@ -0,0 +1,38 @@ +#ifndef _ROS_control_msgs_JointTrajectoryResult_h +#define _ROS_control_msgs_JointTrajectoryResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class JointTrajectoryResult : public ros::Msg + { + public: + + JointTrajectoryResult() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryResult"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PidState.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PidState.h new file mode 100644 index 0000000000000000000000000000000000000000..a19ddf9739a643532eb894b8e544eafef46f8ed9 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PidState.h @@ -0,0 +1,420 @@ +#ifndef _ROS_control_msgs_PidState_h +#define _ROS_control_msgs_PidState_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "ros/duration.h" + +namespace control_msgs +{ + + class PidState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef ros::Duration _timestep_type; + _timestep_type timestep; + typedef double _error_type; + _error_type error; + typedef double _error_dot_type; + _error_dot_type error_dot; + typedef double _p_error_type; + _p_error_type p_error; + typedef double _i_error_type; + _i_error_type i_error; + typedef double _d_error_type; + _d_error_type d_error; + typedef double _p_term_type; + _p_term_type p_term; + typedef double _i_term_type; + _i_term_type i_term; + typedef double _d_term_type; + _d_term_type d_term; + typedef double _i_max_type; + _i_max_type i_max; + typedef double _i_min_type; + _i_min_type i_min; + typedef double _output_type; + _output_type output; + + PidState(): + header(), + timestep(), + error(0), + error_dot(0), + p_error(0), + i_error(0), + d_error(0), + p_term(0), + i_term(0), + d_term(0), + i_max(0), + i_min(0), + output(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->timestep.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timestep.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timestep.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timestep.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timestep.sec); + *(outbuffer + offset + 0) = (this->timestep.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timestep.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timestep.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timestep.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timestep.nsec); + union { + double real; + uint64_t base; + } u_error; + u_error.real = this->error; + *(outbuffer + offset + 0) = (u_error.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_error.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_error.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_error.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_error.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_error.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_error.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_error.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->error); + union { + double real; + uint64_t base; + } u_error_dot; + u_error_dot.real = this->error_dot; + *(outbuffer + offset + 0) = (u_error_dot.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_error_dot.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_error_dot.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_error_dot.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_error_dot.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_error_dot.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_error_dot.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_error_dot.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->error_dot); + union { + double real; + uint64_t base; + } u_p_error; + u_p_error.real = this->p_error; + *(outbuffer + offset + 0) = (u_p_error.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_p_error.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_p_error.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_p_error.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_p_error.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_p_error.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_p_error.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_p_error.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->p_error); + union { + double real; + uint64_t base; + } u_i_error; + u_i_error.real = this->i_error; + *(outbuffer + offset + 0) = (u_i_error.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i_error.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i_error.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i_error.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i_error.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i_error.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i_error.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i_error.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i_error); + union { + double real; + uint64_t base; + } u_d_error; + u_d_error.real = this->d_error; + *(outbuffer + offset + 0) = (u_d_error.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_d_error.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_d_error.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_d_error.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_d_error.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_d_error.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_d_error.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_d_error.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->d_error); + union { + double real; + uint64_t base; + } u_p_term; + u_p_term.real = this->p_term; + *(outbuffer + offset + 0) = (u_p_term.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_p_term.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_p_term.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_p_term.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_p_term.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_p_term.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_p_term.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_p_term.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->p_term); + union { + double real; + uint64_t base; + } u_i_term; + u_i_term.real = this->i_term; + *(outbuffer + offset + 0) = (u_i_term.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i_term.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i_term.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i_term.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i_term.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i_term.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i_term.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i_term.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i_term); + union { + double real; + uint64_t base; + } u_d_term; + u_d_term.real = this->d_term; + *(outbuffer + offset + 0) = (u_d_term.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_d_term.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_d_term.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_d_term.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_d_term.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_d_term.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_d_term.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_d_term.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->d_term); + union { + double real; + uint64_t base; + } u_i_max; + u_i_max.real = this->i_max; + *(outbuffer + offset + 0) = (u_i_max.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i_max.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i_max.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i_max.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i_max.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i_max.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i_max.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i_max.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i_max); + union { + double real; + uint64_t base; + } u_i_min; + u_i_min.real = this->i_min; + *(outbuffer + offset + 0) = (u_i_min.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i_min.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i_min.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i_min.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i_min.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i_min.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i_min.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i_min.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i_min); + union { + double real; + uint64_t base; + } u_output; + u_output.real = this->output; + *(outbuffer + offset + 0) = (u_output.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_output.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_output.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_output.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_output.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_output.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_output.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_output.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->output); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->timestep.sec = ((uint32_t) (*(inbuffer + offset))); + this->timestep.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timestep.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timestep.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timestep.sec); + this->timestep.nsec = ((uint32_t) (*(inbuffer + offset))); + this->timestep.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timestep.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timestep.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timestep.nsec); + union { + double real; + uint64_t base; + } u_error; + u_error.base = 0; + u_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->error = u_error.real; + offset += sizeof(this->error); + union { + double real; + uint64_t base; + } u_error_dot; + u_error_dot.base = 0; + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->error_dot = u_error_dot.real; + offset += sizeof(this->error_dot); + union { + double real; + uint64_t base; + } u_p_error; + u_p_error.base = 0; + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->p_error = u_p_error.real; + offset += sizeof(this->p_error); + union { + double real; + uint64_t base; + } u_i_error; + u_i_error.base = 0; + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i_error = u_i_error.real; + offset += sizeof(this->i_error); + union { + double real; + uint64_t base; + } u_d_error; + u_d_error.base = 0; + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->d_error = u_d_error.real; + offset += sizeof(this->d_error); + union { + double real; + uint64_t base; + } u_p_term; + u_p_term.base = 0; + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->p_term = u_p_term.real; + offset += sizeof(this->p_term); + union { + double real; + uint64_t base; + } u_i_term; + u_i_term.base = 0; + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i_term = u_i_term.real; + offset += sizeof(this->i_term); + union { + double real; + uint64_t base; + } u_d_term; + u_d_term.base = 0; + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->d_term = u_d_term.real; + offset += sizeof(this->d_term); + union { + double real; + uint64_t base; + } u_i_max; + u_i_max.base = 0; + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i_max = u_i_max.real; + offset += sizeof(this->i_max); + union { + double real; + uint64_t base; + } u_i_min; + u_i_min.base = 0; + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i_min = u_i_min.real; + offset += sizeof(this->i_min); + union { + double real; + uint64_t base; + } u_output; + u_output.base = 0; + u_output.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_output.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_output.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_output.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_output.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_output.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_output.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_output.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->output = u_output.real; + offset += sizeof(this->output); + return offset; + } + + const char * getType(){ return "control_msgs/PidState"; }; + const char * getMD5(){ return "b138ec00e886c10e73f27e8712252ea6"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadAction.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadAction.h new file mode 100644 index 0000000000000000000000000000000000000000..82ee446909a212585ae198b9842d4e8dcc6fc6e8 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_PointHeadAction_h +#define _ROS_control_msgs_PointHeadAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "control_msgs/PointHeadActionGoal.h" +#include "control_msgs/PointHeadActionResult.h" +#include "control_msgs/PointHeadActionFeedback.h" + +namespace control_msgs +{ + + class PointHeadAction : public ros::Msg + { + public: + typedef control_msgs::PointHeadActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef control_msgs::PointHeadActionResult _action_result_type; + _action_result_type action_result; + typedef control_msgs::PointHeadActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + PointHeadAction(): + action_goal(), + action_result(), + action_feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->action_goal.serialize(outbuffer + offset); + offset += this->action_result.serialize(outbuffer + offset); + offset += this->action_feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->action_goal.deserialize(inbuffer + offset); + offset += this->action_result.deserialize(inbuffer + offset); + offset += this->action_feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/PointHeadAction"; }; + const char * getMD5(){ return "7252920f1243de1b741f14f214125371"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadActionFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..780656b1de51f13a0114903f138582a487aec0c3 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_PointHeadActionFeedback_h +#define _ROS_control_msgs_PointHeadActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/PointHeadFeedback.h" + +namespace control_msgs +{ + + class PointHeadActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::PointHeadFeedback _feedback_type; + _feedback_type feedback; + + PointHeadActionFeedback(): + header(), + status(), + feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/PointHeadActionFeedback"; }; + const char * getMD5(){ return "33c9244957176bbba97dd641119e8460"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadActionGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..12ae7911bedd1f3cd4c6e032e5e37c68f7b31997 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_PointHeadActionGoal_h +#define _ROS_control_msgs_PointHeadActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "control_msgs/PointHeadGoal.h" + +namespace control_msgs +{ + + class PointHeadActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef control_msgs::PointHeadGoal _goal_type; + _goal_type goal; + + PointHeadActionGoal(): + header(), + goal_id(), + goal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->goal_id.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->goal_id.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/PointHeadActionGoal"; }; + const char * getMD5(){ return "b53a8323d0ba7b310ba17a2d3a82a6b8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadActionResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..7708fe60379fb43a4a3002871dfcf7ac01689c9d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_PointHeadActionResult_h +#define _ROS_control_msgs_PointHeadActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/PointHeadResult.h" + +namespace control_msgs +{ + + class PointHeadActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::PointHeadResult _result_type; + _result_type result; + + PointHeadActionResult(): + header(), + status(), + result() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->result.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->result.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/PointHeadActionResult"; }; + const char * getMD5(){ return "1eb06eeff08fa7ea874431638cb52332"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..beafd3ef52939c8a44e8323d1e2284c8b52d8857 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadFeedback.h @@ -0,0 +1,70 @@ +#ifndef _ROS_control_msgs_PointHeadFeedback_h +#define _ROS_control_msgs_PointHeadFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class PointHeadFeedback : public ros::Msg + { + public: + typedef double _pointing_angle_error_type; + _pointing_angle_error_type pointing_angle_error; + + PointHeadFeedback(): + pointing_angle_error(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_pointing_angle_error; + u_pointing_angle_error.real = this->pointing_angle_error; + *(outbuffer + offset + 0) = (u_pointing_angle_error.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_pointing_angle_error.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_pointing_angle_error.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_pointing_angle_error.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_pointing_angle_error.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_pointing_angle_error.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_pointing_angle_error.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_pointing_angle_error.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->pointing_angle_error); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_pointing_angle_error; + u_pointing_angle_error.base = 0; + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->pointing_angle_error = u_pointing_angle_error.real; + offset += sizeof(this->pointing_angle_error); + return offset; + } + + const char * getType(){ return "control_msgs/PointHeadFeedback"; }; + const char * getMD5(){ return "cce80d27fd763682da8805a73316cab4"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..4d7355cbdea878a4b77632d5ec9e169ab7320747 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadGoal.h @@ -0,0 +1,123 @@ +#ifndef _ROS_control_msgs_PointHeadGoal_h +#define _ROS_control_msgs_PointHeadGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/PointStamped.h" +#include "geometry_msgs/Vector3.h" +#include "ros/duration.h" + +namespace control_msgs +{ + + class PointHeadGoal : public ros::Msg + { + public: + typedef geometry_msgs::PointStamped _target_type; + _target_type target; + typedef geometry_msgs::Vector3 _pointing_axis_type; + _pointing_axis_type pointing_axis; + typedef const char* _pointing_frame_type; + _pointing_frame_type pointing_frame; + typedef ros::Duration _min_duration_type; + _min_duration_type min_duration; + typedef double _max_velocity_type; + _max_velocity_type max_velocity; + + PointHeadGoal(): + target(), + pointing_axis(), + pointing_frame(""), + min_duration(), + max_velocity(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->target.serialize(outbuffer + offset); + offset += this->pointing_axis.serialize(outbuffer + offset); + uint32_t length_pointing_frame = strlen(this->pointing_frame); + varToArr(outbuffer + offset, length_pointing_frame); + offset += 4; + memcpy(outbuffer + offset, this->pointing_frame, length_pointing_frame); + offset += length_pointing_frame; + *(outbuffer + offset + 0) = (this->min_duration.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->min_duration.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->min_duration.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->min_duration.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->min_duration.sec); + *(outbuffer + offset + 0) = (this->min_duration.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->min_duration.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->min_duration.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->min_duration.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->min_duration.nsec); + union { + double real; + uint64_t base; + } u_max_velocity; + u_max_velocity.real = this->max_velocity; + *(outbuffer + offset + 0) = (u_max_velocity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_velocity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_velocity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_velocity.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max_velocity.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max_velocity.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max_velocity.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max_velocity.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max_velocity); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->target.deserialize(inbuffer + offset); + offset += this->pointing_axis.deserialize(inbuffer + offset); + uint32_t length_pointing_frame; + arrToVar(length_pointing_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_pointing_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_pointing_frame-1]=0; + this->pointing_frame = (char *)(inbuffer + offset-1); + offset += length_pointing_frame; + this->min_duration.sec = ((uint32_t) (*(inbuffer + offset))); + this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->min_duration.sec); + this->min_duration.nsec = ((uint32_t) (*(inbuffer + offset))); + this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->min_duration.nsec); + union { + double real; + uint64_t base; + } u_max_velocity; + u_max_velocity.base = 0; + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max_velocity = u_max_velocity.real; + offset += sizeof(this->max_velocity); + return offset; + } + + const char * getType(){ return "control_msgs/PointHeadGoal"; }; + const char * getMD5(){ return "8b92b1cd5e06c8a94c917dc3209a4c1d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadResult.h new file mode 100644 index 0000000000000000000000000000000000000000..53f789e92946eeba57f8825f09422dd6fc4d5b83 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadResult.h @@ -0,0 +1,38 @@ +#ifndef _ROS_control_msgs_PointHeadResult_h +#define _ROS_control_msgs_PointHeadResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class PointHeadResult : public ros::Msg + { + public: + + PointHeadResult() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return "control_msgs/PointHeadResult"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/QueryCalibrationState.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/QueryCalibrationState.h new file mode 100644 index 0000000000000000000000000000000000000000..0fd1a66a0be9f04857c28b0ab83f4147ba73788e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/QueryCalibrationState.h @@ -0,0 +1,88 @@ +#ifndef _ROS_SERVICE_QueryCalibrationState_h +#define _ROS_SERVICE_QueryCalibrationState_h +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + +static const char QUERYCALIBRATIONSTATE[] = "control_msgs/QueryCalibrationState"; + + class QueryCalibrationStateRequest : public ros::Msg + { + public: + + QueryCalibrationStateRequest() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return QUERYCALIBRATIONSTATE; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class QueryCalibrationStateResponse : public ros::Msg + { + public: + typedef bool _is_calibrated_type; + _is_calibrated_type is_calibrated; + + QueryCalibrationStateResponse(): + is_calibrated(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_is_calibrated; + u_is_calibrated.real = this->is_calibrated; + *(outbuffer + offset + 0) = (u_is_calibrated.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->is_calibrated); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_is_calibrated; + u_is_calibrated.base = 0; + u_is_calibrated.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->is_calibrated = u_is_calibrated.real; + offset += sizeof(this->is_calibrated); + return offset; + } + + const char * getType(){ return QUERYCALIBRATIONSTATE; }; + const char * getMD5(){ return "28af3beedcb84986b8e470dc5470507d"; }; + + }; + + class QueryCalibrationState { + public: + typedef QueryCalibrationStateRequest Request; + typedef QueryCalibrationStateResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/QueryTrajectoryState.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/QueryTrajectoryState.h new file mode 100644 index 0000000000000000000000000000000000000000..aef19a80e64436c1c8851f3d5344b841ece4a8ab --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/QueryTrajectoryState.h @@ -0,0 +1,287 @@ +#ifndef _ROS_SERVICE_QueryTrajectoryState_h +#define _ROS_SERVICE_QueryTrajectoryState_h +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" + +namespace control_msgs +{ + +static const char QUERYTRAJECTORYSTATE[] = "control_msgs/QueryTrajectoryState"; + + class QueryTrajectoryStateRequest : public ros::Msg + { + public: + typedef ros::Time _time_type; + _time_type time; + + QueryTrajectoryStateRequest(): + time() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time.sec); + *(outbuffer + offset + 0) = (this->time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->time.sec = ((uint32_t) (*(inbuffer + offset))); + this->time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time.sec); + this->time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time.nsec); + return offset; + } + + const char * getType(){ return QUERYTRAJECTORYSTATE; }; + const char * getMD5(){ return "556a4fb76023a469987922359d08a844"; }; + + }; + + class QueryTrajectoryStateResponse : public ros::Msg + { + public: + uint32_t name_length; + typedef char* _name_type; + _name_type st_name; + _name_type * name; + uint32_t position_length; + typedef double _position_type; + _position_type st_position; + _position_type * position; + uint32_t velocity_length; + typedef double _velocity_type; + _velocity_type st_velocity; + _velocity_type * velocity; + uint32_t acceleration_length; + typedef double _acceleration_type; + _acceleration_type st_acceleration; + _acceleration_type * acceleration; + + QueryTrajectoryStateResponse(): + name_length(0), name(NULL), + position_length(0), position(NULL), + velocity_length(0), velocity(NULL), + acceleration_length(0), acceleration(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->name_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->name_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->name_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->name_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->name_length); + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_namei = strlen(this->name[i]); + varToArr(outbuffer + offset, length_namei); + offset += 4; + memcpy(outbuffer + offset, this->name[i], length_namei); + offset += length_namei; + } + *(outbuffer + offset + 0) = (this->position_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->position_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->position_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->position_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->position_length); + for( uint32_t i = 0; i < position_length; i++){ + union { + double real; + uint64_t base; + } u_positioni; + u_positioni.real = this->position[i]; + *(outbuffer + offset + 0) = (u_positioni.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_positioni.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_positioni.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_positioni.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_positioni.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_positioni.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_positioni.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_positioni.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position[i]); + } + *(outbuffer + offset + 0) = (this->velocity_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->velocity_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->velocity_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->velocity_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->velocity_length); + for( uint32_t i = 0; i < velocity_length; i++){ + union { + double real; + uint64_t base; + } u_velocityi; + u_velocityi.real = this->velocity[i]; + *(outbuffer + offset + 0) = (u_velocityi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_velocityi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_velocityi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_velocityi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_velocityi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_velocityi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_velocityi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_velocityi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->velocity[i]); + } + *(outbuffer + offset + 0) = (this->acceleration_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->acceleration_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->acceleration_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->acceleration_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->acceleration_length); + for( uint32_t i = 0; i < acceleration_length; i++){ + union { + double real; + uint64_t base; + } u_accelerationi; + u_accelerationi.real = this->acceleration[i]; + *(outbuffer + offset + 0) = (u_accelerationi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_accelerationi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_accelerationi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_accelerationi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_accelerationi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_accelerationi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_accelerationi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_accelerationi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->acceleration[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t name_lengthT = ((uint32_t) (*(inbuffer + offset))); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->name_length); + if(name_lengthT > name_length) + this->name = (char**)realloc(this->name, name_lengthT * sizeof(char*)); + name_length = name_lengthT; + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_st_name; + arrToVar(length_st_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_name-1]=0; + this->st_name = (char *)(inbuffer + offset-1); + offset += length_st_name; + memcpy( &(this->name[i]), &(this->st_name), sizeof(char*)); + } + uint32_t position_lengthT = ((uint32_t) (*(inbuffer + offset))); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->position_length); + if(position_lengthT > position_length) + this->position = (double*)realloc(this->position, position_lengthT * sizeof(double)); + position_length = position_lengthT; + for( uint32_t i = 0; i < position_length; i++){ + union { + double real; + uint64_t base; + } u_st_position; + u_st_position.base = 0; + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_position = u_st_position.real; + offset += sizeof(this->st_position); + memcpy( &(this->position[i]), &(this->st_position), sizeof(double)); + } + uint32_t velocity_lengthT = ((uint32_t) (*(inbuffer + offset))); + velocity_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + velocity_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + velocity_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->velocity_length); + if(velocity_lengthT > velocity_length) + this->velocity = (double*)realloc(this->velocity, velocity_lengthT * sizeof(double)); + velocity_length = velocity_lengthT; + for( uint32_t i = 0; i < velocity_length; i++){ + union { + double real; + uint64_t base; + } u_st_velocity; + u_st_velocity.base = 0; + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_velocity = u_st_velocity.real; + offset += sizeof(this->st_velocity); + memcpy( &(this->velocity[i]), &(this->st_velocity), sizeof(double)); + } + uint32_t acceleration_lengthT = ((uint32_t) (*(inbuffer + offset))); + acceleration_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + acceleration_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + acceleration_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->acceleration_length); + if(acceleration_lengthT > acceleration_length) + this->acceleration = (double*)realloc(this->acceleration, acceleration_lengthT * sizeof(double)); + acceleration_length = acceleration_lengthT; + for( uint32_t i = 0; i < acceleration_length; i++){ + union { + double real; + uint64_t base; + } u_st_acceleration; + u_st_acceleration.base = 0; + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_acceleration = u_st_acceleration.real; + offset += sizeof(this->st_acceleration); + memcpy( &(this->acceleration[i]), &(this->st_acceleration), sizeof(double)); + } + return offset; + } + + const char * getType(){ return QUERYTRAJECTORYSTATE; }; + const char * getMD5(){ return "1f1a6554ad060f44d013e71868403c1a"; }; + + }; + + class QueryTrajectoryState { + public: + typedef QueryTrajectoryStateRequest Request; + typedef QueryTrajectoryStateResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionAction.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionAction.h new file mode 100644 index 0000000000000000000000000000000000000000..3117ee131ddcb6691577837cf716e9570c7e4742 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_SingleJointPositionAction_h +#define _ROS_control_msgs_SingleJointPositionAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "control_msgs/SingleJointPositionActionGoal.h" +#include "control_msgs/SingleJointPositionActionResult.h" +#include "control_msgs/SingleJointPositionActionFeedback.h" + +namespace control_msgs +{ + + class SingleJointPositionAction : public ros::Msg + { + public: + typedef control_msgs::SingleJointPositionActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef control_msgs::SingleJointPositionActionResult _action_result_type; + _action_result_type action_result; + typedef control_msgs::SingleJointPositionActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + SingleJointPositionAction(): + action_goal(), + action_result(), + action_feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->action_goal.serialize(outbuffer + offset); + offset += this->action_result.serialize(outbuffer + offset); + offset += this->action_feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->action_goal.deserialize(inbuffer + offset); + offset += this->action_result.deserialize(inbuffer + offset); + offset += this->action_feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/SingleJointPositionAction"; }; + const char * getMD5(){ return "c4a786b7d53e5d0983decf967a5a779e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionActionFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..82cba63dd233a10c8b46d9727a2ba46d226c038e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_SingleJointPositionActionFeedback_h +#define _ROS_control_msgs_SingleJointPositionActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/SingleJointPositionFeedback.h" + +namespace control_msgs +{ + + class SingleJointPositionActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::SingleJointPositionFeedback _feedback_type; + _feedback_type feedback; + + SingleJointPositionActionFeedback(): + header(), + status(), + feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/SingleJointPositionActionFeedback"; }; + const char * getMD5(){ return "3503b7cf8972f90d245850a5d8796cfa"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionActionGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..75c789880add2c65d89920a2b69f97df1cbb2c89 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_SingleJointPositionActionGoal_h +#define _ROS_control_msgs_SingleJointPositionActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "control_msgs/SingleJointPositionGoal.h" + +namespace control_msgs +{ + + class SingleJointPositionActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef control_msgs::SingleJointPositionGoal _goal_type; + _goal_type goal; + + SingleJointPositionActionGoal(): + header(), + goal_id(), + goal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->goal_id.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->goal_id.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/SingleJointPositionActionGoal"; }; + const char * getMD5(){ return "4b0d3d091471663e17749c1d0db90f61"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionActionResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..ef99cd8ff3a1db8c3648312f9c13b9255bb0dd3e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_SingleJointPositionActionResult_h +#define _ROS_control_msgs_SingleJointPositionActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/SingleJointPositionResult.h" + +namespace control_msgs +{ + + class SingleJointPositionActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::SingleJointPositionResult _result_type; + _result_type result; + + SingleJointPositionActionResult(): + header(), + status(), + result() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->result.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->result.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/SingleJointPositionActionResult"; }; + const char * getMD5(){ return "1eb06eeff08fa7ea874431638cb52332"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..cbf8fa4dc0b4ff3a630157bbf11bcfd6f92bca06 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionFeedback.h @@ -0,0 +1,140 @@ +#ifndef _ROS_control_msgs_SingleJointPositionFeedback_h +#define _ROS_control_msgs_SingleJointPositionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace control_msgs +{ + + class SingleJointPositionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef double _position_type; + _position_type position; + typedef double _velocity_type; + _velocity_type velocity; + typedef double _error_type; + _error_type error; + + SingleJointPositionFeedback(): + header(), + position(0), + velocity(0), + error(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_position; + u_position.real = this->position; + *(outbuffer + offset + 0) = (u_position.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_position.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_position.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_position.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_position.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_position.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_position.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_position.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_velocity; + u_velocity.real = this->velocity; + *(outbuffer + offset + 0) = (u_velocity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_velocity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_velocity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_velocity.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_velocity.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_velocity.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_velocity.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_velocity.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->velocity); + union { + double real; + uint64_t base; + } u_error; + u_error.real = this->error; + *(outbuffer + offset + 0) = (u_error.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_error.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_error.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_error.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_error.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_error.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_error.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_error.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->error); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_position; + u_position.base = 0; + u_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->position = u_position.real; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_velocity; + u_velocity.base = 0; + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->velocity = u_velocity.real; + offset += sizeof(this->velocity); + union { + double real; + uint64_t base; + } u_error; + u_error.base = 0; + u_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->error = u_error.real; + offset += sizeof(this->error); + return offset; + } + + const char * getType(){ return "control_msgs/SingleJointPositionFeedback"; }; + const char * getMD5(){ return "8cee65610a3d08e0a1bded82f146f1fd"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..7261176297aea0181e9c8e4eb3178d0555b7cbc0 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionGoal.h @@ -0,0 +1,126 @@ +#ifndef _ROS_control_msgs_SingleJointPositionGoal_h +#define _ROS_control_msgs_SingleJointPositionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/duration.h" + +namespace control_msgs +{ + + class SingleJointPositionGoal : public ros::Msg + { + public: + typedef double _position_type; + _position_type position; + typedef ros::Duration _min_duration_type; + _min_duration_type min_duration; + typedef double _max_velocity_type; + _max_velocity_type max_velocity; + + SingleJointPositionGoal(): + position(0), + min_duration(), + max_velocity(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_position; + u_position.real = this->position; + *(outbuffer + offset + 0) = (u_position.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_position.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_position.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_position.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_position.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_position.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_position.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_position.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position); + *(outbuffer + offset + 0) = (this->min_duration.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->min_duration.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->min_duration.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->min_duration.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->min_duration.sec); + *(outbuffer + offset + 0) = (this->min_duration.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->min_duration.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->min_duration.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->min_duration.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->min_duration.nsec); + union { + double real; + uint64_t base; + } u_max_velocity; + u_max_velocity.real = this->max_velocity; + *(outbuffer + offset + 0) = (u_max_velocity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_velocity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_velocity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_velocity.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max_velocity.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max_velocity.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max_velocity.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max_velocity.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max_velocity); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_position; + u_position.base = 0; + u_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->position = u_position.real; + offset += sizeof(this->position); + this->min_duration.sec = ((uint32_t) (*(inbuffer + offset))); + this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->min_duration.sec); + this->min_duration.nsec = ((uint32_t) (*(inbuffer + offset))); + this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->min_duration.nsec); + union { + double real; + uint64_t base; + } u_max_velocity; + u_max_velocity.base = 0; + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max_velocity = u_max_velocity.real; + offset += sizeof(this->max_velocity); + return offset; + } + + const char * getType(){ return "control_msgs/SingleJointPositionGoal"; }; + const char * getMD5(){ return "fbaaa562a23a013fd5053e5f72cbb35c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..7593425910d62bd10c7958e2eb57e86705111ef9 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionResult.h @@ -0,0 +1,38 @@ +#ifndef _ROS_control_msgs_SingleJointPositionResult_h +#define _ROS_control_msgs_SingleJointPositionResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class SingleJointPositionResult : public ros::Msg + { + public: + + SingleJointPositionResult() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return "control_msgs/SingleJointPositionResult"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_toolbox/SetPidGains.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_toolbox/SetPidGains.h new file mode 100644 index 0000000000000000000000000000000000000000..709d825d139dc7e2147243584c72469d780eb502 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/control_toolbox/SetPidGains.h @@ -0,0 +1,216 @@ +#ifndef _ROS_SERVICE_SetPidGains_h +#define _ROS_SERVICE_SetPidGains_h +#include +#include +#include +#include "ros/msg.h" + +namespace control_toolbox +{ + +static const char SETPIDGAINS[] = "control_toolbox/SetPidGains"; + + class SetPidGainsRequest : public ros::Msg + { + public: + typedef double _p_type; + _p_type p; + typedef double _i_type; + _i_type i; + typedef double _d_type; + _d_type d; + typedef double _i_clamp_type; + _i_clamp_type i_clamp; + typedef bool _antiwindup_type; + _antiwindup_type antiwindup; + + SetPidGainsRequest(): + p(0), + i(0), + d(0), + i_clamp(0), + antiwindup(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_p; + u_p.real = this->p; + *(outbuffer + offset + 0) = (u_p.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_p.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_p.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_p.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_p.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_p.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_p.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_p.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->p); + union { + double real; + uint64_t base; + } u_i; + u_i.real = this->i; + *(outbuffer + offset + 0) = (u_i.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i); + union { + double real; + uint64_t base; + } u_d; + u_d.real = this->d; + *(outbuffer + offset + 0) = (u_d.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_d.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_d.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_d.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_d.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_d.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_d.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_d.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->d); + union { + double real; + uint64_t base; + } u_i_clamp; + u_i_clamp.real = this->i_clamp; + *(outbuffer + offset + 0) = (u_i_clamp.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i_clamp.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i_clamp.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i_clamp.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i_clamp.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i_clamp.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i_clamp.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i_clamp.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i_clamp); + union { + bool real; + uint8_t base; + } u_antiwindup; + u_antiwindup.real = this->antiwindup; + *(outbuffer + offset + 0) = (u_antiwindup.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->antiwindup); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_p; + u_p.base = 0; + u_p.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->p = u_p.real; + offset += sizeof(this->p); + union { + double real; + uint64_t base; + } u_i; + u_i.base = 0; + u_i.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i = u_i.real; + offset += sizeof(this->i); + union { + double real; + uint64_t base; + } u_d; + u_d.base = 0; + u_d.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->d = u_d.real; + offset += sizeof(this->d); + union { + double real; + uint64_t base; + } u_i_clamp; + u_i_clamp.base = 0; + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i_clamp = u_i_clamp.real; + offset += sizeof(this->i_clamp); + union { + bool real; + uint8_t base; + } u_antiwindup; + u_antiwindup.base = 0; + u_antiwindup.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->antiwindup = u_antiwindup.real; + offset += sizeof(this->antiwindup); + return offset; + } + + const char * getType(){ return SETPIDGAINS; }; + const char * getMD5(){ return "4a43159879643e60937bf2893b633607"; }; + + }; + + class SetPidGainsResponse : public ros::Msg + { + public: + + SetPidGainsResponse() + { + } + + 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 SETPIDGAINS; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class SetPidGains { + public: + typedef SetPidGainsRequest Request; + typedef SetPidGainsResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ControllerState.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ControllerState.h new file mode 100644 index 0000000000000000000000000000000000000000..ea728c4ee7e7cd9b12c7db0f82a13ca9a2653434 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ControllerState.h @@ -0,0 +1,115 @@ +#ifndef _ROS_controller_manager_msgs_ControllerState_h +#define _ROS_controller_manager_msgs_ControllerState_h + +#include +#include +#include +#include "ros/msg.h" +#include "controller_manager_msgs/HardwareInterfaceResources.h" + +namespace controller_manager_msgs +{ + + class ControllerState : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _state_type; + _state_type state; + typedef const char* _type_type; + _type_type type; + uint32_t claimed_resources_length; + typedef controller_manager_msgs::HardwareInterfaceResources _claimed_resources_type; + _claimed_resources_type st_claimed_resources; + _claimed_resources_type * claimed_resources; + + ControllerState(): + name(""), + state(""), + type(""), + claimed_resources_length(0), claimed_resources(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_state = strlen(this->state); + varToArr(outbuffer + offset, length_state); + offset += 4; + memcpy(outbuffer + offset, this->state, length_state); + offset += length_state; + uint32_t length_type = strlen(this->type); + varToArr(outbuffer + offset, length_type); + offset += 4; + memcpy(outbuffer + offset, this->type, length_type); + offset += length_type; + *(outbuffer + offset + 0) = (this->claimed_resources_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->claimed_resources_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->claimed_resources_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->claimed_resources_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->claimed_resources_length); + for( uint32_t i = 0; i < claimed_resources_length; i++){ + offset += this->claimed_resources[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_state; + arrToVar(length_state, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_state; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_state-1]=0; + this->state = (char *)(inbuffer + offset-1); + offset += length_state; + uint32_t length_type; + arrToVar(length_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type-1]=0; + this->type = (char *)(inbuffer + offset-1); + offset += length_type; + uint32_t claimed_resources_lengthT = ((uint32_t) (*(inbuffer + offset))); + claimed_resources_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + claimed_resources_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + claimed_resources_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->claimed_resources_length); + if(claimed_resources_lengthT > claimed_resources_length) + this->claimed_resources = (controller_manager_msgs::HardwareInterfaceResources*)realloc(this->claimed_resources, claimed_resources_lengthT * sizeof(controller_manager_msgs::HardwareInterfaceResources)); + claimed_resources_length = claimed_resources_lengthT; + for( uint32_t i = 0; i < claimed_resources_length; i++){ + offset += this->st_claimed_resources.deserialize(inbuffer + offset); + memcpy( &(this->claimed_resources[i]), &(this->st_claimed_resources), sizeof(controller_manager_msgs::HardwareInterfaceResources)); + } + return offset; + } + + const char * getType(){ return "controller_manager_msgs/ControllerState"; }; + const char * getMD5(){ return "aeb6b261d97793ab74099a3740245272"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ControllerStatistics.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ControllerStatistics.h new file mode 100644 index 0000000000000000000000000000000000000000..c62773c538e5afba7c15e362278f6f861c9c27c8 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ControllerStatistics.h @@ -0,0 +1,231 @@ +#ifndef _ROS_controller_manager_msgs_ControllerStatistics_h +#define _ROS_controller_manager_msgs_ControllerStatistics_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" +#include "ros/duration.h" + +namespace controller_manager_msgs +{ + + class ControllerStatistics : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _type_type; + _type_type type; + typedef ros::Time _timestamp_type; + _timestamp_type timestamp; + typedef bool _running_type; + _running_type running; + typedef ros::Duration _max_time_type; + _max_time_type max_time; + typedef ros::Duration _mean_time_type; + _mean_time_type mean_time; + typedef ros::Duration _variance_time_type; + _variance_time_type variance_time; + typedef int32_t _num_control_loop_overruns_type; + _num_control_loop_overruns_type num_control_loop_overruns; + typedef ros::Time _time_last_control_loop_overrun_type; + _time_last_control_loop_overrun_type time_last_control_loop_overrun; + + ControllerStatistics(): + name(""), + type(""), + timestamp(), + running(0), + max_time(), + mean_time(), + variance_time(), + num_control_loop_overruns(0), + time_last_control_loop_overrun() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_type = strlen(this->type); + varToArr(outbuffer + offset, length_type); + offset += 4; + memcpy(outbuffer + offset, this->type, length_type); + offset += length_type; + *(outbuffer + offset + 0) = (this->timestamp.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timestamp.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timestamp.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timestamp.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timestamp.sec); + *(outbuffer + offset + 0) = (this->timestamp.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timestamp.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timestamp.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timestamp.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timestamp.nsec); + union { + bool real; + uint8_t base; + } u_running; + u_running.real = this->running; + *(outbuffer + offset + 0) = (u_running.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->running); + *(outbuffer + offset + 0) = (this->max_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->max_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->max_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->max_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->max_time.sec); + *(outbuffer + offset + 0) = (this->max_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->max_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->max_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->max_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->max_time.nsec); + *(outbuffer + offset + 0) = (this->mean_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->mean_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->mean_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->mean_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->mean_time.sec); + *(outbuffer + offset + 0) = (this->mean_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->mean_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->mean_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->mean_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->mean_time.nsec); + *(outbuffer + offset + 0) = (this->variance_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->variance_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->variance_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->variance_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->variance_time.sec); + *(outbuffer + offset + 0) = (this->variance_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->variance_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->variance_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->variance_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->variance_time.nsec); + union { + int32_t real; + uint32_t base; + } u_num_control_loop_overruns; + u_num_control_loop_overruns.real = this->num_control_loop_overruns; + *(outbuffer + offset + 0) = (u_num_control_loop_overruns.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_num_control_loop_overruns.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_num_control_loop_overruns.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_num_control_loop_overruns.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->num_control_loop_overruns); + *(outbuffer + offset + 0) = (this->time_last_control_loop_overrun.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_last_control_loop_overrun.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_last_control_loop_overrun.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_last_control_loop_overrun.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_last_control_loop_overrun.sec); + *(outbuffer + offset + 0) = (this->time_last_control_loop_overrun.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_last_control_loop_overrun.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_last_control_loop_overrun.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_last_control_loop_overrun.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_last_control_loop_overrun.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_type; + arrToVar(length_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type-1]=0; + this->type = (char *)(inbuffer + offset-1); + offset += length_type; + this->timestamp.sec = ((uint32_t) (*(inbuffer + offset))); + this->timestamp.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timestamp.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timestamp.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timestamp.sec); + this->timestamp.nsec = ((uint32_t) (*(inbuffer + offset))); + this->timestamp.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timestamp.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timestamp.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timestamp.nsec); + union { + bool real; + uint8_t base; + } u_running; + u_running.base = 0; + u_running.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->running = u_running.real; + offset += sizeof(this->running); + this->max_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->max_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->max_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->max_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->max_time.sec); + this->max_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->max_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->max_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->max_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->max_time.nsec); + this->mean_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->mean_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->mean_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->mean_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->mean_time.sec); + this->mean_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->mean_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->mean_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->mean_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->mean_time.nsec); + this->variance_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->variance_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->variance_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->variance_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->variance_time.sec); + this->variance_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->variance_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->variance_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->variance_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->variance_time.nsec); + union { + int32_t real; + uint32_t base; + } u_num_control_loop_overruns; + u_num_control_loop_overruns.base = 0; + u_num_control_loop_overruns.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_num_control_loop_overruns.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_num_control_loop_overruns.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_num_control_loop_overruns.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->num_control_loop_overruns = u_num_control_loop_overruns.real; + offset += sizeof(this->num_control_loop_overruns); + this->time_last_control_loop_overrun.sec = ((uint32_t) (*(inbuffer + offset))); + this->time_last_control_loop_overrun.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_last_control_loop_overrun.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_last_control_loop_overrun.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_last_control_loop_overrun.sec); + this->time_last_control_loop_overrun.nsec = ((uint32_t) (*(inbuffer + offset))); + this->time_last_control_loop_overrun.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_last_control_loop_overrun.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_last_control_loop_overrun.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_last_control_loop_overrun.nsec); + return offset; + } + + const char * getType(){ return "controller_manager_msgs/ControllerStatistics"; }; + const char * getMD5(){ return "697780c372c8d8597a1436d0e2ad3ba8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ControllersStatistics.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ControllersStatistics.h new file mode 100644 index 0000000000000000000000000000000000000000..a3c0503787ce679540031b05df59893781be1ed1 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ControllersStatistics.h @@ -0,0 +1,70 @@ +#ifndef _ROS_controller_manager_msgs_ControllersStatistics_h +#define _ROS_controller_manager_msgs_ControllersStatistics_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "controller_manager_msgs/ControllerStatistics.h" + +namespace controller_manager_msgs +{ + + class ControllersStatistics : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t controller_length; + typedef controller_manager_msgs::ControllerStatistics _controller_type; + _controller_type st_controller; + _controller_type * controller; + + ControllersStatistics(): + header(), + controller_length(0), controller(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->controller_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->controller_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->controller_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->controller_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->controller_length); + for( uint32_t i = 0; i < controller_length; i++){ + offset += this->controller[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t controller_lengthT = ((uint32_t) (*(inbuffer + offset))); + controller_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + controller_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + controller_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->controller_length); + if(controller_lengthT > controller_length) + this->controller = (controller_manager_msgs::ControllerStatistics*)realloc(this->controller, controller_lengthT * sizeof(controller_manager_msgs::ControllerStatistics)); + controller_length = controller_lengthT; + for( uint32_t i = 0; i < controller_length; i++){ + offset += this->st_controller.deserialize(inbuffer + offset); + memcpy( &(this->controller[i]), &(this->st_controller), sizeof(controller_manager_msgs::ControllerStatistics)); + } + return offset; + } + + const char * getType(){ return "controller_manager_msgs/ControllersStatistics"; }; + const char * getMD5(){ return "a154c347736773e3700d1719105df29d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/HardwareInterfaceResources.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/HardwareInterfaceResources.h new file mode 100644 index 0000000000000000000000000000000000000000..5b574c1da509a5681fd58c280565062562012911 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/HardwareInterfaceResources.h @@ -0,0 +1,92 @@ +#ifndef _ROS_controller_manager_msgs_HardwareInterfaceResources_h +#define _ROS_controller_manager_msgs_HardwareInterfaceResources_h + +#include +#include +#include +#include "ros/msg.h" + +namespace controller_manager_msgs +{ + + class HardwareInterfaceResources : public ros::Msg + { + public: + typedef const char* _hardware_interface_type; + _hardware_interface_type hardware_interface; + uint32_t resources_length; + typedef char* _resources_type; + _resources_type st_resources; + _resources_type * resources; + + HardwareInterfaceResources(): + hardware_interface(""), + resources_length(0), resources(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_hardware_interface = strlen(this->hardware_interface); + varToArr(outbuffer + offset, length_hardware_interface); + offset += 4; + memcpy(outbuffer + offset, this->hardware_interface, length_hardware_interface); + offset += length_hardware_interface; + *(outbuffer + offset + 0) = (this->resources_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->resources_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->resources_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->resources_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->resources_length); + for( uint32_t i = 0; i < resources_length; i++){ + uint32_t length_resourcesi = strlen(this->resources[i]); + varToArr(outbuffer + offset, length_resourcesi); + offset += 4; + memcpy(outbuffer + offset, this->resources[i], length_resourcesi); + offset += length_resourcesi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_hardware_interface; + arrToVar(length_hardware_interface, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_hardware_interface; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_hardware_interface-1]=0; + this->hardware_interface = (char *)(inbuffer + offset-1); + offset += length_hardware_interface; + uint32_t resources_lengthT = ((uint32_t) (*(inbuffer + offset))); + resources_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + resources_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + resources_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->resources_length); + if(resources_lengthT > resources_length) + this->resources = (char**)realloc(this->resources, resources_lengthT * sizeof(char*)); + resources_length = resources_lengthT; + for( uint32_t i = 0; i < resources_length; i++){ + uint32_t length_st_resources; + arrToVar(length_st_resources, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_resources; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_resources-1]=0; + this->st_resources = (char *)(inbuffer + offset-1); + offset += length_st_resources; + memcpy( &(this->resources[i]), &(this->st_resources), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return "controller_manager_msgs/HardwareInterfaceResources"; }; + const char * getMD5(){ return "f25b55cbf1d1f76e82e5ec9e83f76258"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ListControllerTypes.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ListControllerTypes.h new file mode 100644 index 0000000000000000000000000000000000000000..45097f8fb0edb45459f200dde5f30a8953574cbc --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ListControllerTypes.h @@ -0,0 +1,144 @@ +#ifndef _ROS_SERVICE_ListControllerTypes_h +#define _ROS_SERVICE_ListControllerTypes_h +#include +#include +#include +#include "ros/msg.h" + +namespace controller_manager_msgs +{ + +static const char LISTCONTROLLERTYPES[] = "controller_manager_msgs/ListControllerTypes"; + + class ListControllerTypesRequest : public ros::Msg + { + public: + + ListControllerTypesRequest() + { + } + + 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 LISTCONTROLLERTYPES; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class ListControllerTypesResponse : public ros::Msg + { + public: + uint32_t types_length; + typedef char* _types_type; + _types_type st_types; + _types_type * types; + uint32_t base_classes_length; + typedef char* _base_classes_type; + _base_classes_type st_base_classes; + _base_classes_type * base_classes; + + ListControllerTypesResponse(): + types_length(0), types(NULL), + base_classes_length(0), base_classes(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->types_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->types_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->types_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->types_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->types_length); + for( uint32_t i = 0; i < types_length; i++){ + uint32_t length_typesi = strlen(this->types[i]); + varToArr(outbuffer + offset, length_typesi); + offset += 4; + memcpy(outbuffer + offset, this->types[i], length_typesi); + offset += length_typesi; + } + *(outbuffer + offset + 0) = (this->base_classes_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->base_classes_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->base_classes_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->base_classes_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->base_classes_length); + for( uint32_t i = 0; i < base_classes_length; i++){ + uint32_t length_base_classesi = strlen(this->base_classes[i]); + varToArr(outbuffer + offset, length_base_classesi); + offset += 4; + memcpy(outbuffer + offset, this->base_classes[i], length_base_classesi); + offset += length_base_classesi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t types_lengthT = ((uint32_t) (*(inbuffer + offset))); + types_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + types_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + types_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->types_length); + if(types_lengthT > types_length) + this->types = (char**)realloc(this->types, types_lengthT * sizeof(char*)); + types_length = types_lengthT; + for( uint32_t i = 0; i < types_length; i++){ + uint32_t length_st_types; + arrToVar(length_st_types, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_types; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_types-1]=0; + this->st_types = (char *)(inbuffer + offset-1); + offset += length_st_types; + memcpy( &(this->types[i]), &(this->st_types), sizeof(char*)); + } + uint32_t base_classes_lengthT = ((uint32_t) (*(inbuffer + offset))); + base_classes_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + base_classes_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + base_classes_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->base_classes_length); + if(base_classes_lengthT > base_classes_length) + this->base_classes = (char**)realloc(this->base_classes, base_classes_lengthT * sizeof(char*)); + base_classes_length = base_classes_lengthT; + for( uint32_t i = 0; i < base_classes_length; i++){ + uint32_t length_st_base_classes; + arrToVar(length_st_base_classes, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_base_classes; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_base_classes-1]=0; + this->st_base_classes = (char *)(inbuffer + offset-1); + offset += length_st_base_classes; + memcpy( &(this->base_classes[i]), &(this->st_base_classes), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return LISTCONTROLLERTYPES; }; + const char * getMD5(){ return "c1d4cd11aefa9f97ba4aeb5b33987f4e"; }; + + }; + + class ListControllerTypes { + public: + typedef ListControllerTypesRequest Request; + typedef ListControllerTypesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ListControllers.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ListControllers.h new file mode 100644 index 0000000000000000000000000000000000000000..f0d2a5efca596c0a91d564dcfb86aa206be4e03b --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ListControllers.h @@ -0,0 +1,96 @@ +#ifndef _ROS_SERVICE_ListControllers_h +#define _ROS_SERVICE_ListControllers_h +#include +#include +#include +#include "ros/msg.h" +#include "controller_manager_msgs/ControllerState.h" + +namespace controller_manager_msgs +{ + +static const char LISTCONTROLLERS[] = "controller_manager_msgs/ListControllers"; + + class ListControllersRequest : public ros::Msg + { + public: + + ListControllersRequest() + { + } + + 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 LISTCONTROLLERS; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class ListControllersResponse : public ros::Msg + { + public: + uint32_t controller_length; + typedef controller_manager_msgs::ControllerState _controller_type; + _controller_type st_controller; + _controller_type * controller; + + ListControllersResponse(): + controller_length(0), controller(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->controller_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->controller_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->controller_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->controller_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->controller_length); + for( uint32_t i = 0; i < controller_length; i++){ + offset += this->controller[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t controller_lengthT = ((uint32_t) (*(inbuffer + offset))); + controller_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + controller_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + controller_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->controller_length); + if(controller_lengthT > controller_length) + this->controller = (controller_manager_msgs::ControllerState*)realloc(this->controller, controller_lengthT * sizeof(controller_manager_msgs::ControllerState)); + controller_length = controller_lengthT; + for( uint32_t i = 0; i < controller_length; i++){ + offset += this->st_controller.deserialize(inbuffer + offset); + memcpy( &(this->controller[i]), &(this->st_controller), sizeof(controller_manager_msgs::ControllerState)); + } + return offset; + } + + const char * getType(){ return LISTCONTROLLERS; }; + const char * getMD5(){ return "1341feb2e63fa791f855565d0da950d8"; }; + + }; + + class ListControllers { + public: + typedef ListControllersRequest Request; + typedef ListControllersResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/LoadController.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/LoadController.h new file mode 100644 index 0000000000000000000000000000000000000000..98d018fb3e6515ba2fb3aa53a08343169defe531 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/LoadController.h @@ -0,0 +1,105 @@ +#ifndef _ROS_SERVICE_LoadController_h +#define _ROS_SERVICE_LoadController_h +#include +#include +#include +#include "ros/msg.h" + +namespace controller_manager_msgs +{ + +static const char LOADCONTROLLER[] = "controller_manager_msgs/LoadController"; + + class LoadControllerRequest : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + + LoadControllerRequest(): + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return LOADCONTROLLER; }; + const char * getMD5(){ return "c1f3d28f1b044c871e6eff2e9fc3c667"; }; + + }; + + class LoadControllerResponse : public ros::Msg + { + public: + typedef bool _ok_type; + _ok_type ok; + + LoadControllerResponse(): + ok(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.real = this->ok; + *(outbuffer + offset + 0) = (u_ok.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->ok); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.base = 0; + u_ok.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->ok = u_ok.real; + offset += sizeof(this->ok); + return offset; + } + + const char * getType(){ return LOADCONTROLLER; }; + const char * getMD5(){ return "6f6da3883749771fac40d6deb24a8c02"; }; + + }; + + class LoadController { + public: + typedef LoadControllerRequest Request; + typedef LoadControllerResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ReloadControllerLibraries.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ReloadControllerLibraries.h new file mode 100644 index 0000000000000000000000000000000000000000..279de974c7966f891505acef7ce9e21204df538d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ReloadControllerLibraries.h @@ -0,0 +1,106 @@ +#ifndef _ROS_SERVICE_ReloadControllerLibraries_h +#define _ROS_SERVICE_ReloadControllerLibraries_h +#include +#include +#include +#include "ros/msg.h" + +namespace controller_manager_msgs +{ + +static const char RELOADCONTROLLERLIBRARIES[] = "controller_manager_msgs/ReloadControllerLibraries"; + + class ReloadControllerLibrariesRequest : public ros::Msg + { + public: + typedef bool _force_kill_type; + _force_kill_type force_kill; + + ReloadControllerLibrariesRequest(): + force_kill(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_force_kill; + u_force_kill.real = this->force_kill; + *(outbuffer + offset + 0) = (u_force_kill.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->force_kill); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_force_kill; + u_force_kill.base = 0; + u_force_kill.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->force_kill = u_force_kill.real; + offset += sizeof(this->force_kill); + return offset; + } + + const char * getType(){ return RELOADCONTROLLERLIBRARIES; }; + const char * getMD5(){ return "18442b59be9479097f11c543bddbac62"; }; + + }; + + class ReloadControllerLibrariesResponse : public ros::Msg + { + public: + typedef bool _ok_type; + _ok_type ok; + + ReloadControllerLibrariesResponse(): + ok(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.real = this->ok; + *(outbuffer + offset + 0) = (u_ok.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->ok); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.base = 0; + u_ok.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->ok = u_ok.real; + offset += sizeof(this->ok); + return offset; + } + + const char * getType(){ return RELOADCONTROLLERLIBRARIES; }; + const char * getMD5(){ return "6f6da3883749771fac40d6deb24a8c02"; }; + + }; + + class ReloadControllerLibraries { + public: + typedef ReloadControllerLibrariesRequest Request; + typedef ReloadControllerLibrariesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/SwitchController.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/SwitchController.h new file mode 100644 index 0000000000000000000000000000000000000000..9b76c735448f113a0f8d3b2a636a7f3008015d31 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/SwitchController.h @@ -0,0 +1,188 @@ +#ifndef _ROS_SERVICE_SwitchController_h +#define _ROS_SERVICE_SwitchController_h +#include +#include +#include +#include "ros/msg.h" + +namespace controller_manager_msgs +{ + +static const char SWITCHCONTROLLER[] = "controller_manager_msgs/SwitchController"; + + class SwitchControllerRequest : public ros::Msg + { + public: + uint32_t start_controllers_length; + typedef char* _start_controllers_type; + _start_controllers_type st_start_controllers; + _start_controllers_type * start_controllers; + uint32_t stop_controllers_length; + typedef char* _stop_controllers_type; + _stop_controllers_type st_stop_controllers; + _stop_controllers_type * stop_controllers; + typedef int32_t _strictness_type; + _strictness_type strictness; + enum { BEST_EFFORT = 1 }; + enum { STRICT = 2 }; + + SwitchControllerRequest(): + start_controllers_length(0), start_controllers(NULL), + stop_controllers_length(0), stop_controllers(NULL), + strictness(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->start_controllers_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->start_controllers_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->start_controllers_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->start_controllers_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->start_controllers_length); + for( uint32_t i = 0; i < start_controllers_length; i++){ + uint32_t length_start_controllersi = strlen(this->start_controllers[i]); + varToArr(outbuffer + offset, length_start_controllersi); + offset += 4; + memcpy(outbuffer + offset, this->start_controllers[i], length_start_controllersi); + offset += length_start_controllersi; + } + *(outbuffer + offset + 0) = (this->stop_controllers_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stop_controllers_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stop_controllers_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stop_controllers_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->stop_controllers_length); + for( uint32_t i = 0; i < stop_controllers_length; i++){ + uint32_t length_stop_controllersi = strlen(this->stop_controllers[i]); + varToArr(outbuffer + offset, length_stop_controllersi); + offset += 4; + memcpy(outbuffer + offset, this->stop_controllers[i], length_stop_controllersi); + offset += length_stop_controllersi; + } + union { + int32_t real; + uint32_t base; + } u_strictness; + u_strictness.real = this->strictness; + *(outbuffer + offset + 0) = (u_strictness.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_strictness.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_strictness.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_strictness.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->strictness); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t start_controllers_lengthT = ((uint32_t) (*(inbuffer + offset))); + start_controllers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + start_controllers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + start_controllers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->start_controllers_length); + if(start_controllers_lengthT > start_controllers_length) + this->start_controllers = (char**)realloc(this->start_controllers, start_controllers_lengthT * sizeof(char*)); + start_controllers_length = start_controllers_lengthT; + for( uint32_t i = 0; i < start_controllers_length; i++){ + uint32_t length_st_start_controllers; + arrToVar(length_st_start_controllers, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_start_controllers; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_start_controllers-1]=0; + this->st_start_controllers = (char *)(inbuffer + offset-1); + offset += length_st_start_controllers; + memcpy( &(this->start_controllers[i]), &(this->st_start_controllers), sizeof(char*)); + } + uint32_t stop_controllers_lengthT = ((uint32_t) (*(inbuffer + offset))); + stop_controllers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + stop_controllers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + stop_controllers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stop_controllers_length); + if(stop_controllers_lengthT > stop_controllers_length) + this->stop_controllers = (char**)realloc(this->stop_controllers, stop_controllers_lengthT * sizeof(char*)); + stop_controllers_length = stop_controllers_lengthT; + for( uint32_t i = 0; i < stop_controllers_length; i++){ + uint32_t length_st_stop_controllers; + arrToVar(length_st_stop_controllers, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_stop_controllers; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_stop_controllers-1]=0; + this->st_stop_controllers = (char *)(inbuffer + offset-1); + offset += length_st_stop_controllers; + memcpy( &(this->stop_controllers[i]), &(this->st_stop_controllers), sizeof(char*)); + } + union { + int32_t real; + uint32_t base; + } u_strictness; + u_strictness.base = 0; + u_strictness.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_strictness.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_strictness.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_strictness.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->strictness = u_strictness.real; + offset += sizeof(this->strictness); + return offset; + } + + const char * getType(){ return SWITCHCONTROLLER; }; + const char * getMD5(){ return "434da54adc434a5af5743ed711fd6ba1"; }; + + }; + + class SwitchControllerResponse : public ros::Msg + { + public: + typedef bool _ok_type; + _ok_type ok; + + SwitchControllerResponse(): + ok(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.real = this->ok; + *(outbuffer + offset + 0) = (u_ok.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->ok); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.base = 0; + u_ok.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->ok = u_ok.real; + offset += sizeof(this->ok); + return offset; + } + + const char * getType(){ return SWITCHCONTROLLER; }; + const char * getMD5(){ return "6f6da3883749771fac40d6deb24a8c02"; }; + + }; + + class SwitchController { + public: + typedef SwitchControllerRequest Request; + typedef SwitchControllerResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/UnloadController.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/UnloadController.h new file mode 100644 index 0000000000000000000000000000000000000000..b8bba744f9b1ddcd19d2a600ee7cb7b4030a74b5 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/controller_manager_msgs/UnloadController.h @@ -0,0 +1,105 @@ +#ifndef _ROS_SERVICE_UnloadController_h +#define _ROS_SERVICE_UnloadController_h +#include +#include +#include +#include "ros/msg.h" + +namespace controller_manager_msgs +{ + +static const char UNLOADCONTROLLER[] = "controller_manager_msgs/UnloadController"; + + class UnloadControllerRequest : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + + UnloadControllerRequest(): + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return UNLOADCONTROLLER; }; + const char * getMD5(){ return "c1f3d28f1b044c871e6eff2e9fc3c667"; }; + + }; + + class UnloadControllerResponse : public ros::Msg + { + public: + typedef bool _ok_type; + _ok_type ok; + + UnloadControllerResponse(): + ok(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.real = this->ok; + *(outbuffer + offset + 0) = (u_ok.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->ok); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.base = 0; + u_ok.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->ok = u_ok.real; + offset += sizeof(this->ok); + return offset; + } + + const char * getType(){ return UNLOADCONTROLLER; }; + const char * getMD5(){ return "6f6da3883749771fac40d6deb24a8c02"; }; + + }; + + class UnloadController { + public: + typedef UnloadControllerRequest Request; + typedef UnloadControllerResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/costmap_2d/VoxelGrid.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/costmap_2d/VoxelGrid.h new file mode 100644 index 0000000000000000000000000000000000000000..2fa9dce9373f65674a226786c4e49073b15898fa --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/costmap_2d/VoxelGrid.h @@ -0,0 +1,128 @@ +#ifndef _ROS_costmap_2d_VoxelGrid_h +#define _ROS_costmap_2d_VoxelGrid_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Point32.h" +#include "geometry_msgs/Vector3.h" + +namespace costmap_2d +{ + + class VoxelGrid : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t data_length; + typedef uint32_t _data_type; + _data_type st_data; + _data_type * data; + typedef geometry_msgs::Point32 _origin_type; + _origin_type origin; + typedef geometry_msgs::Vector3 _resolutions_type; + _resolutions_type resolutions; + typedef uint32_t _size_x_type; + _size_x_type size_x; + typedef uint32_t _size_y_type; + _size_y_type size_y; + typedef uint32_t _size_z_type; + _size_z_type size_z; + + VoxelGrid(): + header(), + data_length(0), data(NULL), + origin(), + resolutions(), + size_x(0), + size_y(0), + size_z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data[i] >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data[i] >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data[i] >> (8 * 3)) & 0xFF; + offset += sizeof(this->data[i]); + } + offset += this->origin.serialize(outbuffer + offset); + offset += this->resolutions.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->size_x >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->size_x >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->size_x >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->size_x >> (8 * 3)) & 0xFF; + offset += sizeof(this->size_x); + *(outbuffer + offset + 0) = (this->size_y >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->size_y >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->size_y >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->size_y >> (8 * 3)) & 0xFF; + offset += sizeof(this->size_y); + *(outbuffer + offset + 0) = (this->size_z >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->size_z >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->size_z >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->size_z >> (8 * 3)) & 0xFF; + offset += sizeof(this->size_z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint32_t*)realloc(this->data, data_lengthT * sizeof(uint32_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint32_t) (*(inbuffer + offset))); + this->st_data |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->st_data |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->st_data |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint32_t)); + } + offset += this->origin.deserialize(inbuffer + offset); + offset += this->resolutions.deserialize(inbuffer + offset); + this->size_x = ((uint32_t) (*(inbuffer + offset))); + this->size_x |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->size_x |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->size_x |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->size_x); + this->size_y = ((uint32_t) (*(inbuffer + offset))); + this->size_y |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->size_y |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->size_y |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->size_y); + this->size_z = ((uint32_t) (*(inbuffer + offset))); + this->size_z |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->size_z |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->size_z |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->size_z); + return offset; + } + + const char * getType(){ return "costmap_2d/VoxelGrid"; }; + const char * getMD5(){ return "48a040827e1322073d78ece5a497029c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/diagnostic_msgs/AddDiagnostics.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/diagnostic_msgs/AddDiagnostics.h new file mode 100644 index 0000000000000000000000000000000000000000..4180098fdab258ea2b6702ab40c39ee263fe8372 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/diagnostic_msgs/AddDiagnostics.h @@ -0,0 +1,122 @@ +#ifndef _ROS_SERVICE_AddDiagnostics_h +#define _ROS_SERVICE_AddDiagnostics_h +#include +#include +#include +#include "ros/msg.h" + +namespace diagnostic_msgs +{ + +static const char ADDDIAGNOSTICS[] = "diagnostic_msgs/AddDiagnostics"; + + class AddDiagnosticsRequest : public ros::Msg + { + public: + typedef const char* _load_namespace_type; + _load_namespace_type load_namespace; + + AddDiagnosticsRequest(): + load_namespace("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_load_namespace = strlen(this->load_namespace); + varToArr(outbuffer + offset, length_load_namespace); + offset += 4; + memcpy(outbuffer + offset, this->load_namespace, length_load_namespace); + offset += length_load_namespace; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_load_namespace; + arrToVar(length_load_namespace, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_load_namespace; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_load_namespace-1]=0; + this->load_namespace = (char *)(inbuffer + offset-1); + offset += length_load_namespace; + return offset; + } + + const char * getType(){ return ADDDIAGNOSTICS; }; + const char * getMD5(){ return "c26cf6e164288fbc6050d74f838bcdf0"; }; + + }; + + class AddDiagnosticsResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _message_type; + _message_type message; + + AddDiagnosticsResponse(): + success(0), + message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_message = strlen(this->message); + varToArr(outbuffer + offset, length_message); + offset += 4; + memcpy(outbuffer + offset, this->message, length_message); + offset += length_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_message; + arrToVar(length_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message-1]=0; + this->message = (char *)(inbuffer + offset-1); + offset += length_message; + return offset; + } + + const char * getType(){ return ADDDIAGNOSTICS; }; + const char * getMD5(){ return "937c9679a518e3a18d831e57125ea522"; }; + + }; + + class AddDiagnostics { + public: + typedef AddDiagnosticsRequest Request; + typedef AddDiagnosticsResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/diagnostic_msgs/DiagnosticArray.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/diagnostic_msgs/DiagnosticArray.h new file mode 100644 index 0000000000000000000000000000000000000000..1deb7430badb176efcd39ebbd3265bc02d7fead8 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/diagnostic_msgs/DiagnosticArray.h @@ -0,0 +1,70 @@ +#ifndef _ROS_diagnostic_msgs_DiagnosticArray_h +#define _ROS_diagnostic_msgs_DiagnosticArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "diagnostic_msgs/DiagnosticStatus.h" + +namespace diagnostic_msgs +{ + + class DiagnosticArray : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t status_length; + typedef diagnostic_msgs::DiagnosticStatus _status_type; + _status_type st_status; + _status_type * status; + + DiagnosticArray(): + header(), + status_length(0), status(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->status_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->status_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->status_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->status_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->status_length); + for( uint32_t i = 0; i < status_length; i++){ + offset += this->status[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t status_lengthT = ((uint32_t) (*(inbuffer + offset))); + status_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + status_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + status_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->status_length); + if(status_lengthT > status_length) + this->status = (diagnostic_msgs::DiagnosticStatus*)realloc(this->status, status_lengthT * sizeof(diagnostic_msgs::DiagnosticStatus)); + status_length = status_lengthT; + for( uint32_t i = 0; i < status_length; i++){ + offset += this->st_status.deserialize(inbuffer + offset); + memcpy( &(this->status[i]), &(this->st_status), sizeof(diagnostic_msgs::DiagnosticStatus)); + } + return offset; + } + + const char * getType(){ return "diagnostic_msgs/DiagnosticArray"; }; + const char * getMD5(){ return "60810da900de1dd6ddd437c3503511da"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/diagnostic_msgs/DiagnosticStatus.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/diagnostic_msgs/DiagnosticStatus.h new file mode 100644 index 0000000000000000000000000000000000000000..490c16337ff4d1ca2cc5d0bc7fd497bc0010e0a7 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/diagnostic_msgs/DiagnosticStatus.h @@ -0,0 +1,137 @@ +#ifndef _ROS_diagnostic_msgs_DiagnosticStatus_h +#define _ROS_diagnostic_msgs_DiagnosticStatus_h + +#include +#include +#include +#include "ros/msg.h" +#include "diagnostic_msgs/KeyValue.h" + +namespace diagnostic_msgs +{ + + class DiagnosticStatus : public ros::Msg + { + public: + typedef int8_t _level_type; + _level_type level; + typedef const char* _name_type; + _name_type name; + typedef const char* _message_type; + _message_type message; + typedef const char* _hardware_id_type; + _hardware_id_type hardware_id; + uint32_t values_length; + typedef diagnostic_msgs::KeyValue _values_type; + _values_type st_values; + _values_type * values; + enum { OK = 0 }; + enum { WARN = 1 }; + enum { ERROR = 2 }; + enum { STALE = 3 }; + + DiagnosticStatus(): + level(0), + name(""), + message(""), + hardware_id(""), + values_length(0), values(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_level; + u_level.real = this->level; + *(outbuffer + offset + 0) = (u_level.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->level); + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_message = strlen(this->message); + varToArr(outbuffer + offset, length_message); + offset += 4; + memcpy(outbuffer + offset, this->message, length_message); + offset += length_message; + uint32_t length_hardware_id = strlen(this->hardware_id); + varToArr(outbuffer + offset, length_hardware_id); + offset += 4; + memcpy(outbuffer + offset, this->hardware_id, length_hardware_id); + offset += length_hardware_id; + *(outbuffer + offset + 0) = (this->values_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->values_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->values_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->values_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->values_length); + for( uint32_t i = 0; i < values_length; i++){ + offset += this->values[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_level; + u_level.base = 0; + u_level.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->level = u_level.real; + offset += sizeof(this->level); + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_message; + arrToVar(length_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message-1]=0; + this->message = (char *)(inbuffer + offset-1); + offset += length_message; + uint32_t length_hardware_id; + arrToVar(length_hardware_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_hardware_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_hardware_id-1]=0; + this->hardware_id = (char *)(inbuffer + offset-1); + offset += length_hardware_id; + uint32_t values_lengthT = ((uint32_t) (*(inbuffer + offset))); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->values_length); + if(values_lengthT > values_length) + this->values = (diagnostic_msgs::KeyValue*)realloc(this->values, values_lengthT * sizeof(diagnostic_msgs::KeyValue)); + values_length = values_lengthT; + for( uint32_t i = 0; i < values_length; i++){ + offset += this->st_values.deserialize(inbuffer + offset); + memcpy( &(this->values[i]), &(this->st_values), sizeof(diagnostic_msgs::KeyValue)); + } + return offset; + } + + const char * getType(){ return "diagnostic_msgs/DiagnosticStatus"; }; + const char * getMD5(){ return "d0ce08bc6e5ba34c7754f563a9cabaf1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/diagnostic_msgs/KeyValue.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/diagnostic_msgs/KeyValue.h new file mode 100644 index 0000000000000000000000000000000000000000..e94dd76ca667140b5d33d0c1ceffa3b2b774ca1f --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/diagnostic_msgs/KeyValue.h @@ -0,0 +1,72 @@ +#ifndef _ROS_diagnostic_msgs_KeyValue_h +#define _ROS_diagnostic_msgs_KeyValue_h + +#include +#include +#include +#include "ros/msg.h" + +namespace diagnostic_msgs +{ + + class KeyValue : public ros::Msg + { + public: + typedef const char* _key_type; + _key_type key; + typedef const char* _value_type; + _value_type value; + + KeyValue(): + key(""), + value("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_key = strlen(this->key); + varToArr(outbuffer + offset, length_key); + offset += 4; + memcpy(outbuffer + offset, this->key, length_key); + offset += length_key; + uint32_t length_value = strlen(this->value); + varToArr(outbuffer + offset, length_value); + offset += 4; + memcpy(outbuffer + offset, this->value, length_value); + offset += length_value; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_key; + arrToVar(length_key, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_key; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_key-1]=0; + this->key = (char *)(inbuffer + offset-1); + offset += length_key; + uint32_t length_value; + arrToVar(length_value, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_value; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_value-1]=0; + this->value = (char *)(inbuffer + offset-1); + offset += length_value; + return offset; + } + + const char * getType(){ return "diagnostic_msgs/KeyValue"; }; + const char * getMD5(){ return "cf57fdc6617a881a88c16e768132149c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/diagnostic_msgs/SelfTest.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/diagnostic_msgs/SelfTest.h new file mode 100644 index 0000000000000000000000000000000000000000..6687c6bea86789648733b0f1a1ff572b9b2b09db --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/diagnostic_msgs/SelfTest.h @@ -0,0 +1,131 @@ +#ifndef _ROS_SERVICE_SelfTest_h +#define _ROS_SERVICE_SelfTest_h +#include +#include +#include +#include "ros/msg.h" +#include "diagnostic_msgs/DiagnosticStatus.h" + +namespace diagnostic_msgs +{ + +static const char SELFTEST[] = "diagnostic_msgs/SelfTest"; + + class SelfTestRequest : public ros::Msg + { + public: + + SelfTestRequest() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return SELFTEST; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class SelfTestResponse : public ros::Msg + { + public: + typedef const char* _id_type; + _id_type id; + typedef int8_t _passed_type; + _passed_type passed; + uint32_t status_length; + typedef diagnostic_msgs::DiagnosticStatus _status_type; + _status_type st_status; + _status_type * status; + + SelfTestResponse(): + id(""), + passed(0), + status_length(0), status(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_id = strlen(this->id); + varToArr(outbuffer + offset, length_id); + offset += 4; + memcpy(outbuffer + offset, this->id, length_id); + offset += length_id; + union { + int8_t real; + uint8_t base; + } u_passed; + u_passed.real = this->passed; + *(outbuffer + offset + 0) = (u_passed.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->passed); + *(outbuffer + offset + 0) = (this->status_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->status_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->status_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->status_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->status_length); + for( uint32_t i = 0; i < status_length; i++){ + offset += this->status[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_id; + arrToVar(length_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_id-1]=0; + this->id = (char *)(inbuffer + offset-1); + offset += length_id; + union { + int8_t real; + uint8_t base; + } u_passed; + u_passed.base = 0; + u_passed.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->passed = u_passed.real; + offset += sizeof(this->passed); + uint32_t status_lengthT = ((uint32_t) (*(inbuffer + offset))); + status_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + status_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + status_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->status_length); + if(status_lengthT > status_length) + this->status = (diagnostic_msgs::DiagnosticStatus*)realloc(this->status, status_lengthT * sizeof(diagnostic_msgs::DiagnosticStatus)); + status_length = status_lengthT; + for( uint32_t i = 0; i < status_length; i++){ + offset += this->st_status.deserialize(inbuffer + offset); + memcpy( &(this->status[i]), &(this->st_status), sizeof(diagnostic_msgs::DiagnosticStatus)); + } + return offset; + } + + const char * getType(){ return SELFTEST; }; + const char * getMD5(){ return "ac21b1bab7ab17546986536c22eb34e9"; }; + + }; + + class SelfTest { + public: + typedef SelfTestRequest Request; + typedef SelfTestResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/duration.cpp b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/duration.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d2dfdd6f3f669a1c7712740c940bb64e7de2c4c4 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/duration.cpp @@ -0,0 +1,83 @@ +/* + * 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. + */ + +#include +#include "ros/duration.h" + +namespace ros +{ +void normalizeSecNSecSigned(int32_t &sec, int32_t &nsec) +{ + int32_t nsec_part = nsec; + int32_t sec_part = sec; + + while (nsec_part > 1000000000L) + { + nsec_part -= 1000000000L; + ++sec_part; + } + while (nsec_part < 0) + { + nsec_part += 1000000000L; + --sec_part; + } + sec = sec_part; + nsec = nsec_part; +} + +Duration& Duration::operator+=(const Duration &rhs) +{ + sec += rhs.sec; + nsec += rhs.nsec; + normalizeSecNSecSigned(sec, nsec); + return *this; +} + +Duration& Duration::operator-=(const Duration &rhs) +{ + sec += -rhs.sec; + nsec += -rhs.nsec; + normalizeSecNSecSigned(sec, nsec); + return *this; +} + +Duration& Duration::operator*=(double scale) +{ + sec *= scale; + nsec *= scale; + normalizeSecNSecSigned(sec, nsec); + return *this; +} + +} diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/BoolParameter.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/BoolParameter.h new file mode 100644 index 0000000000000000000000000000000000000000..902548616470ad81ad65b7bc2a79a1fa57342413 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/BoolParameter.h @@ -0,0 +1,73 @@ +#ifndef _ROS_dynamic_reconfigure_BoolParameter_h +#define _ROS_dynamic_reconfigure_BoolParameter_h + +#include +#include +#include +#include "ros/msg.h" + +namespace dynamic_reconfigure +{ + + class BoolParameter : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef bool _value_type; + _value_type value; + + BoolParameter(): + name(""), + value(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + union { + bool real; + uint8_t base; + } u_value; + u_value.real = this->value; + *(outbuffer + offset + 0) = (u_value.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->value); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + union { + bool real; + uint8_t base; + } u_value; + u_value.base = 0; + u_value.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->value = u_value.real; + offset += sizeof(this->value); + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/BoolParameter"; }; + const char * getMD5(){ return "23f05028c1a699fb83e22401228c3a9e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/Config.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/Config.h new file mode 100644 index 0000000000000000000000000000000000000000..e5aca14f64f064b82c96ced2e08df716ddaf575c --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/Config.h @@ -0,0 +1,168 @@ +#ifndef _ROS_dynamic_reconfigure_Config_h +#define _ROS_dynamic_reconfigure_Config_h + +#include +#include +#include +#include "ros/msg.h" +#include "dynamic_reconfigure/BoolParameter.h" +#include "dynamic_reconfigure/IntParameter.h" +#include "dynamic_reconfigure/StrParameter.h" +#include "dynamic_reconfigure/DoubleParameter.h" +#include "dynamic_reconfigure/GroupState.h" + +namespace dynamic_reconfigure +{ + + class Config : public ros::Msg + { + public: + uint32_t bools_length; + typedef dynamic_reconfigure::BoolParameter _bools_type; + _bools_type st_bools; + _bools_type * bools; + uint32_t ints_length; + typedef dynamic_reconfigure::IntParameter _ints_type; + _ints_type st_ints; + _ints_type * ints; + uint32_t strs_length; + typedef dynamic_reconfigure::StrParameter _strs_type; + _strs_type st_strs; + _strs_type * strs; + uint32_t doubles_length; + typedef dynamic_reconfigure::DoubleParameter _doubles_type; + _doubles_type st_doubles; + _doubles_type * doubles; + uint32_t groups_length; + typedef dynamic_reconfigure::GroupState _groups_type; + _groups_type st_groups; + _groups_type * groups; + + Config(): + bools_length(0), bools(NULL), + ints_length(0), ints(NULL), + strs_length(0), strs(NULL), + doubles_length(0), doubles(NULL), + groups_length(0), groups(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->bools_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->bools_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->bools_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->bools_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->bools_length); + for( uint32_t i = 0; i < bools_length; i++){ + offset += this->bools[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->ints_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->ints_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->ints_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->ints_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->ints_length); + for( uint32_t i = 0; i < ints_length; i++){ + offset += this->ints[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->strs_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->strs_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->strs_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->strs_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->strs_length); + for( uint32_t i = 0; i < strs_length; i++){ + offset += this->strs[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->doubles_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->doubles_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->doubles_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->doubles_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->doubles_length); + for( uint32_t i = 0; i < doubles_length; i++){ + offset += this->doubles[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->groups_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->groups_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->groups_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->groups_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->groups_length); + for( uint32_t i = 0; i < groups_length; i++){ + offset += this->groups[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t bools_lengthT = ((uint32_t) (*(inbuffer + offset))); + bools_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + bools_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + bools_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->bools_length); + if(bools_lengthT > bools_length) + this->bools = (dynamic_reconfigure::BoolParameter*)realloc(this->bools, bools_lengthT * sizeof(dynamic_reconfigure::BoolParameter)); + bools_length = bools_lengthT; + for( uint32_t i = 0; i < bools_length; i++){ + offset += this->st_bools.deserialize(inbuffer + offset); + memcpy( &(this->bools[i]), &(this->st_bools), sizeof(dynamic_reconfigure::BoolParameter)); + } + uint32_t ints_lengthT = ((uint32_t) (*(inbuffer + offset))); + ints_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + ints_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + ints_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->ints_length); + if(ints_lengthT > ints_length) + this->ints = (dynamic_reconfigure::IntParameter*)realloc(this->ints, ints_lengthT * sizeof(dynamic_reconfigure::IntParameter)); + ints_length = ints_lengthT; + for( uint32_t i = 0; i < ints_length; i++){ + offset += this->st_ints.deserialize(inbuffer + offset); + memcpy( &(this->ints[i]), &(this->st_ints), sizeof(dynamic_reconfigure::IntParameter)); + } + uint32_t strs_lengthT = ((uint32_t) (*(inbuffer + offset))); + strs_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + strs_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + strs_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->strs_length); + if(strs_lengthT > strs_length) + this->strs = (dynamic_reconfigure::StrParameter*)realloc(this->strs, strs_lengthT * sizeof(dynamic_reconfigure::StrParameter)); + strs_length = strs_lengthT; + for( uint32_t i = 0; i < strs_length; i++){ + offset += this->st_strs.deserialize(inbuffer + offset); + memcpy( &(this->strs[i]), &(this->st_strs), sizeof(dynamic_reconfigure::StrParameter)); + } + uint32_t doubles_lengthT = ((uint32_t) (*(inbuffer + offset))); + doubles_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + doubles_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + doubles_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->doubles_length); + if(doubles_lengthT > doubles_length) + this->doubles = (dynamic_reconfigure::DoubleParameter*)realloc(this->doubles, doubles_lengthT * sizeof(dynamic_reconfigure::DoubleParameter)); + doubles_length = doubles_lengthT; + for( uint32_t i = 0; i < doubles_length; i++){ + offset += this->st_doubles.deserialize(inbuffer + offset); + memcpy( &(this->doubles[i]), &(this->st_doubles), sizeof(dynamic_reconfigure::DoubleParameter)); + } + uint32_t groups_lengthT = ((uint32_t) (*(inbuffer + offset))); + groups_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + groups_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + groups_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->groups_length); + if(groups_lengthT > groups_length) + this->groups = (dynamic_reconfigure::GroupState*)realloc(this->groups, groups_lengthT * sizeof(dynamic_reconfigure::GroupState)); + groups_length = groups_lengthT; + for( uint32_t i = 0; i < groups_length; i++){ + offset += this->st_groups.deserialize(inbuffer + offset); + memcpy( &(this->groups[i]), &(this->st_groups), sizeof(dynamic_reconfigure::GroupState)); + } + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/Config"; }; + const char * getMD5(){ return "958f16a05573709014982821e6822580"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/ConfigDescription.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/ConfigDescription.h new file mode 100644 index 0000000000000000000000000000000000000000..4563bb7e6d4f692f5f21e30bc1905674d3e6f538 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/ConfigDescription.h @@ -0,0 +1,80 @@ +#ifndef _ROS_dynamic_reconfigure_ConfigDescription_h +#define _ROS_dynamic_reconfigure_ConfigDescription_h + +#include +#include +#include +#include "ros/msg.h" +#include "dynamic_reconfigure/Group.h" +#include "dynamic_reconfigure/Config.h" + +namespace dynamic_reconfigure +{ + + class ConfigDescription : public ros::Msg + { + public: + uint32_t groups_length; + typedef dynamic_reconfigure::Group _groups_type; + _groups_type st_groups; + _groups_type * groups; + typedef dynamic_reconfigure::Config _max_type; + _max_type max; + typedef dynamic_reconfigure::Config _min_type; + _min_type min; + typedef dynamic_reconfigure::Config _dflt_type; + _dflt_type dflt; + + ConfigDescription(): + groups_length(0), groups(NULL), + max(), + min(), + dflt() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->groups_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->groups_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->groups_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->groups_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->groups_length); + for( uint32_t i = 0; i < groups_length; i++){ + offset += this->groups[i].serialize(outbuffer + offset); + } + offset += this->max.serialize(outbuffer + offset); + offset += this->min.serialize(outbuffer + offset); + offset += this->dflt.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t groups_lengthT = ((uint32_t) (*(inbuffer + offset))); + groups_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + groups_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + groups_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->groups_length); + if(groups_lengthT > groups_length) + this->groups = (dynamic_reconfigure::Group*)realloc(this->groups, groups_lengthT * sizeof(dynamic_reconfigure::Group)); + groups_length = groups_lengthT; + for( uint32_t i = 0; i < groups_length; i++){ + offset += this->st_groups.deserialize(inbuffer + offset); + memcpy( &(this->groups[i]), &(this->st_groups), sizeof(dynamic_reconfigure::Group)); + } + offset += this->max.deserialize(inbuffer + offset); + offset += this->min.deserialize(inbuffer + offset); + offset += this->dflt.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/ConfigDescription"; }; + const char * getMD5(){ return "757ce9d44ba8ddd801bb30bc456f946f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/DoubleParameter.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/DoubleParameter.h new file mode 100644 index 0000000000000000000000000000000000000000..6f62e20fc2d12ab6dbcb306cad72dad51840b36f --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/DoubleParameter.h @@ -0,0 +1,87 @@ +#ifndef _ROS_dynamic_reconfigure_DoubleParameter_h +#define _ROS_dynamic_reconfigure_DoubleParameter_h + +#include +#include +#include +#include "ros/msg.h" + +namespace dynamic_reconfigure +{ + + class DoubleParameter : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef double _value_type; + _value_type value; + + DoubleParameter(): + name(""), + value(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + union { + double real; + uint64_t base; + } u_value; + u_value.real = this->value; + *(outbuffer + offset + 0) = (u_value.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_value.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_value.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_value.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_value.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_value.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_value.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_value.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->value); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + union { + double real; + uint64_t base; + } u_value; + u_value.base = 0; + u_value.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_value.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_value.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_value.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_value.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_value.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_value.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_value.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->value = u_value.real; + offset += sizeof(this->value); + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/DoubleParameter"; }; + const char * getMD5(){ return "d8512f27253c0f65f928a67c329cd658"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/Group.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/Group.h new file mode 100644 index 0000000000000000000000000000000000000000..6f116acbe3aebe2dee140a1e5cee49ecd2974da1 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/Group.h @@ -0,0 +1,146 @@ +#ifndef _ROS_dynamic_reconfigure_Group_h +#define _ROS_dynamic_reconfigure_Group_h + +#include +#include +#include +#include "ros/msg.h" +#include "dynamic_reconfigure/ParamDescription.h" + +namespace dynamic_reconfigure +{ + + class Group : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _type_type; + _type_type type; + uint32_t parameters_length; + typedef dynamic_reconfigure::ParamDescription _parameters_type; + _parameters_type st_parameters; + _parameters_type * parameters; + typedef int32_t _parent_type; + _parent_type parent; + typedef int32_t _id_type; + _id_type id; + + Group(): + name(""), + type(""), + parameters_length(0), parameters(NULL), + parent(0), + id(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_type = strlen(this->type); + varToArr(outbuffer + offset, length_type); + offset += 4; + memcpy(outbuffer + offset, this->type, length_type); + offset += length_type; + *(outbuffer + offset + 0) = (this->parameters_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->parameters_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->parameters_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->parameters_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->parameters_length); + for( uint32_t i = 0; i < parameters_length; i++){ + offset += this->parameters[i].serialize(outbuffer + offset); + } + union { + int32_t real; + uint32_t base; + } u_parent; + u_parent.real = this->parent; + *(outbuffer + offset + 0) = (u_parent.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_parent.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_parent.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_parent.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->parent); + union { + int32_t real; + uint32_t base; + } u_id; + u_id.real = this->id; + *(outbuffer + offset + 0) = (u_id.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_id.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_id.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_id.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->id); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_type; + arrToVar(length_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type-1]=0; + this->type = (char *)(inbuffer + offset-1); + offset += length_type; + uint32_t parameters_lengthT = ((uint32_t) (*(inbuffer + offset))); + parameters_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + parameters_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + parameters_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->parameters_length); + if(parameters_lengthT > parameters_length) + this->parameters = (dynamic_reconfigure::ParamDescription*)realloc(this->parameters, parameters_lengthT * sizeof(dynamic_reconfigure::ParamDescription)); + parameters_length = parameters_lengthT; + for( uint32_t i = 0; i < parameters_length; i++){ + offset += this->st_parameters.deserialize(inbuffer + offset); + memcpy( &(this->parameters[i]), &(this->st_parameters), sizeof(dynamic_reconfigure::ParamDescription)); + } + union { + int32_t real; + uint32_t base; + } u_parent; + u_parent.base = 0; + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->parent = u_parent.real; + offset += sizeof(this->parent); + union { + int32_t real; + uint32_t base; + } u_id; + u_id.base = 0; + u_id.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->id = u_id.real; + offset += sizeof(this->id); + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/Group"; }; + const char * getMD5(){ return "9e8cd9e9423c94823db3614dd8b1cf7a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/GroupState.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/GroupState.h new file mode 100644 index 0000000000000000000000000000000000000000..7988eacd5109d754f8e3188be894d6cb31d81bf7 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/GroupState.h @@ -0,0 +1,121 @@ +#ifndef _ROS_dynamic_reconfigure_GroupState_h +#define _ROS_dynamic_reconfigure_GroupState_h + +#include +#include +#include +#include "ros/msg.h" + +namespace dynamic_reconfigure +{ + + class GroupState : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef bool _state_type; + _state_type state; + typedef int32_t _id_type; + _id_type id; + typedef int32_t _parent_type; + _parent_type parent; + + GroupState(): + name(""), + state(0), + id(0), + parent(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + union { + bool real; + uint8_t base; + } u_state; + u_state.real = this->state; + *(outbuffer + offset + 0) = (u_state.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->state); + union { + int32_t real; + uint32_t base; + } u_id; + u_id.real = this->id; + *(outbuffer + offset + 0) = (u_id.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_id.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_id.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_id.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->id); + union { + int32_t real; + uint32_t base; + } u_parent; + u_parent.real = this->parent; + *(outbuffer + offset + 0) = (u_parent.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_parent.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_parent.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_parent.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->parent); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + union { + bool real; + uint8_t base; + } u_state; + u_state.base = 0; + u_state.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->state = u_state.real; + offset += sizeof(this->state); + union { + int32_t real; + uint32_t base; + } u_id; + u_id.base = 0; + u_id.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->id = u_id.real; + offset += sizeof(this->id); + union { + int32_t real; + uint32_t base; + } u_parent; + u_parent.base = 0; + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->parent = u_parent.real; + offset += sizeof(this->parent); + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/GroupState"; }; + const char * getMD5(){ return "a2d87f51dc22930325041a2f8b1571f8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/IntParameter.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/IntParameter.h new file mode 100644 index 0000000000000000000000000000000000000000..aab415807a89489816d4c0b2cb1792a4ff0c4f1a --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/IntParameter.h @@ -0,0 +1,79 @@ +#ifndef _ROS_dynamic_reconfigure_IntParameter_h +#define _ROS_dynamic_reconfigure_IntParameter_h + +#include +#include +#include +#include "ros/msg.h" + +namespace dynamic_reconfigure +{ + + class IntParameter : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef int32_t _value_type; + _value_type value; + + IntParameter(): + name(""), + value(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + union { + int32_t real; + uint32_t base; + } u_value; + u_value.real = this->value; + *(outbuffer + offset + 0) = (u_value.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_value.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_value.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_value.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->value); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + union { + int32_t real; + uint32_t base; + } u_value; + u_value.base = 0; + u_value.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_value.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_value.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_value.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->value = u_value.real; + offset += sizeof(this->value); + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/IntParameter"; }; + const char * getMD5(){ return "65fedc7a0cbfb8db035e46194a350bf1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/ParamDescription.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/ParamDescription.h new file mode 100644 index 0000000000000000000000000000000000000000..00ac5ba79e5bd27e410baa7b60efc86f855997f0 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/ParamDescription.h @@ -0,0 +1,119 @@ +#ifndef _ROS_dynamic_reconfigure_ParamDescription_h +#define _ROS_dynamic_reconfigure_ParamDescription_h + +#include +#include +#include +#include "ros/msg.h" + +namespace dynamic_reconfigure +{ + + class ParamDescription : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _type_type; + _type_type type; + typedef uint32_t _level_type; + _level_type level; + typedef const char* _description_type; + _description_type description; + typedef const char* _edit_method_type; + _edit_method_type edit_method; + + ParamDescription(): + name(""), + type(""), + level(0), + description(""), + edit_method("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_type = strlen(this->type); + varToArr(outbuffer + offset, length_type); + offset += 4; + memcpy(outbuffer + offset, this->type, length_type); + offset += length_type; + *(outbuffer + offset + 0) = (this->level >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->level >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->level >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->level >> (8 * 3)) & 0xFF; + offset += sizeof(this->level); + uint32_t length_description = strlen(this->description); + varToArr(outbuffer + offset, length_description); + offset += 4; + memcpy(outbuffer + offset, this->description, length_description); + offset += length_description; + uint32_t length_edit_method = strlen(this->edit_method); + varToArr(outbuffer + offset, length_edit_method); + offset += 4; + memcpy(outbuffer + offset, this->edit_method, length_edit_method); + offset += length_edit_method; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_type; + arrToVar(length_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type-1]=0; + this->type = (char *)(inbuffer + offset-1); + offset += length_type; + this->level = ((uint32_t) (*(inbuffer + offset))); + this->level |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->level |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->level |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->level); + uint32_t length_description; + arrToVar(length_description, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_description; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_description-1]=0; + this->description = (char *)(inbuffer + offset-1); + offset += length_description; + uint32_t length_edit_method; + arrToVar(length_edit_method, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_edit_method; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_edit_method-1]=0; + this->edit_method = (char *)(inbuffer + offset-1); + offset += length_edit_method; + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/ParamDescription"; }; + const char * getMD5(){ return "7434fcb9348c13054e0c3b267c8cb34d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/Reconfigure.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/Reconfigure.h new file mode 100644 index 0000000000000000000000000000000000000000..e4e6b79b6a9ee136fece2ec1726cc358d0e63a19 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/Reconfigure.h @@ -0,0 +1,81 @@ +#ifndef _ROS_SERVICE_Reconfigure_h +#define _ROS_SERVICE_Reconfigure_h +#include +#include +#include +#include "ros/msg.h" +#include "dynamic_reconfigure/Config.h" + +namespace dynamic_reconfigure +{ + +static const char RECONFIGURE[] = "dynamic_reconfigure/Reconfigure"; + + class ReconfigureRequest : public ros::Msg + { + public: + typedef dynamic_reconfigure::Config _config_type; + _config_type config; + + ReconfigureRequest(): + config() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->config.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->config.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return RECONFIGURE; }; + const char * getMD5(){ return "ac41a77620a4a0348b7001641796a8a1"; }; + + }; + + class ReconfigureResponse : public ros::Msg + { + public: + typedef dynamic_reconfigure::Config _config_type; + _config_type config; + + ReconfigureResponse(): + config() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->config.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->config.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return RECONFIGURE; }; + const char * getMD5(){ return "ac41a77620a4a0348b7001641796a8a1"; }; + + }; + + class Reconfigure { + public: + typedef ReconfigureRequest Request; + typedef ReconfigureResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/SensorLevels.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/SensorLevels.h new file mode 100644 index 0000000000000000000000000000000000000000..8f85722eb104533806d61336418a60120f3fbe0f --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/SensorLevels.h @@ -0,0 +1,41 @@ +#ifndef _ROS_dynamic_reconfigure_SensorLevels_h +#define _ROS_dynamic_reconfigure_SensorLevels_h + +#include +#include +#include +#include "ros/msg.h" + +namespace dynamic_reconfigure +{ + + class SensorLevels : public ros::Msg + { + public: + enum { RECONFIGURE_CLOSE = 3 }; + enum { RECONFIGURE_STOP = 1 }; + enum { RECONFIGURE_RUNNING = 0 }; + + SensorLevels() + { + } + + 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 "dynamic_reconfigure/SensorLevels"; }; + const char * getMD5(){ return "6322637bee96d5489db6e2127c47602c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/StrParameter.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/StrParameter.h new file mode 100644 index 0000000000000000000000000000000000000000..2e743f0346531a0d0948dd3dc0dd2d63d6976b29 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/StrParameter.h @@ -0,0 +1,72 @@ +#ifndef _ROS_dynamic_reconfigure_StrParameter_h +#define _ROS_dynamic_reconfigure_StrParameter_h + +#include +#include +#include +#include "ros/msg.h" + +namespace dynamic_reconfigure +{ + + class StrParameter : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _value_type; + _value_type value; + + StrParameter(): + name(""), + value("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_value = strlen(this->value); + varToArr(outbuffer + offset, length_value); + offset += 4; + memcpy(outbuffer + offset, this->value, length_value); + offset += length_value; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_value; + arrToVar(length_value, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_value; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_value-1]=0; + this->value = (char *)(inbuffer + offset-1); + offset += length_value; + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/StrParameter"; }; + const char * getMD5(){ return "bc6ccc4a57f61779c8eaae61e9f422e0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/embedded_linux_comms.c b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/embedded_linux_comms.c new file mode 100644 index 0000000000000000000000000000000000000000..bde6e3776ca83f73433679dc51fc06219f4fde30 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/embedded_linux_comms.c @@ -0,0 +1,208 @@ +/* + * Software License Agreement (BSD License) + * + * Copyright (c) 2012, Paul Bouchier + * 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_EMBEDDED_LINUX_COMMS_H +#define ROS_EMBEDDED_LINUX_COMMS_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DEFAULT_PORTNUM 11411 + +void error(const char *msg) +{ + perror(msg); + exit(0); +} + +void set_nonblock(int socket) +{ + int flags; + flags = fcntl(socket, F_GETFL, 0); + assert(flags != -1); + fcntl(socket, F_SETFL, flags | O_NONBLOCK); +} + +int elCommInit(const char *portName, int baud) +{ + struct termios options; + int fd; + int sockfd; + struct sockaddr_in serv_addr; + struct hostent *server; + int rv; + + if (*portName == '/') // linux serial port names always begin with /dev + { + printf("Opening serial port %s\n", portName); + + fd = open(portName, O_RDWR | O_NOCTTY | O_NDELAY); + + if (fd == -1) + { + // Could not open the port. + perror("init(): Unable to open serial port - "); + } + else + { + // Sets the read() function to return NOW and not wait for data to enter + // buffer if there isn't anything there. + fcntl(fd, F_SETFL, FNDELAY); + + // Configure port for 8N1 transmission, 57600 baud, SW flow control. + tcgetattr(fd, &options); + cfsetispeed(&options, B57600); + cfsetospeed(&options, B57600); + options.c_cflag |= (CLOCAL | CREAD); + options.c_cflag &= ~PARENB; + options.c_cflag &= ~CSTOPB; + options.c_cflag &= ~CSIZE; + options.c_cflag |= CS8; + options.c_cflag &= ~CRTSCTS; + options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); + options.c_iflag &= ~(IXON | IXOFF | IXANY); + options.c_oflag &= ~OPOST; + + // Set the new options for the port "NOW" + tcsetattr(fd, TCSANOW, &options); + } + return fd; + } + else + { + // Split connection string into IP address and port. + const char* tcpPortNumString = strchr(portName, ':'); + long int tcpPortNum; + char ip[16]; + if (!tcpPortNumString) + { + tcpPortNum = DEFAULT_PORTNUM; + strncpy(ip, portName, 16); + } + else + { + tcpPortNum = strtol(tcpPortNumString + 1, NULL, 10); + strncpy(ip, portName, tcpPortNumString - portName); + } + + printf("Connecting to TCP server at %s:%ld....\n", ip, tcpPortNum); + + // Create the socket. + sockfd = socket(AF_INET, SOCK_STREAM, 0); + if (sockfd < 0) + { + error("ERROR opening socket"); + exit(-1); + } + + // Disable the Nagle (TCP No Delay) algorithm. + int flag = 1; + rv = setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(flag)); + if (rv == -1) + { + printf("Couldn't setsockopt(TCP_NODELAY)\n"); + exit(-1); + } + + // Connect to the server + server = gethostbyname(ip); + if (server == NULL) + { + fprintf(stderr, "ERROR, no such host\n"); + exit(0); + } + bzero((char *) &serv_addr, sizeof(serv_addr)); + serv_addr.sin_family = AF_INET; + bcopy((char *)server->h_addr, + (char *)&serv_addr.sin_addr.s_addr, + server->h_length); + serv_addr.sin_port = htons(tcpPortNum); + if (connect(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) + error("ERROR connecting"); + set_nonblock(sockfd); + printf("connected to server\n"); + return sockfd; + } + return -1; +} + +int elCommRead(int fd) +{ + unsigned char c; + unsigned int i; + int rv; + rv = read(fd, &c, 1); // read one byte + i = c; // convert byte to an int for return + if (rv > 0) + return i; // return the character read + if (rv < 0) + { + if ((errno != EAGAIN) && (errno != EWOULDBLOCK)) + perror("elCommRead() error:"); + } + + // return -1 or 0 either if we read nothing, or if read returned negative + return rv; +} + +int elCommWrite(int fd, uint8_t* data, int len) +{ + int rv = 0; + int length = len; + int totalsent = 0; + while (totalsent < length) + { + rv = write(fd, data + totalsent, length); + if (rv < 0) + perror("write(): error writing - trying again - "); + else + totalsent += rv; + } + return rv; +} + +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/embedded_linux_hardware.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/embedded_linux_hardware.h new file mode 100644 index 0000000000000000000000000000000000000000..fff1b462f088c376b3b2586e76831ada593d6267 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/embedded_linux_hardware.h @@ -0,0 +1,172 @@ +/* + * 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_EMBEDDED_LINUX_HARDWARE_H_ +#define ROS_EMBEDDED_LINUX_HARDWARE_H_ + +#include + +#ifdef BUILD_LIBROSSERIALEMBEDDEDLINUX +extern "C" int elCommInit(char *portName, int baud); +extern "C" int elCommRead(int fd); +extern "C" elCommWrite(int fd, uint8_t* data, int length); +#endif + +#ifdef __linux__ +#include +#endif + +// Includes necessary to support time on OS X. +#ifdef __MACH__ +#include +#include +static mach_timebase_info_data_t sTimebaseInfo; +#endif + +#define DEFAULT_PORT "/dev/ttyAM1" + +class EmbeddedLinuxHardware +{ +public: + EmbeddedLinuxHardware(const char *pn, long baud = 57600) + { + strncpy(portName, pn, 30); + baud_ = baud; + } + + EmbeddedLinuxHardware() + { + const char *envPortName = getenv("ROSSERIAL_PORT"); + if (envPortName == NULL) + strcpy(portName, DEFAULT_PORT); + else + strncpy(portName, envPortName, 29); + portName[29] = '\0'; // in case user gave us too long a port name + baud_ = 57600; + } + + void setBaud(long baud) + { + this->baud_ = baud; + } + + int getBaud() + { + return baud_; + } + + void init() + { + fd = elCommInit(portName, baud_); + if (fd < 0) + { + std::cout << "Exiting" << std::endl; + exit(-1); + } + std::cout << "EmbeddedHardware.h: opened serial port successfully\n"; + + initTime(); + } + + void init(const char *pName) + { + fd = elCommInit(pName, baud_); + if (fd < 0) + { + std::cout << "Exiting" << std::endl; + exit(-1); + } + std::cout << "EmbeddedHardware.h: opened comm port successfully\n"; + + initTime(); + } + + int read() + { + int c = elCommRead(fd); + return c; + } + + void write(uint8_t* data, int length) + { + elCommWrite(fd, data, length); + } + +#ifdef __linux__ + void initTime() + { + clock_gettime(CLOCK_MONOTONIC, &start); + } + + unsigned long time() + { + struct timespec end; + long seconds, nseconds; + + clock_gettime(CLOCK_MONOTONIC, &end); + + seconds = end.tv_sec - start.tv_sec; + nseconds = end.tv_nsec - start.tv_nsec; + + return ((seconds) * 1000 + nseconds / 1000000.0) + 0.5; + } + +#elif __MACH__ + void initTime() + { + start = mach_absolute_time(); + mach_timebase_info(&sTimebaseInfo); + } + + unsigned long time() + { + // See: https://developer.apple.com/library/mac/qa/qa1398/_index.html + uint64_t elapsed = mach_absolute_time() - start; + return elapsed * sTimebaseInfo.numer / (sTimebaseInfo.denom * 1000000); + } +#endif + +protected: + int fd; + char portName[30]; + long baud_; + +#ifdef __linux__ + struct timespec start; +#elif __MACH__ + uint64_t start; +#endif +}; + +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ApplyBodyWrench.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ApplyBodyWrench.h new file mode 100644 index 0000000000000000000000000000000000000000..e7af6bbb789592d719eb564ce4ad246a15968df7 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ApplyBodyWrench.h @@ -0,0 +1,199 @@ +#ifndef _ROS_SERVICE_ApplyBodyWrench_h +#define _ROS_SERVICE_ApplyBodyWrench_h +#include +#include +#include +#include "ros/msg.h" +#include "ros/duration.h" +#include "geometry_msgs/Wrench.h" +#include "ros/time.h" +#include "geometry_msgs/Point.h" + +namespace gazebo_msgs +{ + +static const char APPLYBODYWRENCH[] = "gazebo_msgs/ApplyBodyWrench"; + + class ApplyBodyWrenchRequest : public ros::Msg + { + public: + typedef const char* _body_name_type; + _body_name_type body_name; + typedef const char* _reference_frame_type; + _reference_frame_type reference_frame; + typedef geometry_msgs::Point _reference_point_type; + _reference_point_type reference_point; + typedef geometry_msgs::Wrench _wrench_type; + _wrench_type wrench; + typedef ros::Time _start_time_type; + _start_time_type start_time; + typedef ros::Duration _duration_type; + _duration_type duration; + + ApplyBodyWrenchRequest(): + body_name(""), + reference_frame(""), + reference_point(), + wrench(), + start_time(), + duration() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_body_name = strlen(this->body_name); + varToArr(outbuffer + offset, length_body_name); + offset += 4; + memcpy(outbuffer + offset, this->body_name, length_body_name); + offset += length_body_name; + uint32_t length_reference_frame = strlen(this->reference_frame); + varToArr(outbuffer + offset, length_reference_frame); + offset += 4; + memcpy(outbuffer + offset, this->reference_frame, length_reference_frame); + offset += length_reference_frame; + offset += this->reference_point.serialize(outbuffer + offset); + offset += this->wrench.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->start_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->start_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->start_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->start_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->start_time.sec); + *(outbuffer + offset + 0) = (this->start_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->start_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->start_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->start_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->start_time.nsec); + *(outbuffer + offset + 0) = (this->duration.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->duration.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->duration.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->duration.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->duration.sec); + *(outbuffer + offset + 0) = (this->duration.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->duration.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->duration.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->duration.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->duration.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_body_name; + arrToVar(length_body_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_body_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_body_name-1]=0; + this->body_name = (char *)(inbuffer + offset-1); + offset += length_body_name; + uint32_t length_reference_frame; + arrToVar(length_reference_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_reference_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_reference_frame-1]=0; + this->reference_frame = (char *)(inbuffer + offset-1); + offset += length_reference_frame; + offset += this->reference_point.deserialize(inbuffer + offset); + offset += this->wrench.deserialize(inbuffer + offset); + this->start_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->start_time.sec); + this->start_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->start_time.nsec); + this->duration.sec = ((uint32_t) (*(inbuffer + offset))); + this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->duration.sec); + this->duration.nsec = ((uint32_t) (*(inbuffer + offset))); + this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->duration.nsec); + return offset; + } + + const char * getType(){ return APPLYBODYWRENCH; }; + const char * getMD5(){ return "e37e6adf97eba5095baa77dffb71e5bd"; }; + + }; + + class ApplyBodyWrenchResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + ApplyBodyWrenchResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return APPLYBODYWRENCH; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class ApplyBodyWrench { + public: + typedef ApplyBodyWrenchRequest Request; + typedef ApplyBodyWrenchResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ApplyJointEffort.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ApplyJointEffort.h new file mode 100644 index 0000000000000000000000000000000000000000..636084fdbf4f32c068d8087772503b40063758a3 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ApplyJointEffort.h @@ -0,0 +1,202 @@ +#ifndef _ROS_SERVICE_ApplyJointEffort_h +#define _ROS_SERVICE_ApplyJointEffort_h +#include +#include +#include +#include "ros/msg.h" +#include "ros/duration.h" +#include "ros/time.h" + +namespace gazebo_msgs +{ + +static const char APPLYJOINTEFFORT[] = "gazebo_msgs/ApplyJointEffort"; + + class ApplyJointEffortRequest : public ros::Msg + { + public: + typedef const char* _joint_name_type; + _joint_name_type joint_name; + typedef double _effort_type; + _effort_type effort; + typedef ros::Time _start_time_type; + _start_time_type start_time; + typedef ros::Duration _duration_type; + _duration_type duration; + + ApplyJointEffortRequest(): + joint_name(""), + effort(0), + start_time(), + duration() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_joint_name = strlen(this->joint_name); + varToArr(outbuffer + offset, length_joint_name); + offset += 4; + memcpy(outbuffer + offset, this->joint_name, length_joint_name); + offset += length_joint_name; + union { + double real; + uint64_t base; + } u_effort; + u_effort.real = this->effort; + *(outbuffer + offset + 0) = (u_effort.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_effort.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_effort.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_effort.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_effort.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_effort.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_effort.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_effort.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->effort); + *(outbuffer + offset + 0) = (this->start_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->start_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->start_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->start_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->start_time.sec); + *(outbuffer + offset + 0) = (this->start_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->start_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->start_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->start_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->start_time.nsec); + *(outbuffer + offset + 0) = (this->duration.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->duration.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->duration.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->duration.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->duration.sec); + *(outbuffer + offset + 0) = (this->duration.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->duration.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->duration.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->duration.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->duration.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_joint_name; + arrToVar(length_joint_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_joint_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_joint_name-1]=0; + this->joint_name = (char *)(inbuffer + offset-1); + offset += length_joint_name; + union { + double real; + uint64_t base; + } u_effort; + u_effort.base = 0; + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->effort = u_effort.real; + offset += sizeof(this->effort); + this->start_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->start_time.sec); + this->start_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->start_time.nsec); + this->duration.sec = ((uint32_t) (*(inbuffer + offset))); + this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->duration.sec); + this->duration.nsec = ((uint32_t) (*(inbuffer + offset))); + this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->duration.nsec); + return offset; + } + + const char * getType(){ return APPLYJOINTEFFORT; }; + const char * getMD5(){ return "2c3396ab9af67a509ecd2167a8fe41a2"; }; + + }; + + class ApplyJointEffortResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + ApplyJointEffortResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return APPLYJOINTEFFORT; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class ApplyJointEffort { + public: + typedef ApplyJointEffortRequest Request; + typedef ApplyJointEffortResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/BodyRequest.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/BodyRequest.h new file mode 100644 index 0000000000000000000000000000000000000000..bb2106d9c836e8b5e3e59fba9b6aee7f8f4cf023 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/BodyRequest.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_BodyRequest_h +#define _ROS_SERVICE_BodyRequest_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char BODYREQUEST[] = "gazebo_msgs/BodyRequest"; + + class BodyRequestRequest : public ros::Msg + { + public: + typedef const char* _body_name_type; + _body_name_type body_name; + + BodyRequestRequest(): + body_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_body_name = strlen(this->body_name); + varToArr(outbuffer + offset, length_body_name); + offset += 4; + memcpy(outbuffer + offset, this->body_name, length_body_name); + offset += length_body_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_body_name; + arrToVar(length_body_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_body_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_body_name-1]=0; + this->body_name = (char *)(inbuffer + offset-1); + offset += length_body_name; + return offset; + } + + const char * getType(){ return BODYREQUEST; }; + const char * getMD5(){ return "5eade9afe7f232d78005bd0cafeab755"; }; + + }; + + class BodyRequestResponse : public ros::Msg + { + public: + + BodyRequestResponse() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return BODYREQUEST; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class BodyRequest { + public: + typedef BodyRequestRequest Request; + typedef BodyRequestResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ContactState.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ContactState.h new file mode 100644 index 0000000000000000000000000000000000000000..a3d852d889430da110c29dc463f6e54b6b0e5e3e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ContactState.h @@ -0,0 +1,223 @@ +#ifndef _ROS_gazebo_msgs_ContactState_h +#define _ROS_gazebo_msgs_ContactState_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Wrench.h" +#include "geometry_msgs/Vector3.h" + +namespace gazebo_msgs +{ + + class ContactState : public ros::Msg + { + public: + typedef const char* _info_type; + _info_type info; + typedef const char* _collision1_name_type; + _collision1_name_type collision1_name; + typedef const char* _collision2_name_type; + _collision2_name_type collision2_name; + uint32_t wrenches_length; + typedef geometry_msgs::Wrench _wrenches_type; + _wrenches_type st_wrenches; + _wrenches_type * wrenches; + typedef geometry_msgs::Wrench _total_wrench_type; + _total_wrench_type total_wrench; + uint32_t contact_positions_length; + typedef geometry_msgs::Vector3 _contact_positions_type; + _contact_positions_type st_contact_positions; + _contact_positions_type * contact_positions; + uint32_t contact_normals_length; + typedef geometry_msgs::Vector3 _contact_normals_type; + _contact_normals_type st_contact_normals; + _contact_normals_type * contact_normals; + uint32_t depths_length; + typedef double _depths_type; + _depths_type st_depths; + _depths_type * depths; + + ContactState(): + info(""), + collision1_name(""), + collision2_name(""), + wrenches_length(0), wrenches(NULL), + total_wrench(), + contact_positions_length(0), contact_positions(NULL), + contact_normals_length(0), contact_normals(NULL), + depths_length(0), depths(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_info = strlen(this->info); + varToArr(outbuffer + offset, length_info); + offset += 4; + memcpy(outbuffer + offset, this->info, length_info); + offset += length_info; + uint32_t length_collision1_name = strlen(this->collision1_name); + varToArr(outbuffer + offset, length_collision1_name); + offset += 4; + memcpy(outbuffer + offset, this->collision1_name, length_collision1_name); + offset += length_collision1_name; + uint32_t length_collision2_name = strlen(this->collision2_name); + varToArr(outbuffer + offset, length_collision2_name); + offset += 4; + memcpy(outbuffer + offset, this->collision2_name, length_collision2_name); + offset += length_collision2_name; + *(outbuffer + offset + 0) = (this->wrenches_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->wrenches_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->wrenches_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->wrenches_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->wrenches_length); + for( uint32_t i = 0; i < wrenches_length; i++){ + offset += this->wrenches[i].serialize(outbuffer + offset); + } + offset += this->total_wrench.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->contact_positions_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->contact_positions_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->contact_positions_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->contact_positions_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->contact_positions_length); + for( uint32_t i = 0; i < contact_positions_length; i++){ + offset += this->contact_positions[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->contact_normals_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->contact_normals_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->contact_normals_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->contact_normals_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->contact_normals_length); + for( uint32_t i = 0; i < contact_normals_length; i++){ + offset += this->contact_normals[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->depths_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->depths_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->depths_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->depths_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->depths_length); + for( uint32_t i = 0; i < depths_length; i++){ + union { + double real; + uint64_t base; + } u_depthsi; + u_depthsi.real = this->depths[i]; + *(outbuffer + offset + 0) = (u_depthsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_depthsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_depthsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_depthsi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_depthsi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_depthsi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_depthsi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_depthsi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->depths[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_info; + arrToVar(length_info, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_info; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_info-1]=0; + this->info = (char *)(inbuffer + offset-1); + offset += length_info; + uint32_t length_collision1_name; + arrToVar(length_collision1_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_collision1_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_collision1_name-1]=0; + this->collision1_name = (char *)(inbuffer + offset-1); + offset += length_collision1_name; + uint32_t length_collision2_name; + arrToVar(length_collision2_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_collision2_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_collision2_name-1]=0; + this->collision2_name = (char *)(inbuffer + offset-1); + offset += length_collision2_name; + uint32_t wrenches_lengthT = ((uint32_t) (*(inbuffer + offset))); + wrenches_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + wrenches_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + wrenches_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->wrenches_length); + if(wrenches_lengthT > wrenches_length) + this->wrenches = (geometry_msgs::Wrench*)realloc(this->wrenches, wrenches_lengthT * sizeof(geometry_msgs::Wrench)); + wrenches_length = wrenches_lengthT; + for( uint32_t i = 0; i < wrenches_length; i++){ + offset += this->st_wrenches.deserialize(inbuffer + offset); + memcpy( &(this->wrenches[i]), &(this->st_wrenches), sizeof(geometry_msgs::Wrench)); + } + offset += this->total_wrench.deserialize(inbuffer + offset); + uint32_t contact_positions_lengthT = ((uint32_t) (*(inbuffer + offset))); + contact_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + contact_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + contact_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->contact_positions_length); + if(contact_positions_lengthT > contact_positions_length) + this->contact_positions = (geometry_msgs::Vector3*)realloc(this->contact_positions, contact_positions_lengthT * sizeof(geometry_msgs::Vector3)); + contact_positions_length = contact_positions_lengthT; + for( uint32_t i = 0; i < contact_positions_length; i++){ + offset += this->st_contact_positions.deserialize(inbuffer + offset); + memcpy( &(this->contact_positions[i]), &(this->st_contact_positions), sizeof(geometry_msgs::Vector3)); + } + uint32_t contact_normals_lengthT = ((uint32_t) (*(inbuffer + offset))); + contact_normals_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + contact_normals_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + contact_normals_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->contact_normals_length); + if(contact_normals_lengthT > contact_normals_length) + this->contact_normals = (geometry_msgs::Vector3*)realloc(this->contact_normals, contact_normals_lengthT * sizeof(geometry_msgs::Vector3)); + contact_normals_length = contact_normals_lengthT; + for( uint32_t i = 0; i < contact_normals_length; i++){ + offset += this->st_contact_normals.deserialize(inbuffer + offset); + memcpy( &(this->contact_normals[i]), &(this->st_contact_normals), sizeof(geometry_msgs::Vector3)); + } + uint32_t depths_lengthT = ((uint32_t) (*(inbuffer + offset))); + depths_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + depths_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + depths_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->depths_length); + if(depths_lengthT > depths_length) + this->depths = (double*)realloc(this->depths, depths_lengthT * sizeof(double)); + depths_length = depths_lengthT; + for( uint32_t i = 0; i < depths_length; i++){ + union { + double real; + uint64_t base; + } u_st_depths; + u_st_depths.base = 0; + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_depths = u_st_depths.real; + offset += sizeof(this->st_depths); + memcpy( &(this->depths[i]), &(this->st_depths), sizeof(double)); + } + return offset; + } + + const char * getType(){ return "gazebo_msgs/ContactState"; }; + const char * getMD5(){ return "48c0ffb054b8c444f870cecea1ee50d9"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ContactsState.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ContactsState.h new file mode 100644 index 0000000000000000000000000000000000000000..9af62c0236887b6eccde24e0194839a949971e06 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ContactsState.h @@ -0,0 +1,70 @@ +#ifndef _ROS_gazebo_msgs_ContactsState_h +#define _ROS_gazebo_msgs_ContactsState_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "gazebo_msgs/ContactState.h" + +namespace gazebo_msgs +{ + + class ContactsState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t states_length; + typedef gazebo_msgs::ContactState _states_type; + _states_type st_states; + _states_type * states; + + ContactsState(): + header(), + states_length(0), states(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->states_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->states_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->states_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->states_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->states_length); + for( uint32_t i = 0; i < states_length; i++){ + offset += this->states[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t states_lengthT = ((uint32_t) (*(inbuffer + offset))); + states_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + states_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + states_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->states_length); + if(states_lengthT > states_length) + this->states = (gazebo_msgs::ContactState*)realloc(this->states, states_lengthT * sizeof(gazebo_msgs::ContactState)); + states_length = states_lengthT; + for( uint32_t i = 0; i < states_length; i++){ + offset += this->st_states.deserialize(inbuffer + offset); + memcpy( &(this->states[i]), &(this->st_states), sizeof(gazebo_msgs::ContactState)); + } + return offset; + } + + const char * getType(){ return "gazebo_msgs/ContactsState"; }; + const char * getMD5(){ return "acbcb1601a8e525bf72509f18e6f668d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/DeleteLight.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/DeleteLight.h new file mode 100644 index 0000000000000000000000000000000000000000..54a9c5d84c9d82134892db1ce2f485b30c05e73a --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/DeleteLight.h @@ -0,0 +1,122 @@ +#ifndef _ROS_SERVICE_DeleteLight_h +#define _ROS_SERVICE_DeleteLight_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char DELETELIGHT[] = "gazebo_msgs/DeleteLight"; + + class DeleteLightRequest : public ros::Msg + { + public: + typedef const char* _light_name_type; + _light_name_type light_name; + + DeleteLightRequest(): + light_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_light_name = strlen(this->light_name); + varToArr(outbuffer + offset, length_light_name); + offset += 4; + memcpy(outbuffer + offset, this->light_name, length_light_name); + offset += length_light_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_light_name; + arrToVar(length_light_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_light_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_light_name-1]=0; + this->light_name = (char *)(inbuffer + offset-1); + offset += length_light_name; + return offset; + } + + const char * getType(){ return DELETELIGHT; }; + const char * getMD5(){ return "4fb676dfb4741fc866365702a859441c"; }; + + }; + + class DeleteLightResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + DeleteLightResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return DELETELIGHT; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class DeleteLight { + public: + typedef DeleteLightRequest Request; + typedef DeleteLightResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/DeleteModel.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/DeleteModel.h new file mode 100644 index 0000000000000000000000000000000000000000..00da12dc6f6bd7c40f0c2203308dfd8b568a01e6 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/DeleteModel.h @@ -0,0 +1,122 @@ +#ifndef _ROS_SERVICE_DeleteModel_h +#define _ROS_SERVICE_DeleteModel_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char DELETEMODEL[] = "gazebo_msgs/DeleteModel"; + + class DeleteModelRequest : public ros::Msg + { + public: + typedef const char* _model_name_type; + _model_name_type model_name; + + DeleteModelRequest(): + model_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_model_name = strlen(this->model_name); + varToArr(outbuffer + offset, length_model_name); + offset += 4; + memcpy(outbuffer + offset, this->model_name, length_model_name); + offset += length_model_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_model_name; + arrToVar(length_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_name-1]=0; + this->model_name = (char *)(inbuffer + offset-1); + offset += length_model_name; + return offset; + } + + const char * getType(){ return DELETEMODEL; }; + const char * getMD5(){ return "ea31c8eab6fc401383cf528a7c0984ba"; }; + + }; + + class DeleteModelResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + DeleteModelResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return DELETEMODEL; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class DeleteModel { + public: + typedef DeleteModelRequest Request; + typedef DeleteModelResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetJointProperties.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetJointProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..6ad0fe916cd4b0cb385017204bb8deabbb27965c --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetJointProperties.h @@ -0,0 +1,291 @@ +#ifndef _ROS_SERVICE_GetJointProperties_h +#define _ROS_SERVICE_GetJointProperties_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char GETJOINTPROPERTIES[] = "gazebo_msgs/GetJointProperties"; + + class GetJointPropertiesRequest : public ros::Msg + { + public: + typedef const char* _joint_name_type; + _joint_name_type joint_name; + + GetJointPropertiesRequest(): + joint_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_joint_name = strlen(this->joint_name); + varToArr(outbuffer + offset, length_joint_name); + offset += 4; + memcpy(outbuffer + offset, this->joint_name, length_joint_name); + offset += length_joint_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_joint_name; + arrToVar(length_joint_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_joint_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_joint_name-1]=0; + this->joint_name = (char *)(inbuffer + offset-1); + offset += length_joint_name; + return offset; + } + + const char * getType(){ return GETJOINTPROPERTIES; }; + const char * getMD5(){ return "0be1351618e1dc030eb7959d9a4902de"; }; + + }; + + class GetJointPropertiesResponse : public ros::Msg + { + public: + typedef uint8_t _type_type; + _type_type type; + uint32_t damping_length; + typedef double _damping_type; + _damping_type st_damping; + _damping_type * damping; + uint32_t position_length; + typedef double _position_type; + _position_type st_position; + _position_type * position; + uint32_t rate_length; + typedef double _rate_type; + _rate_type st_rate; + _rate_type * rate; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + enum { REVOLUTE = 0 }; + enum { CONTINUOUS = 1 }; + enum { PRISMATIC = 2 }; + enum { FIXED = 3 }; + enum { BALL = 4 }; + enum { UNIVERSAL = 5 }; + + GetJointPropertiesResponse(): + type(0), + damping_length(0), damping(NULL), + position_length(0), position(NULL), + rate_length(0), rate(NULL), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->type >> (8 * 0)) & 0xFF; + offset += sizeof(this->type); + *(outbuffer + offset + 0) = (this->damping_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->damping_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->damping_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->damping_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->damping_length); + for( uint32_t i = 0; i < damping_length; i++){ + union { + double real; + uint64_t base; + } u_dampingi; + u_dampingi.real = this->damping[i]; + *(outbuffer + offset + 0) = (u_dampingi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_dampingi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_dampingi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_dampingi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_dampingi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_dampingi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_dampingi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_dampingi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->damping[i]); + } + *(outbuffer + offset + 0) = (this->position_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->position_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->position_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->position_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->position_length); + for( uint32_t i = 0; i < position_length; i++){ + union { + double real; + uint64_t base; + } u_positioni; + u_positioni.real = this->position[i]; + *(outbuffer + offset + 0) = (u_positioni.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_positioni.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_positioni.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_positioni.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_positioni.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_positioni.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_positioni.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_positioni.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position[i]); + } + *(outbuffer + offset + 0) = (this->rate_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->rate_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->rate_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->rate_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->rate_length); + for( uint32_t i = 0; i < rate_length; i++){ + union { + double real; + uint64_t base; + } u_ratei; + u_ratei.real = this->rate[i]; + *(outbuffer + offset + 0) = (u_ratei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ratei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ratei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ratei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ratei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ratei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ratei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ratei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->rate[i]); + } + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->type); + uint32_t damping_lengthT = ((uint32_t) (*(inbuffer + offset))); + damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->damping_length); + if(damping_lengthT > damping_length) + this->damping = (double*)realloc(this->damping, damping_lengthT * sizeof(double)); + damping_length = damping_lengthT; + for( uint32_t i = 0; i < damping_length; i++){ + union { + double real; + uint64_t base; + } u_st_damping; + u_st_damping.base = 0; + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_damping = u_st_damping.real; + offset += sizeof(this->st_damping); + memcpy( &(this->damping[i]), &(this->st_damping), sizeof(double)); + } + uint32_t position_lengthT = ((uint32_t) (*(inbuffer + offset))); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->position_length); + if(position_lengthT > position_length) + this->position = (double*)realloc(this->position, position_lengthT * sizeof(double)); + position_length = position_lengthT; + for( uint32_t i = 0; i < position_length; i++){ + union { + double real; + uint64_t base; + } u_st_position; + u_st_position.base = 0; + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_position = u_st_position.real; + offset += sizeof(this->st_position); + memcpy( &(this->position[i]), &(this->st_position), sizeof(double)); + } + uint32_t rate_lengthT = ((uint32_t) (*(inbuffer + offset))); + rate_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + rate_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + rate_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->rate_length); + if(rate_lengthT > rate_length) + this->rate = (double*)realloc(this->rate, rate_lengthT * sizeof(double)); + rate_length = rate_lengthT; + for( uint32_t i = 0; i < rate_length; i++){ + union { + double real; + uint64_t base; + } u_st_rate; + u_st_rate.base = 0; + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_rate = u_st_rate.real; + offset += sizeof(this->st_rate); + memcpy( &(this->rate[i]), &(this->st_rate), sizeof(double)); + } + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETJOINTPROPERTIES; }; + const char * getMD5(){ return "cd7b30a39faa372283dc94c5f6457f82"; }; + + }; + + class GetJointProperties { + public: + typedef GetJointPropertiesRequest Request; + typedef GetJointPropertiesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetLightProperties.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetLightProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..721018679f449cfe5622c08c1036fc42d693bfec --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetLightProperties.h @@ -0,0 +1,224 @@ +#ifndef _ROS_SERVICE_GetLightProperties_h +#define _ROS_SERVICE_GetLightProperties_h +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/ColorRGBA.h" + +namespace gazebo_msgs +{ + +static const char GETLIGHTPROPERTIES[] = "gazebo_msgs/GetLightProperties"; + + class GetLightPropertiesRequest : public ros::Msg + { + public: + typedef const char* _light_name_type; + _light_name_type light_name; + + GetLightPropertiesRequest(): + light_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_light_name = strlen(this->light_name); + varToArr(outbuffer + offset, length_light_name); + offset += 4; + memcpy(outbuffer + offset, this->light_name, length_light_name); + offset += length_light_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_light_name; + arrToVar(length_light_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_light_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_light_name-1]=0; + this->light_name = (char *)(inbuffer + offset-1); + offset += length_light_name; + return offset; + } + + const char * getType(){ return GETLIGHTPROPERTIES; }; + const char * getMD5(){ return "4fb676dfb4741fc866365702a859441c"; }; + + }; + + class GetLightPropertiesResponse : public ros::Msg + { + public: + typedef std_msgs::ColorRGBA _diffuse_type; + _diffuse_type diffuse; + typedef double _attenuation_constant_type; + _attenuation_constant_type attenuation_constant; + typedef double _attenuation_linear_type; + _attenuation_linear_type attenuation_linear; + typedef double _attenuation_quadratic_type; + _attenuation_quadratic_type attenuation_quadratic; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + GetLightPropertiesResponse(): + diffuse(), + attenuation_constant(0), + attenuation_linear(0), + attenuation_quadratic(0), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->diffuse.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_attenuation_constant; + u_attenuation_constant.real = this->attenuation_constant; + *(outbuffer + offset + 0) = (u_attenuation_constant.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_attenuation_constant.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_attenuation_constant.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_attenuation_constant.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_attenuation_constant.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_attenuation_constant.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_attenuation_constant.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_attenuation_constant.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->attenuation_constant); + union { + double real; + uint64_t base; + } u_attenuation_linear; + u_attenuation_linear.real = this->attenuation_linear; + *(outbuffer + offset + 0) = (u_attenuation_linear.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_attenuation_linear.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_attenuation_linear.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_attenuation_linear.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_attenuation_linear.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_attenuation_linear.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_attenuation_linear.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_attenuation_linear.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->attenuation_linear); + union { + double real; + uint64_t base; + } u_attenuation_quadratic; + u_attenuation_quadratic.real = this->attenuation_quadratic; + *(outbuffer + offset + 0) = (u_attenuation_quadratic.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_attenuation_quadratic.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_attenuation_quadratic.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_attenuation_quadratic.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_attenuation_quadratic.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_attenuation_quadratic.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_attenuation_quadratic.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_attenuation_quadratic.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->attenuation_quadratic); + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->diffuse.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_attenuation_constant; + u_attenuation_constant.base = 0; + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->attenuation_constant = u_attenuation_constant.real; + offset += sizeof(this->attenuation_constant); + union { + double real; + uint64_t base; + } u_attenuation_linear; + u_attenuation_linear.base = 0; + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->attenuation_linear = u_attenuation_linear.real; + offset += sizeof(this->attenuation_linear); + union { + double real; + uint64_t base; + } u_attenuation_quadratic; + u_attenuation_quadratic.base = 0; + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->attenuation_quadratic = u_attenuation_quadratic.real; + offset += sizeof(this->attenuation_quadratic); + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETLIGHTPROPERTIES; }; + const char * getMD5(){ return "9a19ddd5aab4c13b7643d1722c709f1f"; }; + + }; + + class GetLightProperties { + public: + typedef GetLightPropertiesRequest Request; + typedef GetLightPropertiesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetLinkProperties.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetLinkProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..0d4173f2dff8fe46df53949d2edb244ed55c95a0 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetLinkProperties.h @@ -0,0 +1,370 @@ +#ifndef _ROS_SERVICE_GetLinkProperties_h +#define _ROS_SERVICE_GetLinkProperties_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" + +namespace gazebo_msgs +{ + +static const char GETLINKPROPERTIES[] = "gazebo_msgs/GetLinkProperties"; + + class GetLinkPropertiesRequest : public ros::Msg + { + public: + typedef const char* _link_name_type; + _link_name_type link_name; + + GetLinkPropertiesRequest(): + link_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_link_name = strlen(this->link_name); + varToArr(outbuffer + offset, length_link_name); + offset += 4; + memcpy(outbuffer + offset, this->link_name, length_link_name); + offset += length_link_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_link_name; + arrToVar(length_link_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_link_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_link_name-1]=0; + this->link_name = (char *)(inbuffer + offset-1); + offset += length_link_name; + return offset; + } + + const char * getType(){ return GETLINKPROPERTIES; }; + const char * getMD5(){ return "7d82d60381f1b66a30f2157f60884345"; }; + + }; + + class GetLinkPropertiesResponse : public ros::Msg + { + public: + typedef geometry_msgs::Pose _com_type; + _com_type com; + typedef bool _gravity_mode_type; + _gravity_mode_type gravity_mode; + typedef double _mass_type; + _mass_type mass; + typedef double _ixx_type; + _ixx_type ixx; + typedef double _ixy_type; + _ixy_type ixy; + typedef double _ixz_type; + _ixz_type ixz; + typedef double _iyy_type; + _iyy_type iyy; + typedef double _iyz_type; + _iyz_type iyz; + typedef double _izz_type; + _izz_type izz; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + GetLinkPropertiesResponse(): + com(), + gravity_mode(0), + mass(0), + ixx(0), + ixy(0), + ixz(0), + iyy(0), + iyz(0), + izz(0), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->com.serialize(outbuffer + offset); + union { + bool real; + uint8_t base; + } u_gravity_mode; + u_gravity_mode.real = this->gravity_mode; + *(outbuffer + offset + 0) = (u_gravity_mode.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->gravity_mode); + union { + double real; + uint64_t base; + } u_mass; + u_mass.real = this->mass; + *(outbuffer + offset + 0) = (u_mass.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_mass.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_mass.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_mass.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_mass.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_mass.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_mass.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_mass.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->mass); + union { + double real; + uint64_t base; + } u_ixx; + u_ixx.real = this->ixx; + *(outbuffer + offset + 0) = (u_ixx.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixx.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixx.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixx.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixx.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixx.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixx.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixx.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixx); + union { + double real; + uint64_t base; + } u_ixy; + u_ixy.real = this->ixy; + *(outbuffer + offset + 0) = (u_ixy.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixy.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixy.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixy.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixy.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixy.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixy.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixy.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixy); + union { + double real; + uint64_t base; + } u_ixz; + u_ixz.real = this->ixz; + *(outbuffer + offset + 0) = (u_ixz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixz); + union { + double real; + uint64_t base; + } u_iyy; + u_iyy.real = this->iyy; + *(outbuffer + offset + 0) = (u_iyy.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_iyy.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_iyy.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_iyy.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_iyy.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_iyy.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_iyy.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_iyy.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->iyy); + union { + double real; + uint64_t base; + } u_iyz; + u_iyz.real = this->iyz; + *(outbuffer + offset + 0) = (u_iyz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_iyz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_iyz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_iyz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_iyz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_iyz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_iyz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_iyz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->iyz); + union { + double real; + uint64_t base; + } u_izz; + u_izz.real = this->izz; + *(outbuffer + offset + 0) = (u_izz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_izz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_izz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_izz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_izz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_izz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_izz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_izz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->izz); + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->com.deserialize(inbuffer + offset); + union { + bool real; + uint8_t base; + } u_gravity_mode; + u_gravity_mode.base = 0; + u_gravity_mode.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->gravity_mode = u_gravity_mode.real; + offset += sizeof(this->gravity_mode); + union { + double real; + uint64_t base; + } u_mass; + u_mass.base = 0; + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->mass = u_mass.real; + offset += sizeof(this->mass); + union { + double real; + uint64_t base; + } u_ixx; + u_ixx.base = 0; + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixx = u_ixx.real; + offset += sizeof(this->ixx); + union { + double real; + uint64_t base; + } u_ixy; + u_ixy.base = 0; + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixy = u_ixy.real; + offset += sizeof(this->ixy); + union { + double real; + uint64_t base; + } u_ixz; + u_ixz.base = 0; + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixz = u_ixz.real; + offset += sizeof(this->ixz); + union { + double real; + uint64_t base; + } u_iyy; + u_iyy.base = 0; + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->iyy = u_iyy.real; + offset += sizeof(this->iyy); + union { + double real; + uint64_t base; + } u_iyz; + u_iyz.base = 0; + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->iyz = u_iyz.real; + offset += sizeof(this->iyz); + union { + double real; + uint64_t base; + } u_izz; + u_izz.base = 0; + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->izz = u_izz.real; + offset += sizeof(this->izz); + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETLINKPROPERTIES; }; + const char * getMD5(){ return "a8619f92d17cfcc3958c0fd13299443d"; }; + + }; + + class GetLinkProperties { + public: + typedef GetLinkPropertiesRequest Request; + typedef GetLinkPropertiesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetLinkState.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetLinkState.h new file mode 100644 index 0000000000000000000000000000000000000000..5e207644d5cc22860ea7d7a241ce2fef7be86791 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetLinkState.h @@ -0,0 +1,145 @@ +#ifndef _ROS_SERVICE_GetLinkState_h +#define _ROS_SERVICE_GetLinkState_h +#include +#include +#include +#include "ros/msg.h" +#include "gazebo_msgs/LinkState.h" + +namespace gazebo_msgs +{ + +static const char GETLINKSTATE[] = "gazebo_msgs/GetLinkState"; + + class GetLinkStateRequest : public ros::Msg + { + public: + typedef const char* _link_name_type; + _link_name_type link_name; + typedef const char* _reference_frame_type; + _reference_frame_type reference_frame; + + GetLinkStateRequest(): + link_name(""), + reference_frame("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_link_name = strlen(this->link_name); + varToArr(outbuffer + offset, length_link_name); + offset += 4; + memcpy(outbuffer + offset, this->link_name, length_link_name); + offset += length_link_name; + uint32_t length_reference_frame = strlen(this->reference_frame); + varToArr(outbuffer + offset, length_reference_frame); + offset += 4; + memcpy(outbuffer + offset, this->reference_frame, length_reference_frame); + offset += length_reference_frame; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_link_name; + arrToVar(length_link_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_link_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_link_name-1]=0; + this->link_name = (char *)(inbuffer + offset-1); + offset += length_link_name; + uint32_t length_reference_frame; + arrToVar(length_reference_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_reference_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_reference_frame-1]=0; + this->reference_frame = (char *)(inbuffer + offset-1); + offset += length_reference_frame; + return offset; + } + + const char * getType(){ return GETLINKSTATE; }; + const char * getMD5(){ return "7551675c30aaa71f7c288d4864552001"; }; + + }; + + class GetLinkStateResponse : public ros::Msg + { + public: + typedef gazebo_msgs::LinkState _link_state_type; + _link_state_type link_state; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + GetLinkStateResponse(): + link_state(), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->link_state.serialize(outbuffer + offset); + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->link_state.deserialize(inbuffer + offset); + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETLINKSTATE; }; + const char * getMD5(){ return "8ba55ad34f9c072e75c0de57b089753b"; }; + + }; + + class GetLinkState { + public: + typedef GetLinkStateRequest Request; + typedef GetLinkStateResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetModelProperties.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetModelProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..082e688b3134dad92c29f9e3038770afb33dda9e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetModelProperties.h @@ -0,0 +1,322 @@ +#ifndef _ROS_SERVICE_GetModelProperties_h +#define _ROS_SERVICE_GetModelProperties_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char GETMODELPROPERTIES[] = "gazebo_msgs/GetModelProperties"; + + class GetModelPropertiesRequest : public ros::Msg + { + public: + typedef const char* _model_name_type; + _model_name_type model_name; + + GetModelPropertiesRequest(): + model_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_model_name = strlen(this->model_name); + varToArr(outbuffer + offset, length_model_name); + offset += 4; + memcpy(outbuffer + offset, this->model_name, length_model_name); + offset += length_model_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_model_name; + arrToVar(length_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_name-1]=0; + this->model_name = (char *)(inbuffer + offset-1); + offset += length_model_name; + return offset; + } + + const char * getType(){ return GETMODELPROPERTIES; }; + const char * getMD5(){ return "ea31c8eab6fc401383cf528a7c0984ba"; }; + + }; + + class GetModelPropertiesResponse : public ros::Msg + { + public: + typedef const char* _parent_model_name_type; + _parent_model_name_type parent_model_name; + typedef const char* _canonical_body_name_type; + _canonical_body_name_type canonical_body_name; + uint32_t body_names_length; + typedef char* _body_names_type; + _body_names_type st_body_names; + _body_names_type * body_names; + uint32_t geom_names_length; + typedef char* _geom_names_type; + _geom_names_type st_geom_names; + _geom_names_type * geom_names; + uint32_t joint_names_length; + typedef char* _joint_names_type; + _joint_names_type st_joint_names; + _joint_names_type * joint_names; + uint32_t child_model_names_length; + typedef char* _child_model_names_type; + _child_model_names_type st_child_model_names; + _child_model_names_type * child_model_names; + typedef bool _is_static_type; + _is_static_type is_static; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + GetModelPropertiesResponse(): + parent_model_name(""), + canonical_body_name(""), + body_names_length(0), body_names(NULL), + geom_names_length(0), geom_names(NULL), + joint_names_length(0), joint_names(NULL), + child_model_names_length(0), child_model_names(NULL), + is_static(0), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_parent_model_name = strlen(this->parent_model_name); + varToArr(outbuffer + offset, length_parent_model_name); + offset += 4; + memcpy(outbuffer + offset, this->parent_model_name, length_parent_model_name); + offset += length_parent_model_name; + uint32_t length_canonical_body_name = strlen(this->canonical_body_name); + varToArr(outbuffer + offset, length_canonical_body_name); + offset += 4; + memcpy(outbuffer + offset, this->canonical_body_name, length_canonical_body_name); + offset += length_canonical_body_name; + *(outbuffer + offset + 0) = (this->body_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->body_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->body_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->body_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->body_names_length); + for( uint32_t i = 0; i < body_names_length; i++){ + uint32_t length_body_namesi = strlen(this->body_names[i]); + varToArr(outbuffer + offset, length_body_namesi); + offset += 4; + memcpy(outbuffer + offset, this->body_names[i], length_body_namesi); + offset += length_body_namesi; + } + *(outbuffer + offset + 0) = (this->geom_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->geom_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->geom_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->geom_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->geom_names_length); + for( uint32_t i = 0; i < geom_names_length; i++){ + uint32_t length_geom_namesi = strlen(this->geom_names[i]); + varToArr(outbuffer + offset, length_geom_namesi); + offset += 4; + memcpy(outbuffer + offset, this->geom_names[i], length_geom_namesi); + offset += length_geom_namesi; + } + *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_names_length); + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_joint_namesi = strlen(this->joint_names[i]); + varToArr(outbuffer + offset, length_joint_namesi); + offset += 4; + memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); + offset += length_joint_namesi; + } + *(outbuffer + offset + 0) = (this->child_model_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->child_model_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->child_model_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->child_model_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->child_model_names_length); + for( uint32_t i = 0; i < child_model_names_length; i++){ + uint32_t length_child_model_namesi = strlen(this->child_model_names[i]); + varToArr(outbuffer + offset, length_child_model_namesi); + offset += 4; + memcpy(outbuffer + offset, this->child_model_names[i], length_child_model_namesi); + offset += length_child_model_namesi; + } + union { + bool real; + uint8_t base; + } u_is_static; + u_is_static.real = this->is_static; + *(outbuffer + offset + 0) = (u_is_static.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->is_static); + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_parent_model_name; + arrToVar(length_parent_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_parent_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_parent_model_name-1]=0; + this->parent_model_name = (char *)(inbuffer + offset-1); + offset += length_parent_model_name; + uint32_t length_canonical_body_name; + arrToVar(length_canonical_body_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_canonical_body_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_canonical_body_name-1]=0; + this->canonical_body_name = (char *)(inbuffer + offset-1); + offset += length_canonical_body_name; + uint32_t body_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + body_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + body_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + body_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->body_names_length); + if(body_names_lengthT > body_names_length) + this->body_names = (char**)realloc(this->body_names, body_names_lengthT * sizeof(char*)); + body_names_length = body_names_lengthT; + for( uint32_t i = 0; i < body_names_length; i++){ + uint32_t length_st_body_names; + arrToVar(length_st_body_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_body_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_body_names-1]=0; + this->st_body_names = (char *)(inbuffer + offset-1); + offset += length_st_body_names; + memcpy( &(this->body_names[i]), &(this->st_body_names), sizeof(char*)); + } + uint32_t geom_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + geom_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + geom_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + geom_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->geom_names_length); + if(geom_names_lengthT > geom_names_length) + this->geom_names = (char**)realloc(this->geom_names, geom_names_lengthT * sizeof(char*)); + geom_names_length = geom_names_lengthT; + for( uint32_t i = 0; i < geom_names_length; i++){ + uint32_t length_st_geom_names; + arrToVar(length_st_geom_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_geom_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_geom_names-1]=0; + this->st_geom_names = (char *)(inbuffer + offset-1); + offset += length_st_geom_names; + memcpy( &(this->geom_names[i]), &(this->st_geom_names), sizeof(char*)); + } + uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_names_length); + if(joint_names_lengthT > joint_names_length) + this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); + joint_names_length = joint_names_lengthT; + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_st_joint_names; + arrToVar(length_st_joint_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_joint_names-1]=0; + this->st_joint_names = (char *)(inbuffer + offset-1); + offset += length_st_joint_names; + memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); + } + uint32_t child_model_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + child_model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + child_model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + child_model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->child_model_names_length); + if(child_model_names_lengthT > child_model_names_length) + this->child_model_names = (char**)realloc(this->child_model_names, child_model_names_lengthT * sizeof(char*)); + child_model_names_length = child_model_names_lengthT; + for( uint32_t i = 0; i < child_model_names_length; i++){ + uint32_t length_st_child_model_names; + arrToVar(length_st_child_model_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_child_model_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_child_model_names-1]=0; + this->st_child_model_names = (char *)(inbuffer + offset-1); + offset += length_st_child_model_names; + memcpy( &(this->child_model_names[i]), &(this->st_child_model_names), sizeof(char*)); + } + union { + bool real; + uint8_t base; + } u_is_static; + u_is_static.base = 0; + u_is_static.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->is_static = u_is_static.real; + offset += sizeof(this->is_static); + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETMODELPROPERTIES; }; + const char * getMD5(){ return "b7f370938ef77b464b95f1bab3ec5028"; }; + + }; + + class GetModelProperties { + public: + typedef GetModelPropertiesRequest Request; + typedef GetModelPropertiesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetModelState.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetModelState.h new file mode 100644 index 0000000000000000000000000000000000000000..0dbcc8159b968dfc167caef10fb7f1cf93306a13 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetModelState.h @@ -0,0 +1,157 @@ +#ifndef _ROS_SERVICE_GetModelState_h +#define _ROS_SERVICE_GetModelState_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Twist.h" +#include "std_msgs/Header.h" + +namespace gazebo_msgs +{ + +static const char GETMODELSTATE[] = "gazebo_msgs/GetModelState"; + + class GetModelStateRequest : public ros::Msg + { + public: + typedef const char* _model_name_type; + _model_name_type model_name; + typedef const char* _relative_entity_name_type; + _relative_entity_name_type relative_entity_name; + + GetModelStateRequest(): + model_name(""), + relative_entity_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_model_name = strlen(this->model_name); + varToArr(outbuffer + offset, length_model_name); + offset += 4; + memcpy(outbuffer + offset, this->model_name, length_model_name); + offset += length_model_name; + uint32_t length_relative_entity_name = strlen(this->relative_entity_name); + varToArr(outbuffer + offset, length_relative_entity_name); + offset += 4; + memcpy(outbuffer + offset, this->relative_entity_name, length_relative_entity_name); + offset += length_relative_entity_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_model_name; + arrToVar(length_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_name-1]=0; + this->model_name = (char *)(inbuffer + offset-1); + offset += length_model_name; + uint32_t length_relative_entity_name; + arrToVar(length_relative_entity_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_relative_entity_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_relative_entity_name-1]=0; + this->relative_entity_name = (char *)(inbuffer + offset-1); + offset += length_relative_entity_name; + return offset; + } + + const char * getType(){ return GETMODELSTATE; }; + const char * getMD5(){ return "19d412713cefe4a67437e17a951e759e"; }; + + }; + + class GetModelStateResponse : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + typedef geometry_msgs::Twist _twist_type; + _twist_type twist; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + GetModelStateResponse(): + header(), + pose(), + twist(), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->pose.serialize(outbuffer + offset); + offset += this->twist.serialize(outbuffer + offset); + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->pose.deserialize(inbuffer + offset); + offset += this->twist.deserialize(inbuffer + offset); + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETMODELSTATE; }; + const char * getMD5(){ return "ccd51739bb00f0141629e87b792e92b9"; }; + + }; + + class GetModelState { + public: + typedef GetModelStateRequest Request; + typedef GetModelStateResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetPhysicsProperties.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetPhysicsProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..f79bc89a80fd67ea2fba10b24660b6cc49785e16 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetPhysicsProperties.h @@ -0,0 +1,199 @@ +#ifndef _ROS_SERVICE_GetPhysicsProperties_h +#define _ROS_SERVICE_GetPhysicsProperties_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Vector3.h" +#include "gazebo_msgs/ODEPhysics.h" + +namespace gazebo_msgs +{ + +static const char GETPHYSICSPROPERTIES[] = "gazebo_msgs/GetPhysicsProperties"; + + class GetPhysicsPropertiesRequest : public ros::Msg + { + public: + + GetPhysicsPropertiesRequest() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return GETPHYSICSPROPERTIES; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetPhysicsPropertiesResponse : public ros::Msg + { + public: + typedef double _time_step_type; + _time_step_type time_step; + typedef bool _pause_type; + _pause_type pause; + typedef double _max_update_rate_type; + _max_update_rate_type max_update_rate; + typedef geometry_msgs::Vector3 _gravity_type; + _gravity_type gravity; + typedef gazebo_msgs::ODEPhysics _ode_config_type; + _ode_config_type ode_config; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + GetPhysicsPropertiesResponse(): + time_step(0), + pause(0), + max_update_rate(0), + gravity(), + ode_config(), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_time_step; + u_time_step.real = this->time_step; + *(outbuffer + offset + 0) = (u_time_step.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_time_step.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_time_step.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_time_step.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_time_step.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_time_step.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_time_step.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_time_step.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->time_step); + union { + bool real; + uint8_t base; + } u_pause; + u_pause.real = this->pause; + *(outbuffer + offset + 0) = (u_pause.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->pause); + union { + double real; + uint64_t base; + } u_max_update_rate; + u_max_update_rate.real = this->max_update_rate; + *(outbuffer + offset + 0) = (u_max_update_rate.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_update_rate.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_update_rate.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_update_rate.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max_update_rate.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max_update_rate.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max_update_rate.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max_update_rate.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max_update_rate); + offset += this->gravity.serialize(outbuffer + offset); + offset += this->ode_config.serialize(outbuffer + offset); + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_time_step; + u_time_step.base = 0; + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->time_step = u_time_step.real; + offset += sizeof(this->time_step); + union { + bool real; + uint8_t base; + } u_pause; + u_pause.base = 0; + u_pause.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->pause = u_pause.real; + offset += sizeof(this->pause); + union { + double real; + uint64_t base; + } u_max_update_rate; + u_max_update_rate.base = 0; + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max_update_rate = u_max_update_rate.real; + offset += sizeof(this->max_update_rate); + offset += this->gravity.deserialize(inbuffer + offset); + offset += this->ode_config.deserialize(inbuffer + offset); + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETPHYSICSPROPERTIES; }; + const char * getMD5(){ return "575a5e74786981b7df2e3afc567693a6"; }; + + }; + + class GetPhysicsProperties { + public: + typedef GetPhysicsPropertiesRequest Request; + typedef GetPhysicsPropertiesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetWorldProperties.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetWorldProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..e9170e76633f1f313b6bfb7c74b705ab29853099 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetWorldProperties.h @@ -0,0 +1,192 @@ +#ifndef _ROS_SERVICE_GetWorldProperties_h +#define _ROS_SERVICE_GetWorldProperties_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char GETWORLDPROPERTIES[] = "gazebo_msgs/GetWorldProperties"; + + class GetWorldPropertiesRequest : public ros::Msg + { + public: + + GetWorldPropertiesRequest() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return GETWORLDPROPERTIES; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetWorldPropertiesResponse : public ros::Msg + { + public: + typedef double _sim_time_type; + _sim_time_type sim_time; + uint32_t model_names_length; + typedef char* _model_names_type; + _model_names_type st_model_names; + _model_names_type * model_names; + typedef bool _rendering_enabled_type; + _rendering_enabled_type rendering_enabled; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + GetWorldPropertiesResponse(): + sim_time(0), + model_names_length(0), model_names(NULL), + rendering_enabled(0), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_sim_time; + u_sim_time.real = this->sim_time; + *(outbuffer + offset + 0) = (u_sim_time.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_sim_time.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_sim_time.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_sim_time.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_sim_time.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_sim_time.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_sim_time.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_sim_time.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->sim_time); + *(outbuffer + offset + 0) = (this->model_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->model_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->model_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->model_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->model_names_length); + for( uint32_t i = 0; i < model_names_length; i++){ + uint32_t length_model_namesi = strlen(this->model_names[i]); + varToArr(outbuffer + offset, length_model_namesi); + offset += 4; + memcpy(outbuffer + offset, this->model_names[i], length_model_namesi); + offset += length_model_namesi; + } + union { + bool real; + uint8_t base; + } u_rendering_enabled; + u_rendering_enabled.real = this->rendering_enabled; + *(outbuffer + offset + 0) = (u_rendering_enabled.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->rendering_enabled); + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_sim_time; + u_sim_time.base = 0; + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->sim_time = u_sim_time.real; + offset += sizeof(this->sim_time); + uint32_t model_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->model_names_length); + if(model_names_lengthT > model_names_length) + this->model_names = (char**)realloc(this->model_names, model_names_lengthT * sizeof(char*)); + model_names_length = model_names_lengthT; + for( uint32_t i = 0; i < model_names_length; i++){ + uint32_t length_st_model_names; + arrToVar(length_st_model_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_model_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_model_names-1]=0; + this->st_model_names = (char *)(inbuffer + offset-1); + offset += length_st_model_names; + memcpy( &(this->model_names[i]), &(this->st_model_names), sizeof(char*)); + } + union { + bool real; + uint8_t base; + } u_rendering_enabled; + u_rendering_enabled.base = 0; + u_rendering_enabled.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->rendering_enabled = u_rendering_enabled.real; + offset += sizeof(this->rendering_enabled); + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETWORLDPROPERTIES; }; + const char * getMD5(){ return "36bb0f2eccf4d8be971410c22818ba3f"; }; + + }; + + class GetWorldProperties { + public: + typedef GetWorldPropertiesRequest Request; + typedef GetWorldPropertiesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/JointRequest.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/JointRequest.h new file mode 100644 index 0000000000000000000000000000000000000000..6c2c13ede645be8153c7e0d208e74d41170d1b71 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/JointRequest.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_JointRequest_h +#define _ROS_SERVICE_JointRequest_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char JOINTREQUEST[] = "gazebo_msgs/JointRequest"; + + class JointRequestRequest : public ros::Msg + { + public: + typedef const char* _joint_name_type; + _joint_name_type joint_name; + + JointRequestRequest(): + joint_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_joint_name = strlen(this->joint_name); + varToArr(outbuffer + offset, length_joint_name); + offset += 4; + memcpy(outbuffer + offset, this->joint_name, length_joint_name); + offset += length_joint_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_joint_name; + arrToVar(length_joint_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_joint_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_joint_name-1]=0; + this->joint_name = (char *)(inbuffer + offset-1); + offset += length_joint_name; + return offset; + } + + const char * getType(){ return JOINTREQUEST; }; + const char * getMD5(){ return "0be1351618e1dc030eb7959d9a4902de"; }; + + }; + + class JointRequestResponse : public ros::Msg + { + public: + + JointRequestResponse() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return JOINTREQUEST; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class JointRequest { + public: + typedef JointRequestRequest Request; + typedef JointRequestResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/LinkState.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/LinkState.h new file mode 100644 index 0000000000000000000000000000000000000000..cd2684b3c3f42b2925475aca9a746a9ff0f8ea7a --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/LinkState.h @@ -0,0 +1,84 @@ +#ifndef _ROS_gazebo_msgs_LinkState_h +#define _ROS_gazebo_msgs_LinkState_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Twist.h" + +namespace gazebo_msgs +{ + + class LinkState : public ros::Msg + { + public: + typedef const char* _link_name_type; + _link_name_type link_name; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + typedef geometry_msgs::Twist _twist_type; + _twist_type twist; + typedef const char* _reference_frame_type; + _reference_frame_type reference_frame; + + LinkState(): + link_name(""), + pose(), + twist(), + reference_frame("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_link_name = strlen(this->link_name); + varToArr(outbuffer + offset, length_link_name); + offset += 4; + memcpy(outbuffer + offset, this->link_name, length_link_name); + offset += length_link_name; + offset += this->pose.serialize(outbuffer + offset); + offset += this->twist.serialize(outbuffer + offset); + uint32_t length_reference_frame = strlen(this->reference_frame); + varToArr(outbuffer + offset, length_reference_frame); + offset += 4; + memcpy(outbuffer + offset, this->reference_frame, length_reference_frame); + offset += length_reference_frame; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_link_name; + arrToVar(length_link_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_link_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_link_name-1]=0; + this->link_name = (char *)(inbuffer + offset-1); + offset += length_link_name; + offset += this->pose.deserialize(inbuffer + offset); + offset += this->twist.deserialize(inbuffer + offset); + uint32_t length_reference_frame; + arrToVar(length_reference_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_reference_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_reference_frame-1]=0; + this->reference_frame = (char *)(inbuffer + offset-1); + offset += length_reference_frame; + return offset; + } + + const char * getType(){ return "gazebo_msgs/LinkState"; }; + const char * getMD5(){ return "0818ebbf28ce3a08d48ab1eaa7309ebe"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/LinkStates.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/LinkStates.h new file mode 100644 index 0000000000000000000000000000000000000000..8ec738d0e941ad881121e02f1f8bfdf390c11b6a --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/LinkStates.h @@ -0,0 +1,127 @@ +#ifndef _ROS_gazebo_msgs_LinkStates_h +#define _ROS_gazebo_msgs_LinkStates_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Twist.h" + +namespace gazebo_msgs +{ + + class LinkStates : public ros::Msg + { + public: + uint32_t name_length; + typedef char* _name_type; + _name_type st_name; + _name_type * name; + uint32_t pose_length; + typedef geometry_msgs::Pose _pose_type; + _pose_type st_pose; + _pose_type * pose; + uint32_t twist_length; + typedef geometry_msgs::Twist _twist_type; + _twist_type st_twist; + _twist_type * twist; + + LinkStates(): + name_length(0), name(NULL), + pose_length(0), pose(NULL), + twist_length(0), twist(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->name_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->name_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->name_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->name_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->name_length); + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_namei = strlen(this->name[i]); + varToArr(outbuffer + offset, length_namei); + offset += 4; + memcpy(outbuffer + offset, this->name[i], length_namei); + offset += length_namei; + } + *(outbuffer + offset + 0) = (this->pose_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->pose_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->pose_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->pose_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->pose_length); + for( uint32_t i = 0; i < pose_length; i++){ + offset += this->pose[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->twist_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->twist_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->twist_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->twist_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->twist_length); + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->twist[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t name_lengthT = ((uint32_t) (*(inbuffer + offset))); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->name_length); + if(name_lengthT > name_length) + this->name = (char**)realloc(this->name, name_lengthT * sizeof(char*)); + name_length = name_lengthT; + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_st_name; + arrToVar(length_st_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_name-1]=0; + this->st_name = (char *)(inbuffer + offset-1); + offset += length_st_name; + memcpy( &(this->name[i]), &(this->st_name), sizeof(char*)); + } + uint32_t pose_lengthT = ((uint32_t) (*(inbuffer + offset))); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->pose_length); + if(pose_lengthT > pose_length) + this->pose = (geometry_msgs::Pose*)realloc(this->pose, pose_lengthT * sizeof(geometry_msgs::Pose)); + pose_length = pose_lengthT; + for( uint32_t i = 0; i < pose_length; i++){ + offset += this->st_pose.deserialize(inbuffer + offset); + memcpy( &(this->pose[i]), &(this->st_pose), sizeof(geometry_msgs::Pose)); + } + uint32_t twist_lengthT = ((uint32_t) (*(inbuffer + offset))); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->twist_length); + if(twist_lengthT > twist_length) + this->twist = (geometry_msgs::Twist*)realloc(this->twist, twist_lengthT * sizeof(geometry_msgs::Twist)); + twist_length = twist_lengthT; + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->st_twist.deserialize(inbuffer + offset); + memcpy( &(this->twist[i]), &(this->st_twist), sizeof(geometry_msgs::Twist)); + } + return offset; + } + + const char * getType(){ return "gazebo_msgs/LinkStates"; }; + const char * getMD5(){ return "48c080191eb15c41858319b4d8a609c2"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ModelState.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ModelState.h new file mode 100644 index 0000000000000000000000000000000000000000..4a3cfd1cf72bcefa02bee32c00c6720558e954de --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ModelState.h @@ -0,0 +1,84 @@ +#ifndef _ROS_gazebo_msgs_ModelState_h +#define _ROS_gazebo_msgs_ModelState_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Twist.h" + +namespace gazebo_msgs +{ + + class ModelState : public ros::Msg + { + public: + typedef const char* _model_name_type; + _model_name_type model_name; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + typedef geometry_msgs::Twist _twist_type; + _twist_type twist; + typedef const char* _reference_frame_type; + _reference_frame_type reference_frame; + + ModelState(): + model_name(""), + pose(), + twist(), + reference_frame("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_model_name = strlen(this->model_name); + varToArr(outbuffer + offset, length_model_name); + offset += 4; + memcpy(outbuffer + offset, this->model_name, length_model_name); + offset += length_model_name; + offset += this->pose.serialize(outbuffer + offset); + offset += this->twist.serialize(outbuffer + offset); + uint32_t length_reference_frame = strlen(this->reference_frame); + varToArr(outbuffer + offset, length_reference_frame); + offset += 4; + memcpy(outbuffer + offset, this->reference_frame, length_reference_frame); + offset += length_reference_frame; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_model_name; + arrToVar(length_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_name-1]=0; + this->model_name = (char *)(inbuffer + offset-1); + offset += length_model_name; + offset += this->pose.deserialize(inbuffer + offset); + offset += this->twist.deserialize(inbuffer + offset); + uint32_t length_reference_frame; + arrToVar(length_reference_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_reference_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_reference_frame-1]=0; + this->reference_frame = (char *)(inbuffer + offset-1); + offset += length_reference_frame; + return offset; + } + + const char * getType(){ return "gazebo_msgs/ModelState"; }; + const char * getMD5(){ return "9330fd35f2fcd82d457e54bd54e10593"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ModelStates.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ModelStates.h new file mode 100644 index 0000000000000000000000000000000000000000..f6c66d5297004ff1c06a9ab8acc4346900a1dffb --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ModelStates.h @@ -0,0 +1,127 @@ +#ifndef _ROS_gazebo_msgs_ModelStates_h +#define _ROS_gazebo_msgs_ModelStates_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Twist.h" + +namespace gazebo_msgs +{ + + class ModelStates : public ros::Msg + { + public: + uint32_t name_length; + typedef char* _name_type; + _name_type st_name; + _name_type * name; + uint32_t pose_length; + typedef geometry_msgs::Pose _pose_type; + _pose_type st_pose; + _pose_type * pose; + uint32_t twist_length; + typedef geometry_msgs::Twist _twist_type; + _twist_type st_twist; + _twist_type * twist; + + ModelStates(): + name_length(0), name(NULL), + pose_length(0), pose(NULL), + twist_length(0), twist(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->name_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->name_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->name_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->name_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->name_length); + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_namei = strlen(this->name[i]); + varToArr(outbuffer + offset, length_namei); + offset += 4; + memcpy(outbuffer + offset, this->name[i], length_namei); + offset += length_namei; + } + *(outbuffer + offset + 0) = (this->pose_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->pose_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->pose_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->pose_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->pose_length); + for( uint32_t i = 0; i < pose_length; i++){ + offset += this->pose[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->twist_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->twist_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->twist_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->twist_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->twist_length); + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->twist[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t name_lengthT = ((uint32_t) (*(inbuffer + offset))); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->name_length); + if(name_lengthT > name_length) + this->name = (char**)realloc(this->name, name_lengthT * sizeof(char*)); + name_length = name_lengthT; + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_st_name; + arrToVar(length_st_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_name-1]=0; + this->st_name = (char *)(inbuffer + offset-1); + offset += length_st_name; + memcpy( &(this->name[i]), &(this->st_name), sizeof(char*)); + } + uint32_t pose_lengthT = ((uint32_t) (*(inbuffer + offset))); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->pose_length); + if(pose_lengthT > pose_length) + this->pose = (geometry_msgs::Pose*)realloc(this->pose, pose_lengthT * sizeof(geometry_msgs::Pose)); + pose_length = pose_lengthT; + for( uint32_t i = 0; i < pose_length; i++){ + offset += this->st_pose.deserialize(inbuffer + offset); + memcpy( &(this->pose[i]), &(this->st_pose), sizeof(geometry_msgs::Pose)); + } + uint32_t twist_lengthT = ((uint32_t) (*(inbuffer + offset))); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->twist_length); + if(twist_lengthT > twist_length) + this->twist = (geometry_msgs::Twist*)realloc(this->twist, twist_lengthT * sizeof(geometry_msgs::Twist)); + twist_length = twist_lengthT; + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->st_twist.deserialize(inbuffer + offset); + memcpy( &(this->twist[i]), &(this->st_twist), sizeof(geometry_msgs::Twist)); + } + return offset; + } + + const char * getType(){ return "gazebo_msgs/ModelStates"; }; + const char * getMD5(){ return "48c080191eb15c41858319b4d8a609c2"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ODEJointProperties.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ODEJointProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..c3fba20a3ad1338c1c9bab3efc688e8215c526a2 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ODEJointProperties.h @@ -0,0 +1,558 @@ +#ifndef _ROS_gazebo_msgs_ODEJointProperties_h +#define _ROS_gazebo_msgs_ODEJointProperties_h + +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + + class ODEJointProperties : public ros::Msg + { + public: + uint32_t damping_length; + typedef double _damping_type; + _damping_type st_damping; + _damping_type * damping; + uint32_t hiStop_length; + typedef double _hiStop_type; + _hiStop_type st_hiStop; + _hiStop_type * hiStop; + uint32_t loStop_length; + typedef double _loStop_type; + _loStop_type st_loStop; + _loStop_type * loStop; + uint32_t erp_length; + typedef double _erp_type; + _erp_type st_erp; + _erp_type * erp; + uint32_t cfm_length; + typedef double _cfm_type; + _cfm_type st_cfm; + _cfm_type * cfm; + uint32_t stop_erp_length; + typedef double _stop_erp_type; + _stop_erp_type st_stop_erp; + _stop_erp_type * stop_erp; + uint32_t stop_cfm_length; + typedef double _stop_cfm_type; + _stop_cfm_type st_stop_cfm; + _stop_cfm_type * stop_cfm; + uint32_t fudge_factor_length; + typedef double _fudge_factor_type; + _fudge_factor_type st_fudge_factor; + _fudge_factor_type * fudge_factor; + uint32_t fmax_length; + typedef double _fmax_type; + _fmax_type st_fmax; + _fmax_type * fmax; + uint32_t vel_length; + typedef double _vel_type; + _vel_type st_vel; + _vel_type * vel; + + ODEJointProperties(): + damping_length(0), damping(NULL), + hiStop_length(0), hiStop(NULL), + loStop_length(0), loStop(NULL), + erp_length(0), erp(NULL), + cfm_length(0), cfm(NULL), + stop_erp_length(0), stop_erp(NULL), + stop_cfm_length(0), stop_cfm(NULL), + fudge_factor_length(0), fudge_factor(NULL), + fmax_length(0), fmax(NULL), + vel_length(0), vel(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->damping_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->damping_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->damping_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->damping_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->damping_length); + for( uint32_t i = 0; i < damping_length; i++){ + union { + double real; + uint64_t base; + } u_dampingi; + u_dampingi.real = this->damping[i]; + *(outbuffer + offset + 0) = (u_dampingi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_dampingi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_dampingi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_dampingi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_dampingi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_dampingi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_dampingi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_dampingi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->damping[i]); + } + *(outbuffer + offset + 0) = (this->hiStop_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->hiStop_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->hiStop_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->hiStop_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->hiStop_length); + for( uint32_t i = 0; i < hiStop_length; i++){ + union { + double real; + uint64_t base; + } u_hiStopi; + u_hiStopi.real = this->hiStop[i]; + *(outbuffer + offset + 0) = (u_hiStopi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_hiStopi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_hiStopi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_hiStopi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_hiStopi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_hiStopi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_hiStopi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_hiStopi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->hiStop[i]); + } + *(outbuffer + offset + 0) = (this->loStop_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->loStop_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->loStop_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->loStop_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->loStop_length); + for( uint32_t i = 0; i < loStop_length; i++){ + union { + double real; + uint64_t base; + } u_loStopi; + u_loStopi.real = this->loStop[i]; + *(outbuffer + offset + 0) = (u_loStopi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_loStopi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_loStopi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_loStopi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_loStopi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_loStopi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_loStopi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_loStopi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->loStop[i]); + } + *(outbuffer + offset + 0) = (this->erp_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->erp_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->erp_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->erp_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->erp_length); + for( uint32_t i = 0; i < erp_length; i++){ + union { + double real; + uint64_t base; + } u_erpi; + u_erpi.real = this->erp[i]; + *(outbuffer + offset + 0) = (u_erpi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_erpi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_erpi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_erpi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_erpi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_erpi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_erpi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_erpi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->erp[i]); + } + *(outbuffer + offset + 0) = (this->cfm_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->cfm_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->cfm_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->cfm_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->cfm_length); + for( uint32_t i = 0; i < cfm_length; i++){ + union { + double real; + uint64_t base; + } u_cfmi; + u_cfmi.real = this->cfm[i]; + *(outbuffer + offset + 0) = (u_cfmi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_cfmi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_cfmi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_cfmi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_cfmi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_cfmi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_cfmi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_cfmi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->cfm[i]); + } + *(outbuffer + offset + 0) = (this->stop_erp_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stop_erp_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stop_erp_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stop_erp_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->stop_erp_length); + for( uint32_t i = 0; i < stop_erp_length; i++){ + union { + double real; + uint64_t base; + } u_stop_erpi; + u_stop_erpi.real = this->stop_erp[i]; + *(outbuffer + offset + 0) = (u_stop_erpi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_stop_erpi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_stop_erpi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_stop_erpi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_stop_erpi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_stop_erpi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_stop_erpi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_stop_erpi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->stop_erp[i]); + } + *(outbuffer + offset + 0) = (this->stop_cfm_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stop_cfm_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stop_cfm_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stop_cfm_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->stop_cfm_length); + for( uint32_t i = 0; i < stop_cfm_length; i++){ + union { + double real; + uint64_t base; + } u_stop_cfmi; + u_stop_cfmi.real = this->stop_cfm[i]; + *(outbuffer + offset + 0) = (u_stop_cfmi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_stop_cfmi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_stop_cfmi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_stop_cfmi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_stop_cfmi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_stop_cfmi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_stop_cfmi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_stop_cfmi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->stop_cfm[i]); + } + *(outbuffer + offset + 0) = (this->fudge_factor_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->fudge_factor_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->fudge_factor_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->fudge_factor_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->fudge_factor_length); + for( uint32_t i = 0; i < fudge_factor_length; i++){ + union { + double real; + uint64_t base; + } u_fudge_factori; + u_fudge_factori.real = this->fudge_factor[i]; + *(outbuffer + offset + 0) = (u_fudge_factori.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_fudge_factori.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_fudge_factori.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_fudge_factori.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_fudge_factori.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_fudge_factori.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_fudge_factori.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_fudge_factori.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->fudge_factor[i]); + } + *(outbuffer + offset + 0) = (this->fmax_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->fmax_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->fmax_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->fmax_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->fmax_length); + for( uint32_t i = 0; i < fmax_length; i++){ + union { + double real; + uint64_t base; + } u_fmaxi; + u_fmaxi.real = this->fmax[i]; + *(outbuffer + offset + 0) = (u_fmaxi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_fmaxi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_fmaxi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_fmaxi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_fmaxi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_fmaxi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_fmaxi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_fmaxi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->fmax[i]); + } + *(outbuffer + offset + 0) = (this->vel_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->vel_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->vel_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->vel_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->vel_length); + for( uint32_t i = 0; i < vel_length; i++){ + union { + double real; + uint64_t base; + } u_veli; + u_veli.real = this->vel[i]; + *(outbuffer + offset + 0) = (u_veli.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_veli.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_veli.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_veli.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_veli.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_veli.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_veli.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_veli.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->vel[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t damping_lengthT = ((uint32_t) (*(inbuffer + offset))); + damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->damping_length); + if(damping_lengthT > damping_length) + this->damping = (double*)realloc(this->damping, damping_lengthT * sizeof(double)); + damping_length = damping_lengthT; + for( uint32_t i = 0; i < damping_length; i++){ + union { + double real; + uint64_t base; + } u_st_damping; + u_st_damping.base = 0; + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_damping = u_st_damping.real; + offset += sizeof(this->st_damping); + memcpy( &(this->damping[i]), &(this->st_damping), sizeof(double)); + } + uint32_t hiStop_lengthT = ((uint32_t) (*(inbuffer + offset))); + hiStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + hiStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + hiStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->hiStop_length); + if(hiStop_lengthT > hiStop_length) + this->hiStop = (double*)realloc(this->hiStop, hiStop_lengthT * sizeof(double)); + hiStop_length = hiStop_lengthT; + for( uint32_t i = 0; i < hiStop_length; i++){ + union { + double real; + uint64_t base; + } u_st_hiStop; + u_st_hiStop.base = 0; + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_hiStop = u_st_hiStop.real; + offset += sizeof(this->st_hiStop); + memcpy( &(this->hiStop[i]), &(this->st_hiStop), sizeof(double)); + } + uint32_t loStop_lengthT = ((uint32_t) (*(inbuffer + offset))); + loStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + loStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + loStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->loStop_length); + if(loStop_lengthT > loStop_length) + this->loStop = (double*)realloc(this->loStop, loStop_lengthT * sizeof(double)); + loStop_length = loStop_lengthT; + for( uint32_t i = 0; i < loStop_length; i++){ + union { + double real; + uint64_t base; + } u_st_loStop; + u_st_loStop.base = 0; + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_loStop = u_st_loStop.real; + offset += sizeof(this->st_loStop); + memcpy( &(this->loStop[i]), &(this->st_loStop), sizeof(double)); + } + uint32_t erp_lengthT = ((uint32_t) (*(inbuffer + offset))); + erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->erp_length); + if(erp_lengthT > erp_length) + this->erp = (double*)realloc(this->erp, erp_lengthT * sizeof(double)); + erp_length = erp_lengthT; + for( uint32_t i = 0; i < erp_length; i++){ + union { + double real; + uint64_t base; + } u_st_erp; + u_st_erp.base = 0; + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_erp = u_st_erp.real; + offset += sizeof(this->st_erp); + memcpy( &(this->erp[i]), &(this->st_erp), sizeof(double)); + } + uint32_t cfm_lengthT = ((uint32_t) (*(inbuffer + offset))); + cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->cfm_length); + if(cfm_lengthT > cfm_length) + this->cfm = (double*)realloc(this->cfm, cfm_lengthT * sizeof(double)); + cfm_length = cfm_lengthT; + for( uint32_t i = 0; i < cfm_length; i++){ + union { + double real; + uint64_t base; + } u_st_cfm; + u_st_cfm.base = 0; + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_cfm = u_st_cfm.real; + offset += sizeof(this->st_cfm); + memcpy( &(this->cfm[i]), &(this->st_cfm), sizeof(double)); + } + uint32_t stop_erp_lengthT = ((uint32_t) (*(inbuffer + offset))); + stop_erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + stop_erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + stop_erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stop_erp_length); + if(stop_erp_lengthT > stop_erp_length) + this->stop_erp = (double*)realloc(this->stop_erp, stop_erp_lengthT * sizeof(double)); + stop_erp_length = stop_erp_lengthT; + for( uint32_t i = 0; i < stop_erp_length; i++){ + union { + double real; + uint64_t base; + } u_st_stop_erp; + u_st_stop_erp.base = 0; + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_stop_erp = u_st_stop_erp.real; + offset += sizeof(this->st_stop_erp); + memcpy( &(this->stop_erp[i]), &(this->st_stop_erp), sizeof(double)); + } + uint32_t stop_cfm_lengthT = ((uint32_t) (*(inbuffer + offset))); + stop_cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + stop_cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + stop_cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stop_cfm_length); + if(stop_cfm_lengthT > stop_cfm_length) + this->stop_cfm = (double*)realloc(this->stop_cfm, stop_cfm_lengthT * sizeof(double)); + stop_cfm_length = stop_cfm_lengthT; + for( uint32_t i = 0; i < stop_cfm_length; i++){ + union { + double real; + uint64_t base; + } u_st_stop_cfm; + u_st_stop_cfm.base = 0; + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_stop_cfm = u_st_stop_cfm.real; + offset += sizeof(this->st_stop_cfm); + memcpy( &(this->stop_cfm[i]), &(this->st_stop_cfm), sizeof(double)); + } + uint32_t fudge_factor_lengthT = ((uint32_t) (*(inbuffer + offset))); + fudge_factor_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + fudge_factor_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + fudge_factor_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->fudge_factor_length); + if(fudge_factor_lengthT > fudge_factor_length) + this->fudge_factor = (double*)realloc(this->fudge_factor, fudge_factor_lengthT * sizeof(double)); + fudge_factor_length = fudge_factor_lengthT; + for( uint32_t i = 0; i < fudge_factor_length; i++){ + union { + double real; + uint64_t base; + } u_st_fudge_factor; + u_st_fudge_factor.base = 0; + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_fudge_factor = u_st_fudge_factor.real; + offset += sizeof(this->st_fudge_factor); + memcpy( &(this->fudge_factor[i]), &(this->st_fudge_factor), sizeof(double)); + } + uint32_t fmax_lengthT = ((uint32_t) (*(inbuffer + offset))); + fmax_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + fmax_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + fmax_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->fmax_length); + if(fmax_lengthT > fmax_length) + this->fmax = (double*)realloc(this->fmax, fmax_lengthT * sizeof(double)); + fmax_length = fmax_lengthT; + for( uint32_t i = 0; i < fmax_length; i++){ + union { + double real; + uint64_t base; + } u_st_fmax; + u_st_fmax.base = 0; + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_fmax = u_st_fmax.real; + offset += sizeof(this->st_fmax); + memcpy( &(this->fmax[i]), &(this->st_fmax), sizeof(double)); + } + uint32_t vel_lengthT = ((uint32_t) (*(inbuffer + offset))); + vel_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + vel_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + vel_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->vel_length); + if(vel_lengthT > vel_length) + this->vel = (double*)realloc(this->vel, vel_lengthT * sizeof(double)); + vel_length = vel_lengthT; + for( uint32_t i = 0; i < vel_length; i++){ + union { + double real; + uint64_t base; + } u_st_vel; + u_st_vel.base = 0; + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_vel = u_st_vel.real; + offset += sizeof(this->st_vel); + memcpy( &(this->vel[i]), &(this->st_vel), sizeof(double)); + } + return offset; + } + + const char * getType(){ return "gazebo_msgs/ODEJointProperties"; }; + const char * getMD5(){ return "1b744c32a920af979f53afe2f9c3511f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ODEPhysics.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ODEPhysics.h new file mode 100644 index 0000000000000000000000000000000000000000..dcb60385b640e945e55415f0defbfbea881eaac1 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/ODEPhysics.h @@ -0,0 +1,287 @@ +#ifndef _ROS_gazebo_msgs_ODEPhysics_h +#define _ROS_gazebo_msgs_ODEPhysics_h + +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + + class ODEPhysics : public ros::Msg + { + public: + typedef bool _auto_disable_bodies_type; + _auto_disable_bodies_type auto_disable_bodies; + typedef uint32_t _sor_pgs_precon_iters_type; + _sor_pgs_precon_iters_type sor_pgs_precon_iters; + typedef uint32_t _sor_pgs_iters_type; + _sor_pgs_iters_type sor_pgs_iters; + typedef double _sor_pgs_w_type; + _sor_pgs_w_type sor_pgs_w; + typedef double _sor_pgs_rms_error_tol_type; + _sor_pgs_rms_error_tol_type sor_pgs_rms_error_tol; + typedef double _contact_surface_layer_type; + _contact_surface_layer_type contact_surface_layer; + typedef double _contact_max_correcting_vel_type; + _contact_max_correcting_vel_type contact_max_correcting_vel; + typedef double _cfm_type; + _cfm_type cfm; + typedef double _erp_type; + _erp_type erp; + typedef uint32_t _max_contacts_type; + _max_contacts_type max_contacts; + + ODEPhysics(): + auto_disable_bodies(0), + sor_pgs_precon_iters(0), + sor_pgs_iters(0), + sor_pgs_w(0), + sor_pgs_rms_error_tol(0), + contact_surface_layer(0), + contact_max_correcting_vel(0), + cfm(0), + erp(0), + max_contacts(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_auto_disable_bodies; + u_auto_disable_bodies.real = this->auto_disable_bodies; + *(outbuffer + offset + 0) = (u_auto_disable_bodies.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->auto_disable_bodies); + *(outbuffer + offset + 0) = (this->sor_pgs_precon_iters >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->sor_pgs_precon_iters >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->sor_pgs_precon_iters >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->sor_pgs_precon_iters >> (8 * 3)) & 0xFF; + offset += sizeof(this->sor_pgs_precon_iters); + *(outbuffer + offset + 0) = (this->sor_pgs_iters >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->sor_pgs_iters >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->sor_pgs_iters >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->sor_pgs_iters >> (8 * 3)) & 0xFF; + offset += sizeof(this->sor_pgs_iters); + union { + double real; + uint64_t base; + } u_sor_pgs_w; + u_sor_pgs_w.real = this->sor_pgs_w; + *(outbuffer + offset + 0) = (u_sor_pgs_w.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_sor_pgs_w.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_sor_pgs_w.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_sor_pgs_w.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_sor_pgs_w.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_sor_pgs_w.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_sor_pgs_w.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_sor_pgs_w.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->sor_pgs_w); + union { + double real; + uint64_t base; + } u_sor_pgs_rms_error_tol; + u_sor_pgs_rms_error_tol.real = this->sor_pgs_rms_error_tol; + *(outbuffer + offset + 0) = (u_sor_pgs_rms_error_tol.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_sor_pgs_rms_error_tol.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_sor_pgs_rms_error_tol.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_sor_pgs_rms_error_tol.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_sor_pgs_rms_error_tol.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_sor_pgs_rms_error_tol.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_sor_pgs_rms_error_tol.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_sor_pgs_rms_error_tol.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->sor_pgs_rms_error_tol); + union { + double real; + uint64_t base; + } u_contact_surface_layer; + u_contact_surface_layer.real = this->contact_surface_layer; + *(outbuffer + offset + 0) = (u_contact_surface_layer.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_contact_surface_layer.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_contact_surface_layer.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_contact_surface_layer.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_contact_surface_layer.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_contact_surface_layer.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_contact_surface_layer.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_contact_surface_layer.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->contact_surface_layer); + union { + double real; + uint64_t base; + } u_contact_max_correcting_vel; + u_contact_max_correcting_vel.real = this->contact_max_correcting_vel; + *(outbuffer + offset + 0) = (u_contact_max_correcting_vel.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_contact_max_correcting_vel.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_contact_max_correcting_vel.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_contact_max_correcting_vel.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_contact_max_correcting_vel.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_contact_max_correcting_vel.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_contact_max_correcting_vel.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_contact_max_correcting_vel.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->contact_max_correcting_vel); + union { + double real; + uint64_t base; + } u_cfm; + u_cfm.real = this->cfm; + *(outbuffer + offset + 0) = (u_cfm.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_cfm.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_cfm.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_cfm.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_cfm.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_cfm.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_cfm.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_cfm.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->cfm); + union { + double real; + uint64_t base; + } u_erp; + u_erp.real = this->erp; + *(outbuffer + offset + 0) = (u_erp.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_erp.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_erp.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_erp.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_erp.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_erp.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_erp.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_erp.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->erp); + *(outbuffer + offset + 0) = (this->max_contacts >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->max_contacts >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->max_contacts >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->max_contacts >> (8 * 3)) & 0xFF; + offset += sizeof(this->max_contacts); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_auto_disable_bodies; + u_auto_disable_bodies.base = 0; + u_auto_disable_bodies.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->auto_disable_bodies = u_auto_disable_bodies.real; + offset += sizeof(this->auto_disable_bodies); + this->sor_pgs_precon_iters = ((uint32_t) (*(inbuffer + offset))); + this->sor_pgs_precon_iters |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->sor_pgs_precon_iters |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->sor_pgs_precon_iters |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->sor_pgs_precon_iters); + this->sor_pgs_iters = ((uint32_t) (*(inbuffer + offset))); + this->sor_pgs_iters |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->sor_pgs_iters |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->sor_pgs_iters |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->sor_pgs_iters); + union { + double real; + uint64_t base; + } u_sor_pgs_w; + u_sor_pgs_w.base = 0; + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->sor_pgs_w = u_sor_pgs_w.real; + offset += sizeof(this->sor_pgs_w); + union { + double real; + uint64_t base; + } u_sor_pgs_rms_error_tol; + u_sor_pgs_rms_error_tol.base = 0; + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->sor_pgs_rms_error_tol = u_sor_pgs_rms_error_tol.real; + offset += sizeof(this->sor_pgs_rms_error_tol); + union { + double real; + uint64_t base; + } u_contact_surface_layer; + u_contact_surface_layer.base = 0; + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->contact_surface_layer = u_contact_surface_layer.real; + offset += sizeof(this->contact_surface_layer); + union { + double real; + uint64_t base; + } u_contact_max_correcting_vel; + u_contact_max_correcting_vel.base = 0; + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->contact_max_correcting_vel = u_contact_max_correcting_vel.real; + offset += sizeof(this->contact_max_correcting_vel); + union { + double real; + uint64_t base; + } u_cfm; + u_cfm.base = 0; + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->cfm = u_cfm.real; + offset += sizeof(this->cfm); + union { + double real; + uint64_t base; + } u_erp; + u_erp.base = 0; + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->erp = u_erp.real; + offset += sizeof(this->erp); + this->max_contacts = ((uint32_t) (*(inbuffer + offset))); + this->max_contacts |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->max_contacts |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->max_contacts |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->max_contacts); + return offset; + } + + const char * getType(){ return "gazebo_msgs/ODEPhysics"; }; + const char * getMD5(){ return "667d56ddbd547918c32d1934503dc335"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetJointProperties.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetJointProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..981853d9daa0042f81fc76cfaf033feb2208f60c --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetJointProperties.h @@ -0,0 +1,128 @@ +#ifndef _ROS_SERVICE_SetJointProperties_h +#define _ROS_SERVICE_SetJointProperties_h +#include +#include +#include +#include "ros/msg.h" +#include "gazebo_msgs/ODEJointProperties.h" + +namespace gazebo_msgs +{ + +static const char SETJOINTPROPERTIES[] = "gazebo_msgs/SetJointProperties"; + + class SetJointPropertiesRequest : public ros::Msg + { + public: + typedef const char* _joint_name_type; + _joint_name_type joint_name; + typedef gazebo_msgs::ODEJointProperties _ode_joint_config_type; + _ode_joint_config_type ode_joint_config; + + SetJointPropertiesRequest(): + joint_name(""), + ode_joint_config() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_joint_name = strlen(this->joint_name); + varToArr(outbuffer + offset, length_joint_name); + offset += 4; + memcpy(outbuffer + offset, this->joint_name, length_joint_name); + offset += length_joint_name; + offset += this->ode_joint_config.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_joint_name; + arrToVar(length_joint_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_joint_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_joint_name-1]=0; + this->joint_name = (char *)(inbuffer + offset-1); + offset += length_joint_name; + offset += this->ode_joint_config.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return SETJOINTPROPERTIES; }; + const char * getMD5(){ return "331fd8f35fd27e3c1421175590258e26"; }; + + }; + + class SetJointPropertiesResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetJointPropertiesResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETJOINTPROPERTIES; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetJointProperties { + public: + typedef SetJointPropertiesRequest Request; + typedef SetJointPropertiesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetJointTrajectory.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetJointTrajectory.h new file mode 100644 index 0000000000000000000000000000000000000000..81146cee35e5c4bcdd166110d2595a9dea4c2465 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetJointTrajectory.h @@ -0,0 +1,170 @@ +#ifndef _ROS_SERVICE_SetJointTrajectory_h +#define _ROS_SERVICE_SetJointTrajectory_h +#include +#include +#include +#include "ros/msg.h" +#include "trajectory_msgs/JointTrajectory.h" +#include "geometry_msgs/Pose.h" + +namespace gazebo_msgs +{ + +static const char SETJOINTTRAJECTORY[] = "gazebo_msgs/SetJointTrajectory"; + + class SetJointTrajectoryRequest : public ros::Msg + { + public: + typedef const char* _model_name_type; + _model_name_type model_name; + typedef trajectory_msgs::JointTrajectory _joint_trajectory_type; + _joint_trajectory_type joint_trajectory; + typedef geometry_msgs::Pose _model_pose_type; + _model_pose_type model_pose; + typedef bool _set_model_pose_type; + _set_model_pose_type set_model_pose; + typedef bool _disable_physics_updates_type; + _disable_physics_updates_type disable_physics_updates; + + SetJointTrajectoryRequest(): + model_name(""), + joint_trajectory(), + model_pose(), + set_model_pose(0), + disable_physics_updates(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_model_name = strlen(this->model_name); + varToArr(outbuffer + offset, length_model_name); + offset += 4; + memcpy(outbuffer + offset, this->model_name, length_model_name); + offset += length_model_name; + offset += this->joint_trajectory.serialize(outbuffer + offset); + offset += this->model_pose.serialize(outbuffer + offset); + union { + bool real; + uint8_t base; + } u_set_model_pose; + u_set_model_pose.real = this->set_model_pose; + *(outbuffer + offset + 0) = (u_set_model_pose.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->set_model_pose); + union { + bool real; + uint8_t base; + } u_disable_physics_updates; + u_disable_physics_updates.real = this->disable_physics_updates; + *(outbuffer + offset + 0) = (u_disable_physics_updates.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->disable_physics_updates); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_model_name; + arrToVar(length_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_name-1]=0; + this->model_name = (char *)(inbuffer + offset-1); + offset += length_model_name; + offset += this->joint_trajectory.deserialize(inbuffer + offset); + offset += this->model_pose.deserialize(inbuffer + offset); + union { + bool real; + uint8_t base; + } u_set_model_pose; + u_set_model_pose.base = 0; + u_set_model_pose.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->set_model_pose = u_set_model_pose.real; + offset += sizeof(this->set_model_pose); + union { + bool real; + uint8_t base; + } u_disable_physics_updates; + u_disable_physics_updates.base = 0; + u_disable_physics_updates.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->disable_physics_updates = u_disable_physics_updates.real; + offset += sizeof(this->disable_physics_updates); + return offset; + } + + const char * getType(){ return SETJOINTTRAJECTORY; }; + const char * getMD5(){ return "649dd2eba5ffd358069238825f9f85ab"; }; + + }; + + class SetJointTrajectoryResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetJointTrajectoryResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETJOINTTRAJECTORY; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetJointTrajectory { + public: + typedef SetJointTrajectoryRequest Request; + typedef SetJointTrajectoryResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetLightProperties.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetLightProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..5243ae2861430a90990205de9f42d420844a7416 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetLightProperties.h @@ -0,0 +1,224 @@ +#ifndef _ROS_SERVICE_SetLightProperties_h +#define _ROS_SERVICE_SetLightProperties_h +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/ColorRGBA.h" + +namespace gazebo_msgs +{ + +static const char SETLIGHTPROPERTIES[] = "gazebo_msgs/SetLightProperties"; + + class SetLightPropertiesRequest : public ros::Msg + { + public: + typedef const char* _light_name_type; + _light_name_type light_name; + typedef std_msgs::ColorRGBA _diffuse_type; + _diffuse_type diffuse; + typedef double _attenuation_constant_type; + _attenuation_constant_type attenuation_constant; + typedef double _attenuation_linear_type; + _attenuation_linear_type attenuation_linear; + typedef double _attenuation_quadratic_type; + _attenuation_quadratic_type attenuation_quadratic; + + SetLightPropertiesRequest(): + light_name(""), + diffuse(), + attenuation_constant(0), + attenuation_linear(0), + attenuation_quadratic(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_light_name = strlen(this->light_name); + varToArr(outbuffer + offset, length_light_name); + offset += 4; + memcpy(outbuffer + offset, this->light_name, length_light_name); + offset += length_light_name; + offset += this->diffuse.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_attenuation_constant; + u_attenuation_constant.real = this->attenuation_constant; + *(outbuffer + offset + 0) = (u_attenuation_constant.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_attenuation_constant.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_attenuation_constant.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_attenuation_constant.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_attenuation_constant.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_attenuation_constant.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_attenuation_constant.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_attenuation_constant.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->attenuation_constant); + union { + double real; + uint64_t base; + } u_attenuation_linear; + u_attenuation_linear.real = this->attenuation_linear; + *(outbuffer + offset + 0) = (u_attenuation_linear.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_attenuation_linear.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_attenuation_linear.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_attenuation_linear.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_attenuation_linear.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_attenuation_linear.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_attenuation_linear.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_attenuation_linear.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->attenuation_linear); + union { + double real; + uint64_t base; + } u_attenuation_quadratic; + u_attenuation_quadratic.real = this->attenuation_quadratic; + *(outbuffer + offset + 0) = (u_attenuation_quadratic.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_attenuation_quadratic.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_attenuation_quadratic.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_attenuation_quadratic.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_attenuation_quadratic.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_attenuation_quadratic.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_attenuation_quadratic.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_attenuation_quadratic.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->attenuation_quadratic); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_light_name; + arrToVar(length_light_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_light_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_light_name-1]=0; + this->light_name = (char *)(inbuffer + offset-1); + offset += length_light_name; + offset += this->diffuse.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_attenuation_constant; + u_attenuation_constant.base = 0; + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->attenuation_constant = u_attenuation_constant.real; + offset += sizeof(this->attenuation_constant); + union { + double real; + uint64_t base; + } u_attenuation_linear; + u_attenuation_linear.base = 0; + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->attenuation_linear = u_attenuation_linear.real; + offset += sizeof(this->attenuation_linear); + union { + double real; + uint64_t base; + } u_attenuation_quadratic; + u_attenuation_quadratic.base = 0; + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->attenuation_quadratic = u_attenuation_quadratic.real; + offset += sizeof(this->attenuation_quadratic); + return offset; + } + + const char * getType(){ return SETLIGHTPROPERTIES; }; + const char * getMD5(){ return "73ad1ac5e9e312ddf7c74f38ad843f34"; }; + + }; + + class SetLightPropertiesResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetLightPropertiesResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETLIGHTPROPERTIES; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetLightProperties { + public: + typedef SetLightPropertiesRequest Request; + typedef SetLightPropertiesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetLinkProperties.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetLinkProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..3b0ae61ccfde44f78cb0f6730ecd8a20da16a0f6 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetLinkProperties.h @@ -0,0 +1,370 @@ +#ifndef _ROS_SERVICE_SetLinkProperties_h +#define _ROS_SERVICE_SetLinkProperties_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" + +namespace gazebo_msgs +{ + +static const char SETLINKPROPERTIES[] = "gazebo_msgs/SetLinkProperties"; + + class SetLinkPropertiesRequest : public ros::Msg + { + public: + typedef const char* _link_name_type; + _link_name_type link_name; + typedef geometry_msgs::Pose _com_type; + _com_type com; + typedef bool _gravity_mode_type; + _gravity_mode_type gravity_mode; + typedef double _mass_type; + _mass_type mass; + typedef double _ixx_type; + _ixx_type ixx; + typedef double _ixy_type; + _ixy_type ixy; + typedef double _ixz_type; + _ixz_type ixz; + typedef double _iyy_type; + _iyy_type iyy; + typedef double _iyz_type; + _iyz_type iyz; + typedef double _izz_type; + _izz_type izz; + + SetLinkPropertiesRequest(): + link_name(""), + com(), + gravity_mode(0), + mass(0), + ixx(0), + ixy(0), + ixz(0), + iyy(0), + iyz(0), + izz(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_link_name = strlen(this->link_name); + varToArr(outbuffer + offset, length_link_name); + offset += 4; + memcpy(outbuffer + offset, this->link_name, length_link_name); + offset += length_link_name; + offset += this->com.serialize(outbuffer + offset); + union { + bool real; + uint8_t base; + } u_gravity_mode; + u_gravity_mode.real = this->gravity_mode; + *(outbuffer + offset + 0) = (u_gravity_mode.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->gravity_mode); + union { + double real; + uint64_t base; + } u_mass; + u_mass.real = this->mass; + *(outbuffer + offset + 0) = (u_mass.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_mass.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_mass.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_mass.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_mass.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_mass.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_mass.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_mass.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->mass); + union { + double real; + uint64_t base; + } u_ixx; + u_ixx.real = this->ixx; + *(outbuffer + offset + 0) = (u_ixx.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixx.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixx.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixx.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixx.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixx.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixx.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixx.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixx); + union { + double real; + uint64_t base; + } u_ixy; + u_ixy.real = this->ixy; + *(outbuffer + offset + 0) = (u_ixy.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixy.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixy.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixy.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixy.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixy.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixy.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixy.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixy); + union { + double real; + uint64_t base; + } u_ixz; + u_ixz.real = this->ixz; + *(outbuffer + offset + 0) = (u_ixz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixz); + union { + double real; + uint64_t base; + } u_iyy; + u_iyy.real = this->iyy; + *(outbuffer + offset + 0) = (u_iyy.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_iyy.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_iyy.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_iyy.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_iyy.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_iyy.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_iyy.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_iyy.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->iyy); + union { + double real; + uint64_t base; + } u_iyz; + u_iyz.real = this->iyz; + *(outbuffer + offset + 0) = (u_iyz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_iyz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_iyz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_iyz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_iyz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_iyz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_iyz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_iyz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->iyz); + union { + double real; + uint64_t base; + } u_izz; + u_izz.real = this->izz; + *(outbuffer + offset + 0) = (u_izz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_izz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_izz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_izz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_izz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_izz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_izz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_izz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->izz); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_link_name; + arrToVar(length_link_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_link_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_link_name-1]=0; + this->link_name = (char *)(inbuffer + offset-1); + offset += length_link_name; + offset += this->com.deserialize(inbuffer + offset); + union { + bool real; + uint8_t base; + } u_gravity_mode; + u_gravity_mode.base = 0; + u_gravity_mode.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->gravity_mode = u_gravity_mode.real; + offset += sizeof(this->gravity_mode); + union { + double real; + uint64_t base; + } u_mass; + u_mass.base = 0; + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->mass = u_mass.real; + offset += sizeof(this->mass); + union { + double real; + uint64_t base; + } u_ixx; + u_ixx.base = 0; + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixx = u_ixx.real; + offset += sizeof(this->ixx); + union { + double real; + uint64_t base; + } u_ixy; + u_ixy.base = 0; + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixy = u_ixy.real; + offset += sizeof(this->ixy); + union { + double real; + uint64_t base; + } u_ixz; + u_ixz.base = 0; + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixz = u_ixz.real; + offset += sizeof(this->ixz); + union { + double real; + uint64_t base; + } u_iyy; + u_iyy.base = 0; + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->iyy = u_iyy.real; + offset += sizeof(this->iyy); + union { + double real; + uint64_t base; + } u_iyz; + u_iyz.base = 0; + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->iyz = u_iyz.real; + offset += sizeof(this->iyz); + union { + double real; + uint64_t base; + } u_izz; + u_izz.base = 0; + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->izz = u_izz.real; + offset += sizeof(this->izz); + return offset; + } + + const char * getType(){ return SETLINKPROPERTIES; }; + const char * getMD5(){ return "68ac74a4be01b165bc305b5ccdc45e91"; }; + + }; + + class SetLinkPropertiesResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetLinkPropertiesResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETLINKPROPERTIES; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetLinkProperties { + public: + typedef SetLinkPropertiesRequest Request; + typedef SetLinkPropertiesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetLinkState.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetLinkState.h new file mode 100644 index 0000000000000000000000000000000000000000..f089492a4d235b7cee253d91bfeb9504b18063f6 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetLinkState.h @@ -0,0 +1,111 @@ +#ifndef _ROS_SERVICE_SetLinkState_h +#define _ROS_SERVICE_SetLinkState_h +#include +#include +#include +#include "ros/msg.h" +#include "gazebo_msgs/LinkState.h" + +namespace gazebo_msgs +{ + +static const char SETLINKSTATE[] = "gazebo_msgs/SetLinkState"; + + class SetLinkStateRequest : public ros::Msg + { + public: + typedef gazebo_msgs::LinkState _link_state_type; + _link_state_type link_state; + + SetLinkStateRequest(): + link_state() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->link_state.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->link_state.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return SETLINKSTATE; }; + const char * getMD5(){ return "22a2c757d56911b6f27868159e9a872d"; }; + + }; + + class SetLinkStateResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetLinkStateResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETLINKSTATE; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetLinkState { + public: + typedef SetLinkStateRequest Request; + typedef SetLinkStateResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetModelConfiguration.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetModelConfiguration.h new file mode 100644 index 0000000000000000000000000000000000000000..d2da91bea16de1fc1c9b3a7ce30423754adfb9b7 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetModelConfiguration.h @@ -0,0 +1,228 @@ +#ifndef _ROS_SERVICE_SetModelConfiguration_h +#define _ROS_SERVICE_SetModelConfiguration_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char SETMODELCONFIGURATION[] = "gazebo_msgs/SetModelConfiguration"; + + class SetModelConfigurationRequest : public ros::Msg + { + public: + typedef const char* _model_name_type; + _model_name_type model_name; + typedef const char* _urdf_param_name_type; + _urdf_param_name_type urdf_param_name; + uint32_t joint_names_length; + typedef char* _joint_names_type; + _joint_names_type st_joint_names; + _joint_names_type * joint_names; + uint32_t joint_positions_length; + typedef double _joint_positions_type; + _joint_positions_type st_joint_positions; + _joint_positions_type * joint_positions; + + SetModelConfigurationRequest(): + model_name(""), + urdf_param_name(""), + joint_names_length(0), joint_names(NULL), + joint_positions_length(0), joint_positions(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_model_name = strlen(this->model_name); + varToArr(outbuffer + offset, length_model_name); + offset += 4; + memcpy(outbuffer + offset, this->model_name, length_model_name); + offset += length_model_name; + uint32_t length_urdf_param_name = strlen(this->urdf_param_name); + varToArr(outbuffer + offset, length_urdf_param_name); + offset += 4; + memcpy(outbuffer + offset, this->urdf_param_name, length_urdf_param_name); + offset += length_urdf_param_name; + *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_names_length); + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_joint_namesi = strlen(this->joint_names[i]); + varToArr(outbuffer + offset, length_joint_namesi); + offset += 4; + memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); + offset += length_joint_namesi; + } + *(outbuffer + offset + 0) = (this->joint_positions_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_positions_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_positions_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_positions_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_positions_length); + for( uint32_t i = 0; i < joint_positions_length; i++){ + union { + double real; + uint64_t base; + } u_joint_positionsi; + u_joint_positionsi.real = this->joint_positions[i]; + *(outbuffer + offset + 0) = (u_joint_positionsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_joint_positionsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_joint_positionsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_joint_positionsi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_joint_positionsi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_joint_positionsi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_joint_positionsi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_joint_positionsi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->joint_positions[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_model_name; + arrToVar(length_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_name-1]=0; + this->model_name = (char *)(inbuffer + offset-1); + offset += length_model_name; + uint32_t length_urdf_param_name; + arrToVar(length_urdf_param_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_urdf_param_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_urdf_param_name-1]=0; + this->urdf_param_name = (char *)(inbuffer + offset-1); + offset += length_urdf_param_name; + uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_names_length); + if(joint_names_lengthT > joint_names_length) + this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); + joint_names_length = joint_names_lengthT; + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_st_joint_names; + arrToVar(length_st_joint_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_joint_names-1]=0; + this->st_joint_names = (char *)(inbuffer + offset-1); + offset += length_st_joint_names; + memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); + } + uint32_t joint_positions_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_positions_length); + if(joint_positions_lengthT > joint_positions_length) + this->joint_positions = (double*)realloc(this->joint_positions, joint_positions_lengthT * sizeof(double)); + joint_positions_length = joint_positions_lengthT; + for( uint32_t i = 0; i < joint_positions_length; i++){ + union { + double real; + uint64_t base; + } u_st_joint_positions; + u_st_joint_positions.base = 0; + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_joint_positions = u_st_joint_positions.real; + offset += sizeof(this->st_joint_positions); + memcpy( &(this->joint_positions[i]), &(this->st_joint_positions), sizeof(double)); + } + return offset; + } + + const char * getType(){ return SETMODELCONFIGURATION; }; + const char * getMD5(){ return "160eae60f51fabff255480c70afa289f"; }; + + }; + + class SetModelConfigurationResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetModelConfigurationResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETMODELCONFIGURATION; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetModelConfiguration { + public: + typedef SetModelConfigurationRequest Request; + typedef SetModelConfigurationResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetModelState.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetModelState.h new file mode 100644 index 0000000000000000000000000000000000000000..ef251ad6309c0bf01685417fae3b06e0011e5b71 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetModelState.h @@ -0,0 +1,111 @@ +#ifndef _ROS_SERVICE_SetModelState_h +#define _ROS_SERVICE_SetModelState_h +#include +#include +#include +#include "ros/msg.h" +#include "gazebo_msgs/ModelState.h" + +namespace gazebo_msgs +{ + +static const char SETMODELSTATE[] = "gazebo_msgs/SetModelState"; + + class SetModelStateRequest : public ros::Msg + { + public: + typedef gazebo_msgs::ModelState _model_state_type; + _model_state_type model_state; + + SetModelStateRequest(): + model_state() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->model_state.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->model_state.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return SETMODELSTATE; }; + const char * getMD5(){ return "cb042b0e91880f4661b29ea5b6234350"; }; + + }; + + class SetModelStateResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetModelStateResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETMODELSTATE; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetModelState { + public: + typedef SetModelStateRequest Request; + typedef SetModelStateResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetPhysicsProperties.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetPhysicsProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..ea160b5142063181af9639cbbb91d3811a40178d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetPhysicsProperties.h @@ -0,0 +1,181 @@ +#ifndef _ROS_SERVICE_SetPhysicsProperties_h +#define _ROS_SERVICE_SetPhysicsProperties_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Vector3.h" +#include "gazebo_msgs/ODEPhysics.h" + +namespace gazebo_msgs +{ + +static const char SETPHYSICSPROPERTIES[] = "gazebo_msgs/SetPhysicsProperties"; + + class SetPhysicsPropertiesRequest : public ros::Msg + { + public: + typedef double _time_step_type; + _time_step_type time_step; + typedef double _max_update_rate_type; + _max_update_rate_type max_update_rate; + typedef geometry_msgs::Vector3 _gravity_type; + _gravity_type gravity; + typedef gazebo_msgs::ODEPhysics _ode_config_type; + _ode_config_type ode_config; + + SetPhysicsPropertiesRequest(): + time_step(0), + max_update_rate(0), + gravity(), + ode_config() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_time_step; + u_time_step.real = this->time_step; + *(outbuffer + offset + 0) = (u_time_step.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_time_step.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_time_step.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_time_step.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_time_step.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_time_step.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_time_step.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_time_step.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->time_step); + union { + double real; + uint64_t base; + } u_max_update_rate; + u_max_update_rate.real = this->max_update_rate; + *(outbuffer + offset + 0) = (u_max_update_rate.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_update_rate.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_update_rate.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_update_rate.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max_update_rate.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max_update_rate.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max_update_rate.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max_update_rate.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max_update_rate); + offset += this->gravity.serialize(outbuffer + offset); + offset += this->ode_config.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_time_step; + u_time_step.base = 0; + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->time_step = u_time_step.real; + offset += sizeof(this->time_step); + union { + double real; + uint64_t base; + } u_max_update_rate; + u_max_update_rate.base = 0; + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max_update_rate = u_max_update_rate.real; + offset += sizeof(this->max_update_rate); + offset += this->gravity.deserialize(inbuffer + offset); + offset += this->ode_config.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return SETPHYSICSPROPERTIES; }; + const char * getMD5(){ return "abd9f82732b52b92e9d6bb36e6a82452"; }; + + }; + + class SetPhysicsPropertiesResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetPhysicsPropertiesResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETPHYSICSPROPERTIES; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetPhysicsProperties { + public: + typedef SetPhysicsPropertiesRequest Request; + typedef SetPhysicsPropertiesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SpawnModel.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SpawnModel.h new file mode 100644 index 0000000000000000000000000000000000000000..215b0019d671282b0eed7b1e2f31f5e66f750885 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/SpawnModel.h @@ -0,0 +1,179 @@ +#ifndef _ROS_SERVICE_SpawnModel_h +#define _ROS_SERVICE_SpawnModel_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" + +namespace gazebo_msgs +{ + +static const char SPAWNMODEL[] = "gazebo_msgs/SpawnModel"; + + class SpawnModelRequest : public ros::Msg + { + public: + typedef const char* _model_name_type; + _model_name_type model_name; + typedef const char* _model_xml_type; + _model_xml_type model_xml; + typedef const char* _robot_namespace_type; + _robot_namespace_type robot_namespace; + typedef geometry_msgs::Pose _initial_pose_type; + _initial_pose_type initial_pose; + typedef const char* _reference_frame_type; + _reference_frame_type reference_frame; + + SpawnModelRequest(): + model_name(""), + model_xml(""), + robot_namespace(""), + initial_pose(), + reference_frame("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_model_name = strlen(this->model_name); + varToArr(outbuffer + offset, length_model_name); + offset += 4; + memcpy(outbuffer + offset, this->model_name, length_model_name); + offset += length_model_name; + uint32_t length_model_xml = strlen(this->model_xml); + varToArr(outbuffer + offset, length_model_xml); + offset += 4; + memcpy(outbuffer + offset, this->model_xml, length_model_xml); + offset += length_model_xml; + uint32_t length_robot_namespace = strlen(this->robot_namespace); + varToArr(outbuffer + offset, length_robot_namespace); + offset += 4; + memcpy(outbuffer + offset, this->robot_namespace, length_robot_namespace); + offset += length_robot_namespace; + offset += this->initial_pose.serialize(outbuffer + offset); + uint32_t length_reference_frame = strlen(this->reference_frame); + varToArr(outbuffer + offset, length_reference_frame); + offset += 4; + memcpy(outbuffer + offset, this->reference_frame, length_reference_frame); + offset += length_reference_frame; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_model_name; + arrToVar(length_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_name-1]=0; + this->model_name = (char *)(inbuffer + offset-1); + offset += length_model_name; + uint32_t length_model_xml; + arrToVar(length_model_xml, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_xml; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_xml-1]=0; + this->model_xml = (char *)(inbuffer + offset-1); + offset += length_model_xml; + uint32_t length_robot_namespace; + arrToVar(length_robot_namespace, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_robot_namespace; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_robot_namespace-1]=0; + this->robot_namespace = (char *)(inbuffer + offset-1); + offset += length_robot_namespace; + offset += this->initial_pose.deserialize(inbuffer + offset); + uint32_t length_reference_frame; + arrToVar(length_reference_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_reference_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_reference_frame-1]=0; + this->reference_frame = (char *)(inbuffer + offset-1); + offset += length_reference_frame; + return offset; + } + + const char * getType(){ return SPAWNMODEL; }; + const char * getMD5(){ return "6d0eba5753761cd57e6263a056b79930"; }; + + }; + + class SpawnModelResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SpawnModelResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SPAWNMODEL; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SpawnModel { + public: + typedef SpawnModelRequest Request; + typedef SpawnModelResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/WorldState.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/WorldState.h new file mode 100644 index 0000000000000000000000000000000000000000..43eb25694281ccda142d0b3eaddc6648e9d8b776 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/gazebo_msgs/WorldState.h @@ -0,0 +1,159 @@ +#ifndef _ROS_gazebo_msgs_WorldState_h +#define _ROS_gazebo_msgs_WorldState_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Twist.h" +#include "geometry_msgs/Wrench.h" + +namespace gazebo_msgs +{ + + class WorldState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t name_length; + typedef char* _name_type; + _name_type st_name; + _name_type * name; + uint32_t pose_length; + typedef geometry_msgs::Pose _pose_type; + _pose_type st_pose; + _pose_type * pose; + uint32_t twist_length; + typedef geometry_msgs::Twist _twist_type; + _twist_type st_twist; + _twist_type * twist; + uint32_t wrench_length; + typedef geometry_msgs::Wrench _wrench_type; + _wrench_type st_wrench; + _wrench_type * wrench; + + WorldState(): + header(), + name_length(0), name(NULL), + pose_length(0), pose(NULL), + twist_length(0), twist(NULL), + wrench_length(0), wrench(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->name_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->name_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->name_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->name_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->name_length); + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_namei = strlen(this->name[i]); + varToArr(outbuffer + offset, length_namei); + offset += 4; + memcpy(outbuffer + offset, this->name[i], length_namei); + offset += length_namei; + } + *(outbuffer + offset + 0) = (this->pose_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->pose_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->pose_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->pose_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->pose_length); + for( uint32_t i = 0; i < pose_length; i++){ + offset += this->pose[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->twist_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->twist_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->twist_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->twist_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->twist_length); + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->twist[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->wrench_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->wrench_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->wrench_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->wrench_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->wrench_length); + for( uint32_t i = 0; i < wrench_length; i++){ + offset += this->wrench[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t name_lengthT = ((uint32_t) (*(inbuffer + offset))); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->name_length); + if(name_lengthT > name_length) + this->name = (char**)realloc(this->name, name_lengthT * sizeof(char*)); + name_length = name_lengthT; + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_st_name; + arrToVar(length_st_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_name-1]=0; + this->st_name = (char *)(inbuffer + offset-1); + offset += length_st_name; + memcpy( &(this->name[i]), &(this->st_name), sizeof(char*)); + } + uint32_t pose_lengthT = ((uint32_t) (*(inbuffer + offset))); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->pose_length); + if(pose_lengthT > pose_length) + this->pose = (geometry_msgs::Pose*)realloc(this->pose, pose_lengthT * sizeof(geometry_msgs::Pose)); + pose_length = pose_lengthT; + for( uint32_t i = 0; i < pose_length; i++){ + offset += this->st_pose.deserialize(inbuffer + offset); + memcpy( &(this->pose[i]), &(this->st_pose), sizeof(geometry_msgs::Pose)); + } + uint32_t twist_lengthT = ((uint32_t) (*(inbuffer + offset))); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->twist_length); + if(twist_lengthT > twist_length) + this->twist = (geometry_msgs::Twist*)realloc(this->twist, twist_lengthT * sizeof(geometry_msgs::Twist)); + twist_length = twist_lengthT; + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->st_twist.deserialize(inbuffer + offset); + memcpy( &(this->twist[i]), &(this->st_twist), sizeof(geometry_msgs::Twist)); + } + uint32_t wrench_lengthT = ((uint32_t) (*(inbuffer + offset))); + wrench_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + wrench_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + wrench_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->wrench_length); + if(wrench_lengthT > wrench_length) + this->wrench = (geometry_msgs::Wrench*)realloc(this->wrench, wrench_lengthT * sizeof(geometry_msgs::Wrench)); + wrench_length = wrench_lengthT; + for( uint32_t i = 0; i < wrench_length; i++){ + offset += this->st_wrench.deserialize(inbuffer + offset); + memcpy( &(this->wrench[i]), &(this->st_wrench), sizeof(geometry_msgs::Wrench)); + } + return offset; + } + + const char * getType(){ return "gazebo_msgs/WorldState"; }; + const char * getMD5(){ return "de1a9de3ab7ba97ac0e9ec01a4eb481e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Accel.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Accel.h new file mode 100644 index 0000000000000000000000000000000000000000..b5931f673cd76fbc030e42a02f9364752ecc5726 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Accel.h @@ -0,0 +1,49 @@ +#ifndef _ROS_geometry_msgs_Accel_h +#define _ROS_geometry_msgs_Accel_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Vector3.h" + +namespace geometry_msgs +{ + + class Accel : public ros::Msg + { + public: + typedef geometry_msgs::Vector3 _linear_type; + _linear_type linear; + typedef geometry_msgs::Vector3 _angular_type; + _angular_type angular; + + Accel(): + linear(), + angular() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->linear.serialize(outbuffer + offset); + offset += this->angular.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->linear.deserialize(inbuffer + offset); + offset += this->angular.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Accel"; }; + const char * getMD5(){ return "9f195f881246fdfa2798d1d3eebca84a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/AccelStamped.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/AccelStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..d7f785804e678ba810707dafe0dc99b222d19467 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/AccelStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_AccelStamped_h +#define _ROS_geometry_msgs_AccelStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Accel.h" + +namespace geometry_msgs +{ + + class AccelStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Accel _accel_type; + _accel_type accel; + + AccelStamped(): + header(), + accel() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->accel.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->accel.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/AccelStamped"; }; + const char * getMD5(){ return "d8a98a5d81351b6eb0578c78557e7659"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/AccelWithCovariance.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/AccelWithCovariance.h new file mode 100644 index 0000000000000000000000000000000000000000..9ce6ca28726a3552d0d3476940e4d393ea2264ec --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/AccelWithCovariance.h @@ -0,0 +1,79 @@ +#ifndef _ROS_geometry_msgs_AccelWithCovariance_h +#define _ROS_geometry_msgs_AccelWithCovariance_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Accel.h" + +namespace geometry_msgs +{ + + class AccelWithCovariance : public ros::Msg + { + public: + typedef geometry_msgs::Accel _accel_type; + _accel_type accel; + double covariance[36]; + + AccelWithCovariance(): + accel(), + covariance() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->accel.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.real = this->covariance[i]; + *(outbuffer + offset + 0) = (u_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->accel.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.base = 0; + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->covariance[i] = u_covariancei.real; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + const char * getType(){ return "geometry_msgs/AccelWithCovariance"; }; + const char * getMD5(){ return "ad5a718d699c6be72a02b8d6a139f334"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/AccelWithCovarianceStamped.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/AccelWithCovarianceStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..3153d39bc160828858eff4e2b7b5a0f3a469cbeb --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/AccelWithCovarianceStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_AccelWithCovarianceStamped_h +#define _ROS_geometry_msgs_AccelWithCovarianceStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/AccelWithCovariance.h" + +namespace geometry_msgs +{ + + class AccelWithCovarianceStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::AccelWithCovariance _accel_type; + _accel_type accel; + + AccelWithCovarianceStamped(): + header(), + accel() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->accel.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->accel.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/AccelWithCovarianceStamped"; }; + const char * getMD5(){ return "96adb295225031ec8d57fb4251b0a886"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Inertia.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Inertia.h new file mode 100644 index 0000000000000000000000000000000000000000..4c487c058aea418012129d671de5eb64d1def7e9 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Inertia.h @@ -0,0 +1,268 @@ +#ifndef _ROS_geometry_msgs_Inertia_h +#define _ROS_geometry_msgs_Inertia_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Vector3.h" + +namespace geometry_msgs +{ + + class Inertia : public ros::Msg + { + public: + typedef double _m_type; + _m_type m; + typedef geometry_msgs::Vector3 _com_type; + _com_type com; + typedef double _ixx_type; + _ixx_type ixx; + typedef double _ixy_type; + _ixy_type ixy; + typedef double _ixz_type; + _ixz_type ixz; + typedef double _iyy_type; + _iyy_type iyy; + typedef double _iyz_type; + _iyz_type iyz; + typedef double _izz_type; + _izz_type izz; + + Inertia(): + m(0), + com(), + ixx(0), + ixy(0), + ixz(0), + iyy(0), + iyz(0), + izz(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_m; + u_m.real = this->m; + *(outbuffer + offset + 0) = (u_m.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_m.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_m.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_m.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_m.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_m.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_m.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_m.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->m); + offset += this->com.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_ixx; + u_ixx.real = this->ixx; + *(outbuffer + offset + 0) = (u_ixx.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixx.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixx.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixx.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixx.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixx.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixx.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixx.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixx); + union { + double real; + uint64_t base; + } u_ixy; + u_ixy.real = this->ixy; + *(outbuffer + offset + 0) = (u_ixy.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixy.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixy.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixy.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixy.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixy.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixy.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixy.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixy); + union { + double real; + uint64_t base; + } u_ixz; + u_ixz.real = this->ixz; + *(outbuffer + offset + 0) = (u_ixz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixz); + union { + double real; + uint64_t base; + } u_iyy; + u_iyy.real = this->iyy; + *(outbuffer + offset + 0) = (u_iyy.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_iyy.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_iyy.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_iyy.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_iyy.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_iyy.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_iyy.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_iyy.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->iyy); + union { + double real; + uint64_t base; + } u_iyz; + u_iyz.real = this->iyz; + *(outbuffer + offset + 0) = (u_iyz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_iyz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_iyz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_iyz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_iyz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_iyz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_iyz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_iyz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->iyz); + union { + double real; + uint64_t base; + } u_izz; + u_izz.real = this->izz; + *(outbuffer + offset + 0) = (u_izz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_izz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_izz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_izz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_izz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_izz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_izz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_izz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->izz); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_m; + u_m.base = 0; + u_m.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->m = u_m.real; + offset += sizeof(this->m); + offset += this->com.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_ixx; + u_ixx.base = 0; + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixx = u_ixx.real; + offset += sizeof(this->ixx); + union { + double real; + uint64_t base; + } u_ixy; + u_ixy.base = 0; + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixy = u_ixy.real; + offset += sizeof(this->ixy); + union { + double real; + uint64_t base; + } u_ixz; + u_ixz.base = 0; + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixz = u_ixz.real; + offset += sizeof(this->ixz); + union { + double real; + uint64_t base; + } u_iyy; + u_iyy.base = 0; + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->iyy = u_iyy.real; + offset += sizeof(this->iyy); + union { + double real; + uint64_t base; + } u_iyz; + u_iyz.base = 0; + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->iyz = u_iyz.real; + offset += sizeof(this->iyz); + union { + double real; + uint64_t base; + } u_izz; + u_izz.base = 0; + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->izz = u_izz.real; + offset += sizeof(this->izz); + return offset; + } + + const char * getType(){ return "geometry_msgs/Inertia"; }; + const char * getMD5(){ return "1d26e4bb6c83ff141c5cf0d883c2b0fe"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/InertiaStamped.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/InertiaStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..2d8c94408c51f05f44a7a7b9dd07575108b03009 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/InertiaStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_InertiaStamped_h +#define _ROS_geometry_msgs_InertiaStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Inertia.h" + +namespace geometry_msgs +{ + + class InertiaStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Inertia _inertia_type; + _inertia_type inertia; + + InertiaStamped(): + header(), + inertia() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->inertia.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->inertia.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/InertiaStamped"; }; + const char * getMD5(){ return "ddee48caeab5a966c5e8d166654a9ac7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Point.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Point.h new file mode 100644 index 0000000000000000000000000000000000000000..4764c84c8a87274abcbfddccf70a0a0b2c119e5d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Point.h @@ -0,0 +1,134 @@ +#ifndef _ROS_geometry_msgs_Point_h +#define _ROS_geometry_msgs_Point_h + +#include +#include +#include +#include "../ros/msg.h" + +namespace geometry_msgs +{ + + class Point : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _z_type; + _z_type z; + + Point(): + x(0), + y(0), + z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.real = this->z; + *(outbuffer + offset + 0) = (u_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.base = 0; + u_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->z = u_z.real; + offset += sizeof(this->z); + return offset; + } + + const char * getType(){ return "geometry_msgs/Point"; }; + const char * getMD5(){ return "4a842b65f413084dc2b10fb484ea7f17"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Point32.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Point32.h new file mode 100644 index 0000000000000000000000000000000000000000..8c3b572a3a632122f5a27523c0fb6356c2df048c --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Point32.h @@ -0,0 +1,110 @@ +#ifndef _ROS_geometry_msgs_Point32_h +#define _ROS_geometry_msgs_Point32_h + +#include +#include +#include +#include "ros/msg.h" + +namespace geometry_msgs +{ + + class Point32 : public ros::Msg + { + public: + typedef float _x_type; + _x_type x; + typedef float _y_type; + _y_type y; + typedef float _z_type; + _z_type z; + + Point32(): + x(0), + y(0), + z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_z; + u_z.real = this->z; + *(outbuffer + offset + 0) = (u_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_z.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->x = u_x.real; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->y = u_y.real; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_z; + u_z.base = 0; + u_z.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_z.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_z.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_z.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->z = u_z.real; + offset += sizeof(this->z); + return offset; + } + + const char * getType(){ return "geometry_msgs/Point32"; }; + const char * getMD5(){ return "cc153912f1453b708d221682bc23d9ac"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/PointStamped.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/PointStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..ce24530c64615703d9da2eb0fc32505593c3aaad --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/PointStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_PointStamped_h +#define _ROS_geometry_msgs_PointStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Point.h" + +namespace geometry_msgs +{ + + class PointStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Point _point_type; + _point_type point; + + PointStamped(): + header(), + point() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->point.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->point.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/PointStamped"; }; + const char * getMD5(){ return "c63aecb41bfdfd6b7e1fac37c7cbe7bf"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Polygon.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Polygon.h new file mode 100644 index 0000000000000000000000000000000000000000..8ff3276fae77860328542ac3891e8c30b346c289 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Polygon.h @@ -0,0 +1,64 @@ +#ifndef _ROS_geometry_msgs_Polygon_h +#define _ROS_geometry_msgs_Polygon_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Point32.h" + +namespace geometry_msgs +{ + + class Polygon : public ros::Msg + { + public: + uint32_t points_length; + typedef geometry_msgs::Point32 _points_type; + _points_type st_points; + _points_type * points; + + Polygon(): + points_length(0), points(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->points_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->points_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->points_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->points_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->points_length); + for( uint32_t i = 0; i < points_length; i++){ + offset += this->points[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t points_lengthT = ((uint32_t) (*(inbuffer + offset))); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->points_length); + if(points_lengthT > points_length) + this->points = (geometry_msgs::Point32*)realloc(this->points, points_lengthT * sizeof(geometry_msgs::Point32)); + points_length = points_lengthT; + for( uint32_t i = 0; i < points_length; i++){ + offset += this->st_points.deserialize(inbuffer + offset); + memcpy( &(this->points[i]), &(this->st_points), sizeof(geometry_msgs::Point32)); + } + return offset; + } + + const char * getType(){ return "geometry_msgs/Polygon"; }; + const char * getMD5(){ return "cd60a26494a087f577976f0329fa120e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/PolygonStamped.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/PolygonStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..badc359a3ab7e4bc9d4220e424674e99be58f5ea --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/PolygonStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_PolygonStamped_h +#define _ROS_geometry_msgs_PolygonStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Polygon.h" + +namespace geometry_msgs +{ + + class PolygonStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Polygon _polygon_type; + _polygon_type polygon; + + PolygonStamped(): + header(), + polygon() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->polygon.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->polygon.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/PolygonStamped"; }; + const char * getMD5(){ return "c6be8f7dc3bee7fe9e8d296070f53340"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Pose.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Pose.h new file mode 100644 index 0000000000000000000000000000000000000000..1a9f46ca69f4b4251e06eb1258ed5cf1247ba15f --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Pose.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_Pose_h +#define _ROS_geometry_msgs_Pose_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../geometry_msgs/Point.h" +#include "../geometry_msgs/Quaternion.h" + +namespace geometry_msgs +{ + + class Pose : public ros::Msg + { + public: + typedef geometry_msgs::Point _position_type; + _position_type position; + typedef geometry_msgs::Quaternion _orientation_type; + _orientation_type orientation; + + Pose(): + position(), + orientation() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->position.serialize(outbuffer + offset); + offset += this->orientation.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->position.deserialize(inbuffer + offset); + offset += this->orientation.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Pose"; }; + const char * getMD5(){ return "e45d45a5a1ce597b249e23fb30fc871f"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Pose2D.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Pose2D.h new file mode 100644 index 0000000000000000000000000000000000000000..2858588075a54e4fa24390fe0f95f152a1a4ba56 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Pose2D.h @@ -0,0 +1,134 @@ +#ifndef _ROS_geometry_msgs_Pose2D_h +#define _ROS_geometry_msgs_Pose2D_h + +#include +#include +#include +#include "ros/msg.h" + +namespace geometry_msgs +{ + + class Pose2D : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _theta_type; + _theta_type theta; + + Pose2D(): + x(0), + y(0), + theta(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_theta; + u_theta.real = this->theta; + *(outbuffer + offset + 0) = (u_theta.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_theta.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_theta.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_theta.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_theta.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_theta.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_theta.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_theta.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->theta); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_theta; + u_theta.base = 0; + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->theta = u_theta.real; + offset += sizeof(this->theta); + return offset; + } + + const char * getType(){ return "geometry_msgs/Pose2D"; }; + const char * getMD5(){ return "938fa65709584ad8e77d238529be13b8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseArray.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseArray.h new file mode 100644 index 0000000000000000000000000000000000000000..9e6a89e0ce2071b01bdbe85351dc0b9cb0a84146 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseArray.h @@ -0,0 +1,70 @@ +#ifndef _ROS_geometry_msgs_PoseArray_h +#define _ROS_geometry_msgs_PoseArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" + +namespace geometry_msgs +{ + + class PoseArray : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t poses_length; + typedef geometry_msgs::Pose _poses_type; + _poses_type st_poses; + _poses_type * poses; + + PoseArray(): + header(), + poses_length(0), poses(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->poses_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->poses_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->poses_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->poses_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->poses_length); + for( uint32_t i = 0; i < poses_length; i++){ + offset += this->poses[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t poses_lengthT = ((uint32_t) (*(inbuffer + offset))); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->poses_length); + if(poses_lengthT > poses_length) + this->poses = (geometry_msgs::Pose*)realloc(this->poses, poses_lengthT * sizeof(geometry_msgs::Pose)); + poses_length = poses_lengthT; + for( uint32_t i = 0; i < poses_length; i++){ + offset += this->st_poses.deserialize(inbuffer + offset); + memcpy( &(this->poses[i]), &(this->st_poses), sizeof(geometry_msgs::Pose)); + } + return offset; + } + + const char * getType(){ return "geometry_msgs/PoseArray"; }; + const char * getMD5(){ return "916c28c5764443f268b296bb671b9d97"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseStamped.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..cb79251f2fe602474ecacae4f5f28884e114d046 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_PoseStamped_h +#define _ROS_geometry_msgs_PoseStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" + +namespace geometry_msgs +{ + + class PoseStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + + PoseStamped(): + header(), + pose() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->pose.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->pose.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/PoseStamped"; }; + const char * getMD5(){ return "d3812c3cbc69362b77dc0b19b345f8f5"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseWithCovariance.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseWithCovariance.h new file mode 100644 index 0000000000000000000000000000000000000000..92cb1cea9f049e310fad593f4d535800b2d1bc9e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseWithCovariance.h @@ -0,0 +1,79 @@ +#ifndef _ROS_geometry_msgs_PoseWithCovariance_h +#define _ROS_geometry_msgs_PoseWithCovariance_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../geometry_msgs/Pose.h" + +namespace geometry_msgs +{ + + class PoseWithCovariance : public ros::Msg + { + public: + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + double covariance[36]; + + PoseWithCovariance(): + pose(), + covariance() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->pose.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.real = this->covariance[i]; + *(outbuffer + offset + 0) = (u_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->pose.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.base = 0; + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->covariance[i] = u_covariancei.real; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + const char * getType(){ return "geometry_msgs/PoseWithCovariance"; }; + const char * getMD5(){ return "c23e848cf1b7533a8d7c259073a97e6f"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseWithCovarianceStamped.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseWithCovarianceStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..db623cda0de35053b2576af258b9ad8f53de320a --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseWithCovarianceStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_PoseWithCovarianceStamped_h +#define _ROS_geometry_msgs_PoseWithCovarianceStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/PoseWithCovariance.h" + +namespace geometry_msgs +{ + + class PoseWithCovarianceStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::PoseWithCovariance _pose_type; + _pose_type pose; + + PoseWithCovarianceStamped(): + header(), + pose() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->pose.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->pose.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/PoseWithCovarianceStamped"; }; + const char * getMD5(){ return "953b798c0f514ff060a53a3498ce6246"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Quaternion.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Quaternion.h new file mode 100644 index 0000000000000000000000000000000000000000..19f4bb8d721c67a354bab4ce3e0cdcc30a29105d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Quaternion.h @@ -0,0 +1,166 @@ +#ifndef _ROS_geometry_msgs_Quaternion_h +#define _ROS_geometry_msgs_Quaternion_h + +#include +#include +#include +#include "../ros/msg.h" + +namespace geometry_msgs +{ + + class Quaternion : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _z_type; + _z_type z; + typedef double _w_type; + _w_type w; + + Quaternion(): + x(0), + y(0), + z(0), + w(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.real = this->z; + *(outbuffer + offset + 0) = (u_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->z); + union { + double real; + uint64_t base; + } u_w; + u_w.real = this->w; + *(outbuffer + offset + 0) = (u_w.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_w.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_w.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_w.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_w.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_w.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_w.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_w.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->w); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.base = 0; + u_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->z = u_z.real; + offset += sizeof(this->z); + union { + double real; + uint64_t base; + } u_w; + u_w.base = 0; + u_w.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->w = u_w.real; + offset += sizeof(this->w); + return offset; + } + + const char * getType(){ return "geometry_msgs/Quaternion"; }; + const char * getMD5(){ return "a779879fadf0160734f906b8c19c7004"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/QuaternionStamped.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/QuaternionStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..626358d0bd362808056532e586ec17a3e4052271 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/QuaternionStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_QuaternionStamped_h +#define _ROS_geometry_msgs_QuaternionStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Quaternion.h" + +namespace geometry_msgs +{ + + class QuaternionStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Quaternion _quaternion_type; + _quaternion_type quaternion; + + QuaternionStamped(): + header(), + quaternion() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->quaternion.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->quaternion.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/QuaternionStamped"; }; + const char * getMD5(){ return "e57f1e547e0e1fd13504588ffc8334e2"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Transform.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Transform.h new file mode 100644 index 0000000000000000000000000000000000000000..967eabb4b32cc0a2e01c62f9ee13394c8c46270f --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Transform.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_Transform_h +#define _ROS_geometry_msgs_Transform_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../geometry_msgs/Vector3.h" +#include "../geometry_msgs/Quaternion.h" + +namespace geometry_msgs +{ + + class Transform : public ros::Msg + { + public: + typedef geometry_msgs::Vector3 _translation_type; + _translation_type translation; + typedef geometry_msgs::Quaternion _rotation_type; + _rotation_type rotation; + + Transform(): + translation(), + rotation() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->translation.serialize(outbuffer + offset); + offset += this->rotation.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->translation.deserialize(inbuffer + offset); + offset += this->rotation.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Transform"; }; + const char * getMD5(){ return "ac9eff44abf714214112b05d54a3cf9b"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/TransformStamped.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/TransformStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..ef3f7a8039281c2607f412f2c5e21bc4cd2653fd --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/TransformStamped.h @@ -0,0 +1,67 @@ +#ifndef _ROS_geometry_msgs_TransformStamped_h +#define _ROS_geometry_msgs_TransformStamped_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../std_msgs/Header.h" +#include "../geometry_msgs/Transform.h" + +namespace geometry_msgs +{ + + class TransformStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _child_frame_id_type; + _child_frame_id_type child_frame_id; + typedef geometry_msgs::Transform _transform_type; + _transform_type transform; + + TransformStamped(): + header(), + child_frame_id(""), + transform() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_child_frame_id = strlen(this->child_frame_id); + varToArr(outbuffer + offset, length_child_frame_id); + offset += 4; + memcpy(outbuffer + offset, this->child_frame_id, length_child_frame_id); + offset += length_child_frame_id; + offset += this->transform.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_child_frame_id; + arrToVar(length_child_frame_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_child_frame_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_child_frame_id-1]=0; + this->child_frame_id = (char *)(inbuffer + offset-1); + offset += length_child_frame_id; + offset += this->transform.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/TransformStamped"; }; + const char * getMD5(){ return "b5764a33bfeb3588febc2682852579b0"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Twist.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Twist.h new file mode 100644 index 0000000000000000000000000000000000000000..a6f980ad9c1c6250fc94580dfe1ad4c0d1f67116 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Twist.h @@ -0,0 +1,51 @@ +#ifndef _ROS_geometry_msgs_Twist_h +#define _ROS_geometry_msgs_Twist_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../geometry_msgs/Vector3.h" + +namespace geometry_msgs +{ + + class Twist : public ros::Msg + { + public: + typedef geometry_msgs::Vector3 _linear_type; + _linear_type linear; + typedef geometry_msgs::Vector3 _angular_type; + _angular_type angular; + + Twist(): + linear(), + angular() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->linear.serialize(outbuffer + offset); + offset += this->angular.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->linear.deserialize(inbuffer + offset); + offset += this->angular.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Twist"; }; + const char * getMD5(){ return "9f195f881246fdfa2798d1d3eebca84a"; }; + + }; + +} + + +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/TwistStamped.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/TwistStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..40143c8cdedc200190e27b62a4b3c04d2e34542e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/TwistStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_TwistStamped_h +#define _ROS_geometry_msgs_TwistStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Twist.h" + +namespace geometry_msgs +{ + + class TwistStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Twist _twist_type; + _twist_type twist; + + TwistStamped(): + header(), + twist() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->twist.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->twist.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/TwistStamped"; }; + const char * getMD5(){ return "98d34b0043a2093cf9d9345ab6eef12e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/TwistWithCovariance.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/TwistWithCovariance.h new file mode 100644 index 0000000000000000000000000000000000000000..ab6fb611fe058aff897c7b6dcdc50d36434c16d4 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/TwistWithCovariance.h @@ -0,0 +1,79 @@ +#ifndef _ROS_geometry_msgs_TwistWithCovariance_h +#define _ROS_geometry_msgs_TwistWithCovariance_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../geometry_msgs/Twist.h" + +namespace geometry_msgs +{ + + class TwistWithCovariance : public ros::Msg + { + public: + typedef geometry_msgs::Twist _twist_type; + _twist_type twist; + double covariance[36]; + + TwistWithCovariance(): + twist(), + covariance() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->twist.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.real = this->covariance[i]; + *(outbuffer + offset + 0) = (u_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->twist.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.base = 0; + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->covariance[i] = u_covariancei.real; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + const char * getType(){ return "geometry_msgs/TwistWithCovariance"; }; + const char * getMD5(){ return "1fe8a28e6890a4cc3ae4c3ca5c7d82e6"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/TwistWithCovarianceStamped.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/TwistWithCovarianceStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..701edff536c9d742e891c7e57338b5f947bc08ab --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/TwistWithCovarianceStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_TwistWithCovarianceStamped_h +#define _ROS_geometry_msgs_TwistWithCovarianceStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/TwistWithCovariance.h" + +namespace geometry_msgs +{ + + class TwistWithCovarianceStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::TwistWithCovariance _twist_type; + _twist_type twist; + + TwistWithCovarianceStamped(): + header(), + twist() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->twist.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->twist.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/TwistWithCovarianceStamped"; }; + const char * getMD5(){ return "8927a1a12fb2607ceea095b2dc440a96"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Vector3.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Vector3.h new file mode 100644 index 0000000000000000000000000000000000000000..efbab98d71b75e3a1c5f250cb2a59ca31afaf8b4 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Vector3.h @@ -0,0 +1,134 @@ +#ifndef _ROS_geometry_msgs_Vector3_h +#define _ROS_geometry_msgs_Vector3_h + +#include +#include +#include +#include "../ros/msg.h" + +namespace geometry_msgs +{ + + class Vector3 : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _z_type; + _z_type z; + + Vector3(): + x(0), + y(0), + z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.real = this->z; + *(outbuffer + offset + 0) = (u_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.base = 0; + u_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->z = u_z.real; + offset += sizeof(this->z); + return offset; + } + + const char * getType(){ return "geometry_msgs/Vector3"; }; + const char * getMD5(){ return "4a842b65f413084dc2b10fb484ea7f17"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Vector3Stamped.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Vector3Stamped.h new file mode 100644 index 0000000000000000000000000000000000000000..9032066eb078f2e0df2b0a345582df7234af39ed --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Vector3Stamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_Vector3Stamped_h +#define _ROS_geometry_msgs_Vector3Stamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Vector3.h" + +namespace geometry_msgs +{ + + class Vector3Stamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Vector3 _vector_type; + _vector_type vector; + + Vector3Stamped(): + header(), + vector() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->vector.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->vector.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Vector3Stamped"; }; + const char * getMD5(){ return "7b324c7325e683bf02a9b14b01090ec7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Wrench.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Wrench.h new file mode 100644 index 0000000000000000000000000000000000000000..52e5934188f6f24363bb3ace2e2709aaaff1b9c9 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/Wrench.h @@ -0,0 +1,49 @@ +#ifndef _ROS_geometry_msgs_Wrench_h +#define _ROS_geometry_msgs_Wrench_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Vector3.h" + +namespace geometry_msgs +{ + + class Wrench : public ros::Msg + { + public: + typedef geometry_msgs::Vector3 _force_type; + _force_type force; + typedef geometry_msgs::Vector3 _torque_type; + _torque_type torque; + + Wrench(): + force(), + torque() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->force.serialize(outbuffer + offset); + offset += this->torque.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->force.deserialize(inbuffer + offset); + offset += this->torque.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Wrench"; }; + const char * getMD5(){ return "4f539cf138b23283b520fd271b567936"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/WrenchStamped.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/WrenchStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..41b82f90bc6336c84443730f3e1211f1f58e0368 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/geometry_msgs/WrenchStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_WrenchStamped_h +#define _ROS_geometry_msgs_WrenchStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Wrench.h" + +namespace geometry_msgs +{ + + class WrenchStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Wrench _wrench_type; + _wrench_type wrench; + + WrenchStamped(): + header(), + wrench() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->wrench.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->wrench.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/WrenchStamped"; }; + const char * getMD5(){ return "d78d3cb249ce23087ade7e7d0c40cfa7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/image_exposure_msgs/ExposureSequence.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/image_exposure_msgs/ExposureSequence.h new file mode 100644 index 0000000000000000000000000000000000000000..7cbcdf73e91b347ddf6f64883c4048f5f98519d0 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/image_exposure_msgs/ExposureSequence.h @@ -0,0 +1,119 @@ +#ifndef _ROS_image_exposure_msgs_ExposureSequence_h +#define _ROS_image_exposure_msgs_ExposureSequence_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace image_exposure_msgs +{ + + class ExposureSequence : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t shutter_length; + typedef uint32_t _shutter_type; + _shutter_type st_shutter; + _shutter_type * shutter; + typedef float _gain_type; + _gain_type gain; + typedef uint16_t _white_balance_blue_type; + _white_balance_blue_type white_balance_blue; + typedef uint16_t _white_balance_red_type; + _white_balance_red_type white_balance_red; + + ExposureSequence(): + header(), + shutter_length(0), shutter(NULL), + gain(0), + white_balance_blue(0), + white_balance_red(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->shutter_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->shutter_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->shutter_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->shutter_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->shutter_length); + for( uint32_t i = 0; i < shutter_length; i++){ + *(outbuffer + offset + 0) = (this->shutter[i] >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->shutter[i] >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->shutter[i] >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->shutter[i] >> (8 * 3)) & 0xFF; + offset += sizeof(this->shutter[i]); + } + union { + float real; + uint32_t base; + } u_gain; + u_gain.real = this->gain; + *(outbuffer + offset + 0) = (u_gain.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_gain.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_gain.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_gain.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->gain); + *(outbuffer + offset + 0) = (this->white_balance_blue >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->white_balance_blue >> (8 * 1)) & 0xFF; + offset += sizeof(this->white_balance_blue); + *(outbuffer + offset + 0) = (this->white_balance_red >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->white_balance_red >> (8 * 1)) & 0xFF; + offset += sizeof(this->white_balance_red); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t shutter_lengthT = ((uint32_t) (*(inbuffer + offset))); + shutter_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + shutter_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + shutter_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->shutter_length); + if(shutter_lengthT > shutter_length) + this->shutter = (uint32_t*)realloc(this->shutter, shutter_lengthT * sizeof(uint32_t)); + shutter_length = shutter_lengthT; + for( uint32_t i = 0; i < shutter_length; i++){ + this->st_shutter = ((uint32_t) (*(inbuffer + offset))); + this->st_shutter |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->st_shutter |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->st_shutter |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->st_shutter); + memcpy( &(this->shutter[i]), &(this->st_shutter), sizeof(uint32_t)); + } + union { + float real; + uint32_t base; + } u_gain; + u_gain.base = 0; + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->gain = u_gain.real; + offset += sizeof(this->gain); + this->white_balance_blue = ((uint16_t) (*(inbuffer + offset))); + this->white_balance_blue |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->white_balance_blue); + this->white_balance_red = ((uint16_t) (*(inbuffer + offset))); + this->white_balance_red |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->white_balance_red); + return offset; + } + + const char * getType(){ return "image_exposure_msgs/ExposureSequence"; }; + const char * getMD5(){ return "81d98e1e20eab8beb4bd07beeba6a398"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/image_exposure_msgs/ImageExposureStatistics.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/image_exposure_msgs/ImageExposureStatistics.h new file mode 100644 index 0000000000000000000000000000000000000000..2c366c3ad961b9c2ee2800451b72d4b607db042d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/image_exposure_msgs/ImageExposureStatistics.h @@ -0,0 +1,324 @@ +#ifndef _ROS_image_exposure_msgs_ImageExposureStatistics_h +#define _ROS_image_exposure_msgs_ImageExposureStatistics_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" +#include "statistics_msgs/Stats1D.h" + +namespace image_exposure_msgs +{ + + class ImageExposureStatistics : public ros::Msg + { + public: + typedef ros::Time _stamp_type; + _stamp_type stamp; + typedef const char* _time_reference_type; + _time_reference_type time_reference; + typedef float _shutterms_type; + _shutterms_type shutterms; + typedef float _gaindb_type; + _gaindb_type gaindb; + typedef uint32_t _underExposed_type; + _underExposed_type underExposed; + typedef uint32_t _overExposed_type; + _overExposed_type overExposed; + typedef statistics_msgs::Stats1D _pixelVal_type; + _pixelVal_type pixelVal; + typedef statistics_msgs::Stats1D _pixelAge_type; + _pixelAge_type pixelAge; + typedef double _meanIrradiance_type; + _meanIrradiance_type meanIrradiance; + typedef double _minMeasurableIrradiance_type; + _minMeasurableIrradiance_type minMeasurableIrradiance; + typedef double _maxMeasurableIrradiance_type; + _maxMeasurableIrradiance_type maxMeasurableIrradiance; + typedef double _minObservedIrradiance_type; + _minObservedIrradiance_type minObservedIrradiance; + typedef double _maxObservedIrradiance_type; + _maxObservedIrradiance_type maxObservedIrradiance; + + ImageExposureStatistics(): + stamp(), + time_reference(""), + shutterms(0), + gaindb(0), + underExposed(0), + overExposed(0), + pixelVal(), + pixelAge(), + meanIrradiance(0), + minMeasurableIrradiance(0), + maxMeasurableIrradiance(0), + minObservedIrradiance(0), + maxObservedIrradiance(0) + { + } + + 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_time_reference = strlen(this->time_reference); + varToArr(outbuffer + offset, length_time_reference); + offset += 4; + memcpy(outbuffer + offset, this->time_reference, length_time_reference); + offset += length_time_reference; + union { + float real; + uint32_t base; + } u_shutterms; + u_shutterms.real = this->shutterms; + *(outbuffer + offset + 0) = (u_shutterms.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_shutterms.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_shutterms.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_shutterms.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->shutterms); + union { + float real; + uint32_t base; + } u_gaindb; + u_gaindb.real = this->gaindb; + *(outbuffer + offset + 0) = (u_gaindb.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_gaindb.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_gaindb.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_gaindb.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->gaindb); + *(outbuffer + offset + 0) = (this->underExposed >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->underExposed >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->underExposed >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->underExposed >> (8 * 3)) & 0xFF; + offset += sizeof(this->underExposed); + *(outbuffer + offset + 0) = (this->overExposed >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->overExposed >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->overExposed >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->overExposed >> (8 * 3)) & 0xFF; + offset += sizeof(this->overExposed); + offset += this->pixelVal.serialize(outbuffer + offset); + offset += this->pixelAge.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_meanIrradiance; + u_meanIrradiance.real = this->meanIrradiance; + *(outbuffer + offset + 0) = (u_meanIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_meanIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_meanIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_meanIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_meanIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_meanIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_meanIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_meanIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->meanIrradiance); + union { + double real; + uint64_t base; + } u_minMeasurableIrradiance; + u_minMeasurableIrradiance.real = this->minMeasurableIrradiance; + *(outbuffer + offset + 0) = (u_minMeasurableIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_minMeasurableIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_minMeasurableIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_minMeasurableIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_minMeasurableIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_minMeasurableIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_minMeasurableIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_minMeasurableIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->minMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_maxMeasurableIrradiance; + u_maxMeasurableIrradiance.real = this->maxMeasurableIrradiance; + *(outbuffer + offset + 0) = (u_maxMeasurableIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_maxMeasurableIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_maxMeasurableIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_maxMeasurableIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_maxMeasurableIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_maxMeasurableIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_maxMeasurableIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_maxMeasurableIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->maxMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_minObservedIrradiance; + u_minObservedIrradiance.real = this->minObservedIrradiance; + *(outbuffer + offset + 0) = (u_minObservedIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_minObservedIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_minObservedIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_minObservedIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_minObservedIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_minObservedIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_minObservedIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_minObservedIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->minObservedIrradiance); + union { + double real; + uint64_t base; + } u_maxObservedIrradiance; + u_maxObservedIrradiance.real = this->maxObservedIrradiance; + *(outbuffer + offset + 0) = (u_maxObservedIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_maxObservedIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_maxObservedIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_maxObservedIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_maxObservedIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_maxObservedIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_maxObservedIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_maxObservedIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->maxObservedIrradiance); + 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_time_reference; + arrToVar(length_time_reference, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_time_reference; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_time_reference-1]=0; + this->time_reference = (char *)(inbuffer + offset-1); + offset += length_time_reference; + union { + float real; + uint32_t base; + } u_shutterms; + u_shutterms.base = 0; + u_shutterms.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_shutterms.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_shutterms.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_shutterms.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->shutterms = u_shutterms.real; + offset += sizeof(this->shutterms); + union { + float real; + uint32_t base; + } u_gaindb; + u_gaindb.base = 0; + u_gaindb.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_gaindb.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_gaindb.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_gaindb.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->gaindb = u_gaindb.real; + offset += sizeof(this->gaindb); + this->underExposed = ((uint32_t) (*(inbuffer + offset))); + this->underExposed |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->underExposed |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->underExposed |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->underExposed); + this->overExposed = ((uint32_t) (*(inbuffer + offset))); + this->overExposed |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->overExposed |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->overExposed |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->overExposed); + offset += this->pixelVal.deserialize(inbuffer + offset); + offset += this->pixelAge.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_meanIrradiance; + u_meanIrradiance.base = 0; + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->meanIrradiance = u_meanIrradiance.real; + offset += sizeof(this->meanIrradiance); + union { + double real; + uint64_t base; + } u_minMeasurableIrradiance; + u_minMeasurableIrradiance.base = 0; + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->minMeasurableIrradiance = u_minMeasurableIrradiance.real; + offset += sizeof(this->minMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_maxMeasurableIrradiance; + u_maxMeasurableIrradiance.base = 0; + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->maxMeasurableIrradiance = u_maxMeasurableIrradiance.real; + offset += sizeof(this->maxMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_minObservedIrradiance; + u_minObservedIrradiance.base = 0; + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->minObservedIrradiance = u_minObservedIrradiance.real; + offset += sizeof(this->minObservedIrradiance); + union { + double real; + uint64_t base; + } u_maxObservedIrradiance; + u_maxObservedIrradiance.base = 0; + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->maxObservedIrradiance = u_maxObservedIrradiance.real; + offset += sizeof(this->maxObservedIrradiance); + return offset; + } + + const char * getType(){ return "image_exposure_msgs/ImageExposureStatistics"; }; + const char * getMD5(){ return "334dc170ce6287d1de470f25be78dd9e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/image_exposure_msgs/SequenceExposureStatistics.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/image_exposure_msgs/SequenceExposureStatistics.h new file mode 100644 index 0000000000000000000000000000000000000000..2ba1b3176fdf70f05af219d2bbefec116c965096 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/image_exposure_msgs/SequenceExposureStatistics.h @@ -0,0 +1,250 @@ +#ifndef _ROS_image_exposure_msgs_SequenceExposureStatistics_h +#define _ROS_image_exposure_msgs_SequenceExposureStatistics_h + +#include +#include +#include +#include "ros/msg.h" +#include "image_exposure_msgs/ImageExposureStatistics.h" + +namespace image_exposure_msgs +{ + + class SequenceExposureStatistics : public ros::Msg + { + public: + uint32_t exposures_length; + typedef image_exposure_msgs::ImageExposureStatistics _exposures_type; + _exposures_type st_exposures; + _exposures_type * exposures; + typedef uint32_t _underExposed_type; + _underExposed_type underExposed; + typedef uint32_t _overExposed_type; + _overExposed_type overExposed; + typedef double _meanIrradiance_type; + _meanIrradiance_type meanIrradiance; + typedef double _minMeasurableIrradiance_type; + _minMeasurableIrradiance_type minMeasurableIrradiance; + typedef double _maxMeasurableIrradiance_type; + _maxMeasurableIrradiance_type maxMeasurableIrradiance; + typedef double _minObservedIrradiance_type; + _minObservedIrradiance_type minObservedIrradiance; + typedef double _maxObservedIrradiance_type; + _maxObservedIrradiance_type maxObservedIrradiance; + + SequenceExposureStatistics(): + exposures_length(0), exposures(NULL), + underExposed(0), + overExposed(0), + meanIrradiance(0), + minMeasurableIrradiance(0), + maxMeasurableIrradiance(0), + minObservedIrradiance(0), + maxObservedIrradiance(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->exposures_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->exposures_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->exposures_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->exposures_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->exposures_length); + for( uint32_t i = 0; i < exposures_length; i++){ + offset += this->exposures[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->underExposed >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->underExposed >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->underExposed >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->underExposed >> (8 * 3)) & 0xFF; + offset += sizeof(this->underExposed); + *(outbuffer + offset + 0) = (this->overExposed >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->overExposed >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->overExposed >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->overExposed >> (8 * 3)) & 0xFF; + offset += sizeof(this->overExposed); + union { + double real; + uint64_t base; + } u_meanIrradiance; + u_meanIrradiance.real = this->meanIrradiance; + *(outbuffer + offset + 0) = (u_meanIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_meanIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_meanIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_meanIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_meanIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_meanIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_meanIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_meanIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->meanIrradiance); + union { + double real; + uint64_t base; + } u_minMeasurableIrradiance; + u_minMeasurableIrradiance.real = this->minMeasurableIrradiance; + *(outbuffer + offset + 0) = (u_minMeasurableIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_minMeasurableIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_minMeasurableIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_minMeasurableIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_minMeasurableIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_minMeasurableIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_minMeasurableIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_minMeasurableIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->minMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_maxMeasurableIrradiance; + u_maxMeasurableIrradiance.real = this->maxMeasurableIrradiance; + *(outbuffer + offset + 0) = (u_maxMeasurableIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_maxMeasurableIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_maxMeasurableIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_maxMeasurableIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_maxMeasurableIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_maxMeasurableIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_maxMeasurableIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_maxMeasurableIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->maxMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_minObservedIrradiance; + u_minObservedIrradiance.real = this->minObservedIrradiance; + *(outbuffer + offset + 0) = (u_minObservedIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_minObservedIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_minObservedIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_minObservedIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_minObservedIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_minObservedIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_minObservedIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_minObservedIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->minObservedIrradiance); + union { + double real; + uint64_t base; + } u_maxObservedIrradiance; + u_maxObservedIrradiance.real = this->maxObservedIrradiance; + *(outbuffer + offset + 0) = (u_maxObservedIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_maxObservedIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_maxObservedIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_maxObservedIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_maxObservedIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_maxObservedIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_maxObservedIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_maxObservedIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->maxObservedIrradiance); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t exposures_lengthT = ((uint32_t) (*(inbuffer + offset))); + exposures_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + exposures_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + exposures_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->exposures_length); + if(exposures_lengthT > exposures_length) + this->exposures = (image_exposure_msgs::ImageExposureStatistics*)realloc(this->exposures, exposures_lengthT * sizeof(image_exposure_msgs::ImageExposureStatistics)); + exposures_length = exposures_lengthT; + for( uint32_t i = 0; i < exposures_length; i++){ + offset += this->st_exposures.deserialize(inbuffer + offset); + memcpy( &(this->exposures[i]), &(this->st_exposures), sizeof(image_exposure_msgs::ImageExposureStatistics)); + } + this->underExposed = ((uint32_t) (*(inbuffer + offset))); + this->underExposed |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->underExposed |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->underExposed |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->underExposed); + this->overExposed = ((uint32_t) (*(inbuffer + offset))); + this->overExposed |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->overExposed |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->overExposed |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->overExposed); + union { + double real; + uint64_t base; + } u_meanIrradiance; + u_meanIrradiance.base = 0; + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->meanIrradiance = u_meanIrradiance.real; + offset += sizeof(this->meanIrradiance); + union { + double real; + uint64_t base; + } u_minMeasurableIrradiance; + u_minMeasurableIrradiance.base = 0; + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->minMeasurableIrradiance = u_minMeasurableIrradiance.real; + offset += sizeof(this->minMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_maxMeasurableIrradiance; + u_maxMeasurableIrradiance.base = 0; + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->maxMeasurableIrradiance = u_maxMeasurableIrradiance.real; + offset += sizeof(this->maxMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_minObservedIrradiance; + u_minObservedIrradiance.base = 0; + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->minObservedIrradiance = u_minObservedIrradiance.real; + offset += sizeof(this->minObservedIrradiance); + union { + double real; + uint64_t base; + } u_maxObservedIrradiance; + u_maxObservedIrradiance.base = 0; + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->maxObservedIrradiance = u_maxObservedIrradiance.real; + offset += sizeof(this->maxObservedIrradiance); + return offset; + } + + const char * getType(){ return "image_exposure_msgs/SequenceExposureStatistics"; }; + const char * getMD5(){ return "2a4f3187c50e7b3544984e9e28ce4328"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/laser_assembler/AssembleScans.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/laser_assembler/AssembleScans.h new file mode 100644 index 0000000000000000000000000000000000000000..7aa87458fff78542655b53691a234de11ad69a12 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/laser_assembler/AssembleScans.h @@ -0,0 +1,123 @@ +#ifndef _ROS_SERVICE_AssembleScans_h +#define _ROS_SERVICE_AssembleScans_h +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" +#include "sensor_msgs/PointCloud.h" + +namespace laser_assembler +{ + +static const char ASSEMBLESCANS[] = "laser_assembler/AssembleScans"; + + class AssembleScansRequest : public ros::Msg + { + public: + typedef ros::Time _begin_type; + _begin_type begin; + typedef ros::Time _end_type; + _end_type end; + + AssembleScansRequest(): + begin(), + end() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->begin.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->begin.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->begin.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->begin.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->begin.sec); + *(outbuffer + offset + 0) = (this->begin.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->begin.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->begin.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->begin.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->begin.nsec); + *(outbuffer + offset + 0) = (this->end.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->end.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->end.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->end.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->end.sec); + *(outbuffer + offset + 0) = (this->end.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->end.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->end.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->end.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->end.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->begin.sec = ((uint32_t) (*(inbuffer + offset))); + this->begin.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->begin.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->begin.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->begin.sec); + this->begin.nsec = ((uint32_t) (*(inbuffer + offset))); + this->begin.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->begin.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->begin.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->begin.nsec); + this->end.sec = ((uint32_t) (*(inbuffer + offset))); + this->end.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->end.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->end.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->end.sec); + this->end.nsec = ((uint32_t) (*(inbuffer + offset))); + this->end.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->end.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->end.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->end.nsec); + return offset; + } + + const char * getType(){ return ASSEMBLESCANS; }; + const char * getMD5(){ return "b341004f74e15bf5e1b2053a9183bdc7"; }; + + }; + + class AssembleScansResponse : public ros::Msg + { + public: + typedef sensor_msgs::PointCloud _cloud_type; + _cloud_type cloud; + + AssembleScansResponse(): + cloud() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->cloud.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->cloud.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return ASSEMBLESCANS; }; + const char * getMD5(){ return "4217b28a903e4ad7869a83b3653110ff"; }; + + }; + + class AssembleScans { + public: + typedef AssembleScansRequest Request; + typedef AssembleScansResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/laser_assembler/AssembleScans2.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/laser_assembler/AssembleScans2.h new file mode 100644 index 0000000000000000000000000000000000000000..ae2f6b74f5ae57cde6d0b50a8b13dbde47fe227e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/laser_assembler/AssembleScans2.h @@ -0,0 +1,123 @@ +#ifndef _ROS_SERVICE_AssembleScans2_h +#define _ROS_SERVICE_AssembleScans2_h +#include +#include +#include +#include "ros/msg.h" +#include "sensor_msgs/PointCloud2.h" +#include "ros/time.h" + +namespace laser_assembler +{ + +static const char ASSEMBLESCANS2[] = "laser_assembler/AssembleScans2"; + + class AssembleScans2Request : public ros::Msg + { + public: + typedef ros::Time _begin_type; + _begin_type begin; + typedef ros::Time _end_type; + _end_type end; + + AssembleScans2Request(): + begin(), + end() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->begin.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->begin.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->begin.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->begin.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->begin.sec); + *(outbuffer + offset + 0) = (this->begin.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->begin.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->begin.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->begin.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->begin.nsec); + *(outbuffer + offset + 0) = (this->end.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->end.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->end.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->end.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->end.sec); + *(outbuffer + offset + 0) = (this->end.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->end.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->end.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->end.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->end.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->begin.sec = ((uint32_t) (*(inbuffer + offset))); + this->begin.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->begin.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->begin.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->begin.sec); + this->begin.nsec = ((uint32_t) (*(inbuffer + offset))); + this->begin.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->begin.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->begin.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->begin.nsec); + this->end.sec = ((uint32_t) (*(inbuffer + offset))); + this->end.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->end.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->end.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->end.sec); + this->end.nsec = ((uint32_t) (*(inbuffer + offset))); + this->end.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->end.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->end.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->end.nsec); + return offset; + } + + const char * getType(){ return ASSEMBLESCANS2; }; + const char * getMD5(){ return "b341004f74e15bf5e1b2053a9183bdc7"; }; + + }; + + class AssembleScans2Response : public ros::Msg + { + public: + typedef sensor_msgs::PointCloud2 _cloud_type; + _cloud_type cloud; + + AssembleScans2Response(): + cloud() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->cloud.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->cloud.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return ASSEMBLESCANS2; }; + const char * getMD5(){ return "96cec5374164b3b3d1d7ef5d7628a7ed"; }; + + }; + + class AssembleScans2 { + public: + typedef AssembleScans2Request Request; + typedef AssembleScans2Response Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/main.cpp b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1e769e43080d7a6cc8f08dc4c238e4157de4dd77 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/main.cpp @@ -0,0 +1,118 @@ +// +// main.cpp +// ros_test +// +// Created by Orly Natan on 13/4/18. +// Copyright © 2018 Orly Natan. All rights reserved. +// + +/* (1) +#include + +int main(int argc, const char * argv[]) { + // insert code here... + std::cout << "Hello, World!\n"; + return 0; +} +*/ + +/* (2) + * rosserial Publisher Example + * Prints "hello ROS!" + */ + + +/* +#include "wrapper.h" + +char rosSrvrIp[] = "149.171.153.49"; +char hello[] = "Hello ROS From C/XCode!"; + + + int main() + { + ros_init_pub(rosSrvrIp); + ros_pub(hello); + } + + +*/ + + + + + + + + + + + + + + + + + +/* +#include "ros.h" +#include "std_msgs/String.h" +#include + +ros::NodeHandle nh; + +std_msgs::String str_msg; +ros::Publisher chatter("chatter", &str_msg); + +char rosSrvrIp[] = "149.171.153.49"; //192.168.15.121"; +char hello[] = "Hello ROS!"; + +int main() +{ + //nh.initNode(); + + + nh.initNode(rosSrvrIp); + nh.advertise(chatter); + + while(1) { + str_msg.data = hello; + chatter.publish( &str_msg ); + nh.spinOnce(); + printf("chattered\n"); + sleep(1); + } + +}*/ + +/* (3) + * rosserial_embeddedlinux subscriber example + * + * Prints a string sent on a subscribed ros topic. + * The string can be sent with e.g. + * $ rostopic pub chatter std_msgs/String -- "Hello Embedded Linux" + */ +/* +#include "ros.h" +#include "std_msgs/String.h" +#include + +ros::NodeHandle nh; +char rosSrvrIp[] = "149.171.153.52"; + +void messageCb(const std_msgs::String& received_msg){ + printf("Received subscribed chatter message: %s\n", received_msg.data); +} +ros::Subscriber sub("chatter", messageCb ); + +int main() +{ + //nh.initNode(); + nh.initNode(rosSrvrIp); + nh.subscribe(sub); + + while(1) { + sleep(1); + nh.spinOnce(); + } +}*/ diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/GetMapROI.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/GetMapROI.h new file mode 100644 index 0000000000000000000000000000000000000000..3d39495f973df2a91eb44da11a95baf934ea6c65 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/GetMapROI.h @@ -0,0 +1,204 @@ +#ifndef _ROS_SERVICE_GetMapROI_h +#define _ROS_SERVICE_GetMapROI_h +#include +#include +#include +#include "ros/msg.h" +#include "nav_msgs/OccupancyGrid.h" + +namespace map_msgs +{ + +static const char GETMAPROI[] = "map_msgs/GetMapROI"; + + class GetMapROIRequest : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _l_x_type; + _l_x_type l_x; + typedef double _l_y_type; + _l_y_type l_y; + + GetMapROIRequest(): + x(0), + y(0), + l_x(0), + l_y(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_l_x; + u_l_x.real = this->l_x; + *(outbuffer + offset + 0) = (u_l_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_l_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_l_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_l_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_l_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_l_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_l_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_l_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->l_x); + union { + double real; + uint64_t base; + } u_l_y; + u_l_y.real = this->l_y; + *(outbuffer + offset + 0) = (u_l_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_l_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_l_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_l_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_l_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_l_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_l_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_l_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->l_y); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_l_x; + u_l_x.base = 0; + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->l_x = u_l_x.real; + offset += sizeof(this->l_x); + union { + double real; + uint64_t base; + } u_l_y; + u_l_y.base = 0; + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->l_y = u_l_y.real; + offset += sizeof(this->l_y); + return offset; + } + + const char * getType(){ return GETMAPROI; }; + const char * getMD5(){ return "43c2ff8f45af555c0eaf070c401e9a47"; }; + + }; + + class GetMapROIResponse : public ros::Msg + { + public: + typedef nav_msgs::OccupancyGrid _sub_map_type; + _sub_map_type sub_map; + + GetMapROIResponse(): + sub_map() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->sub_map.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->sub_map.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return GETMAPROI; }; + const char * getMD5(){ return "4d1986519c00d81967d2891a606b234c"; }; + + }; + + class GetMapROI { + public: + typedef GetMapROIRequest Request; + typedef GetMapROIResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/GetPointMap.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/GetPointMap.h new file mode 100644 index 0000000000000000000000000000000000000000..3da8ab148d43352a03ec437fbe58b84f7f847b8c --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/GetPointMap.h @@ -0,0 +1,76 @@ +#ifndef _ROS_SERVICE_GetPointMap_h +#define _ROS_SERVICE_GetPointMap_h +#include +#include +#include +#include "ros/msg.h" +#include "sensor_msgs/PointCloud2.h" + +namespace map_msgs +{ + +static const char GETPOINTMAP[] = "map_msgs/GetPointMap"; + + class GetPointMapRequest : public ros::Msg + { + public: + + GetPointMapRequest() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return GETPOINTMAP; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetPointMapResponse : public ros::Msg + { + public: + typedef sensor_msgs::PointCloud2 _map_type; + _map_type map; + + GetPointMapResponse(): + map() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->map.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->map.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return GETPOINTMAP; }; + const char * getMD5(){ return "b84fbb39505086eb6a62d933c75cb7b4"; }; + + }; + + class GetPointMap { + public: + typedef GetPointMapRequest Request; + typedef GetPointMapResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/GetPointMapROI.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/GetPointMapROI.h new file mode 100644 index 0000000000000000000000000000000000000000..b7c4cdad600370769ef51f1bf9cf7842e7efb2e1 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/GetPointMapROI.h @@ -0,0 +1,300 @@ +#ifndef _ROS_SERVICE_GetPointMapROI_h +#define _ROS_SERVICE_GetPointMapROI_h +#include +#include +#include +#include "ros/msg.h" +#include "sensor_msgs/PointCloud2.h" + +namespace map_msgs +{ + +static const char GETPOINTMAPROI[] = "map_msgs/GetPointMapROI"; + + class GetPointMapROIRequest : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _z_type; + _z_type z; + typedef double _r_type; + _r_type r; + typedef double _l_x_type; + _l_x_type l_x; + typedef double _l_y_type; + _l_y_type l_y; + typedef double _l_z_type; + _l_z_type l_z; + + GetPointMapROIRequest(): + x(0), + y(0), + z(0), + r(0), + l_x(0), + l_y(0), + l_z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.real = this->z; + *(outbuffer + offset + 0) = (u_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->z); + union { + double real; + uint64_t base; + } u_r; + u_r.real = this->r; + *(outbuffer + offset + 0) = (u_r.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_r.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_r.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_r.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_r.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_r.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_r.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_r.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->r); + union { + double real; + uint64_t base; + } u_l_x; + u_l_x.real = this->l_x; + *(outbuffer + offset + 0) = (u_l_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_l_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_l_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_l_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_l_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_l_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_l_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_l_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->l_x); + union { + double real; + uint64_t base; + } u_l_y; + u_l_y.real = this->l_y; + *(outbuffer + offset + 0) = (u_l_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_l_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_l_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_l_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_l_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_l_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_l_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_l_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->l_y); + union { + double real; + uint64_t base; + } u_l_z; + u_l_z.real = this->l_z; + *(outbuffer + offset + 0) = (u_l_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_l_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_l_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_l_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_l_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_l_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_l_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_l_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->l_z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.base = 0; + u_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->z = u_z.real; + offset += sizeof(this->z); + union { + double real; + uint64_t base; + } u_r; + u_r.base = 0; + u_r.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_r.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_r.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_r.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_r.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_r.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_r.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_r.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->r = u_r.real; + offset += sizeof(this->r); + union { + double real; + uint64_t base; + } u_l_x; + u_l_x.base = 0; + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->l_x = u_l_x.real; + offset += sizeof(this->l_x); + union { + double real; + uint64_t base; + } u_l_y; + u_l_y.base = 0; + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->l_y = u_l_y.real; + offset += sizeof(this->l_y); + union { + double real; + uint64_t base; + } u_l_z; + u_l_z.base = 0; + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->l_z = u_l_z.real; + offset += sizeof(this->l_z); + return offset; + } + + const char * getType(){ return GETPOINTMAPROI; }; + const char * getMD5(){ return "895f7e437a9a6dd225316872b187a303"; }; + + }; + + class GetPointMapROIResponse : public ros::Msg + { + public: + typedef sensor_msgs::PointCloud2 _sub_map_type; + _sub_map_type sub_map; + + GetPointMapROIResponse(): + sub_map() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->sub_map.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->sub_map.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return GETPOINTMAPROI; }; + const char * getMD5(){ return "313769f8b0e724525c6463336cbccd63"; }; + + }; + + class GetPointMapROI { + public: + typedef GetPointMapROIRequest Request; + typedef GetPointMapROIResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/OccupancyGridUpdate.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/OccupancyGridUpdate.h new file mode 100644 index 0000000000000000000000000000000000000000..23590d28e90491bda7026c05be1e691a1d5e6c1c --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/OccupancyGridUpdate.h @@ -0,0 +1,156 @@ +#ifndef _ROS_map_msgs_OccupancyGridUpdate_h +#define _ROS_map_msgs_OccupancyGridUpdate_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace map_msgs +{ + + class OccupancyGridUpdate : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef int32_t _x_type; + _x_type x; + typedef int32_t _y_type; + _y_type y; + typedef uint32_t _width_type; + _width_type width; + typedef uint32_t _height_type; + _height_type height; + uint32_t data_length; + typedef int8_t _data_type; + _data_type st_data; + _data_type * data; + + OccupancyGridUpdate(): + header(), + x(0), + y(0), + width(0), + height(0), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + int32_t real; + uint32_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->x); + union { + int32_t real; + uint32_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->y); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF; + offset += sizeof(this->width); + *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF; + offset += sizeof(this->height); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + int32_t real; + uint32_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->x = u_x.real; + offset += sizeof(this->x); + union { + int32_t real; + uint32_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->y = u_y.real; + offset += sizeof(this->y); + this->width = ((uint32_t) (*(inbuffer + offset))); + this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->width); + this->height = ((uint32_t) (*(inbuffer + offset))); + this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->height); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (int8_t*)realloc(this->data, data_lengthT * sizeof(int8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(int8_t)); + } + return offset; + } + + const char * getType(){ return "map_msgs/OccupancyGridUpdate"; }; + const char * getMD5(){ return "b295be292b335c34718bd939deebe1c9"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/PointCloud2Update.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/PointCloud2Update.h new file mode 100644 index 0000000000000000000000000000000000000000..eee4cb176bcbc82e895b6db59d6b6b2ece1f84b7 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/PointCloud2Update.h @@ -0,0 +1,65 @@ +#ifndef _ROS_map_msgs_PointCloud2Update_h +#define _ROS_map_msgs_PointCloud2Update_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/PointCloud2.h" + +namespace map_msgs +{ + + class PointCloud2Update : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef uint32_t _type_type; + _type_type type; + typedef sensor_msgs::PointCloud2 _points_type; + _points_type points; + enum { ADD = 0 }; + enum { DELETE = 1 }; + + PointCloud2Update(): + header(), + type(0), + points() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->type >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->type >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->type >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->type >> (8 * 3)) & 0xFF; + offset += sizeof(this->type); + offset += this->points.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->type = ((uint32_t) (*(inbuffer + offset))); + this->type |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->type |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->type |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->type); + offset += this->points.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "map_msgs/PointCloud2Update"; }; + const char * getMD5(){ return "6c58e4f249ae9cd2b24fb1ee0f99195e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/ProjectedMap.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/ProjectedMap.h new file mode 100644 index 0000000000000000000000000000000000000000..84e5be55eb95d1c9023692c768aeda42012abbe4 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/ProjectedMap.h @@ -0,0 +1,108 @@ +#ifndef _ROS_map_msgs_ProjectedMap_h +#define _ROS_map_msgs_ProjectedMap_h + +#include +#include +#include +#include "ros/msg.h" +#include "nav_msgs/OccupancyGrid.h" + +namespace map_msgs +{ + + class ProjectedMap : public ros::Msg + { + public: + typedef nav_msgs::OccupancyGrid _map_type; + _map_type map; + typedef double _min_z_type; + _min_z_type min_z; + typedef double _max_z_type; + _max_z_type max_z; + + ProjectedMap(): + map(), + min_z(0), + max_z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->map.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_min_z; + u_min_z.real = this->min_z; + *(outbuffer + offset + 0) = (u_min_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_min_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_min_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_min_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_min_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_min_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_min_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_min_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->min_z); + union { + double real; + uint64_t base; + } u_max_z; + u_max_z.real = this->max_z; + *(outbuffer + offset + 0) = (u_max_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max_z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->map.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_min_z; + u_min_z.base = 0; + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->min_z = u_min_z.real; + offset += sizeof(this->min_z); + union { + double real; + uint64_t base; + } u_max_z; + u_max_z.base = 0; + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max_z = u_max_z.real; + offset += sizeof(this->max_z); + return offset; + } + + const char * getType(){ return "map_msgs/ProjectedMap"; }; + const char * getMD5(){ return "7bbe8f96e45089681dc1ea7d023cbfca"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/ProjectedMapInfo.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/ProjectedMapInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..5c7456e4c7e90a2ceab22ba5c3c91e7e0be41451 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/ProjectedMapInfo.h @@ -0,0 +1,247 @@ +#ifndef _ROS_map_msgs_ProjectedMapInfo_h +#define _ROS_map_msgs_ProjectedMapInfo_h + +#include +#include +#include +#include "ros/msg.h" + +namespace map_msgs +{ + + class ProjectedMapInfo : public ros::Msg + { + public: + typedef const char* _frame_id_type; + _frame_id_type frame_id; + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _width_type; + _width_type width; + typedef double _height_type; + _height_type height; + typedef double _min_z_type; + _min_z_type min_z; + typedef double _max_z_type; + _max_z_type max_z; + + ProjectedMapInfo(): + frame_id(""), + x(0), + y(0), + width(0), + height(0), + min_z(0), + max_z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_frame_id = strlen(this->frame_id); + varToArr(outbuffer + offset, length_frame_id); + offset += 4; + memcpy(outbuffer + offset, this->frame_id, length_frame_id); + offset += length_frame_id; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_width; + u_width.real = this->width; + *(outbuffer + offset + 0) = (u_width.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_width.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_width.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_width.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_width.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_width.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_width.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_width.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->width); + union { + double real; + uint64_t base; + } u_height; + u_height.real = this->height; + *(outbuffer + offset + 0) = (u_height.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_height.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_height.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_height.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_height.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_height.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_height.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_height.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->height); + union { + double real; + uint64_t base; + } u_min_z; + u_min_z.real = this->min_z; + *(outbuffer + offset + 0) = (u_min_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_min_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_min_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_min_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_min_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_min_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_min_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_min_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->min_z); + union { + double real; + uint64_t base; + } u_max_z; + u_max_z.real = this->max_z; + *(outbuffer + offset + 0) = (u_max_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max_z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_frame_id; + arrToVar(length_frame_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_frame_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_frame_id-1]=0; + this->frame_id = (char *)(inbuffer + offset-1); + offset += length_frame_id; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_width; + u_width.base = 0; + u_width.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_width.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_width.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_width.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_width.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_width.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_width.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_width.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->width = u_width.real; + offset += sizeof(this->width); + union { + double real; + uint64_t base; + } u_height; + u_height.base = 0; + u_height.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_height.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_height.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_height.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_height.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_height.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_height.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_height.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->height = u_height.real; + offset += sizeof(this->height); + union { + double real; + uint64_t base; + } u_min_z; + u_min_z.base = 0; + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->min_z = u_min_z.real; + offset += sizeof(this->min_z); + union { + double real; + uint64_t base; + } u_max_z; + u_max_z.base = 0; + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max_z = u_max_z.real; + offset += sizeof(this->max_z); + return offset; + } + + const char * getType(){ return "map_msgs/ProjectedMapInfo"; }; + const char * getMD5(){ return "2dc10595ae94de23f22f8a6d2a0eef7a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/ProjectedMapsInfo.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/ProjectedMapsInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..b515b94c87eb380b2052b71bb3e782e3c80700d2 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/ProjectedMapsInfo.h @@ -0,0 +1,96 @@ +#ifndef _ROS_SERVICE_ProjectedMapsInfo_h +#define _ROS_SERVICE_ProjectedMapsInfo_h +#include +#include +#include +#include "ros/msg.h" +#include "map_msgs/ProjectedMapInfo.h" + +namespace map_msgs +{ + +static const char PROJECTEDMAPSINFO[] = "map_msgs/ProjectedMapsInfo"; + + class ProjectedMapsInfoRequest : public ros::Msg + { + public: + uint32_t projected_maps_info_length; + typedef map_msgs::ProjectedMapInfo _projected_maps_info_type; + _projected_maps_info_type st_projected_maps_info; + _projected_maps_info_type * projected_maps_info; + + ProjectedMapsInfoRequest(): + projected_maps_info_length(0), projected_maps_info(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->projected_maps_info_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->projected_maps_info_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->projected_maps_info_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->projected_maps_info_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->projected_maps_info_length); + for( uint32_t i = 0; i < projected_maps_info_length; i++){ + offset += this->projected_maps_info[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t projected_maps_info_lengthT = ((uint32_t) (*(inbuffer + offset))); + projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->projected_maps_info_length); + if(projected_maps_info_lengthT > projected_maps_info_length) + this->projected_maps_info = (map_msgs::ProjectedMapInfo*)realloc(this->projected_maps_info, projected_maps_info_lengthT * sizeof(map_msgs::ProjectedMapInfo)); + projected_maps_info_length = projected_maps_info_lengthT; + for( uint32_t i = 0; i < projected_maps_info_length; i++){ + offset += this->st_projected_maps_info.deserialize(inbuffer + offset); + memcpy( &(this->projected_maps_info[i]), &(this->st_projected_maps_info), sizeof(map_msgs::ProjectedMapInfo)); + } + return offset; + } + + const char * getType(){ return PROJECTEDMAPSINFO; }; + const char * getMD5(){ return "d7980a33202421c8cd74565e57a4d229"; }; + + }; + + class ProjectedMapsInfoResponse : public ros::Msg + { + public: + + ProjectedMapsInfoResponse() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return PROJECTEDMAPSINFO; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class ProjectedMapsInfo { + public: + typedef ProjectedMapsInfoRequest Request; + typedef ProjectedMapsInfoResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/SaveMap.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/SaveMap.h new file mode 100644 index 0000000000000000000000000000000000000000..c304c22f09a021a873b047ef84b095f12b058818 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/SaveMap.h @@ -0,0 +1,76 @@ +#ifndef _ROS_SERVICE_SaveMap_h +#define _ROS_SERVICE_SaveMap_h +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/String.h" + +namespace map_msgs +{ + +static const char SAVEMAP[] = "map_msgs/SaveMap"; + + class SaveMapRequest : public ros::Msg + { + public: + typedef std_msgs::String _filename_type; + _filename_type filename; + + SaveMapRequest(): + filename() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->filename.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->filename.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return SAVEMAP; }; + const char * getMD5(){ return "716e25f9d9dc76ceba197f93cbf05dc7"; }; + + }; + + class SaveMapResponse : public ros::Msg + { + public: + + SaveMapResponse() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return SAVEMAP; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class SaveMap { + public: + typedef SaveMapRequest Request; + typedef SaveMapResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/SetMapProjections.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/SetMapProjections.h new file mode 100644 index 0000000000000000000000000000000000000000..1ead172a4701853d02dd25344ad618eeb5b0baa4 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/map_msgs/SetMapProjections.h @@ -0,0 +1,96 @@ +#ifndef _ROS_SERVICE_SetMapProjections_h +#define _ROS_SERVICE_SetMapProjections_h +#include +#include +#include +#include "ros/msg.h" +#include "map_msgs/ProjectedMapInfo.h" + +namespace map_msgs +{ + +static const char SETMAPPROJECTIONS[] = "map_msgs/SetMapProjections"; + + class SetMapProjectionsRequest : public ros::Msg + { + public: + + SetMapProjectionsRequest() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return SETMAPPROJECTIONS; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class SetMapProjectionsResponse : public ros::Msg + { + public: + uint32_t projected_maps_info_length; + typedef map_msgs::ProjectedMapInfo _projected_maps_info_type; + _projected_maps_info_type st_projected_maps_info; + _projected_maps_info_type * projected_maps_info; + + SetMapProjectionsResponse(): + projected_maps_info_length(0), projected_maps_info(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->projected_maps_info_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->projected_maps_info_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->projected_maps_info_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->projected_maps_info_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->projected_maps_info_length); + for( uint32_t i = 0; i < projected_maps_info_length; i++){ + offset += this->projected_maps_info[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t projected_maps_info_lengthT = ((uint32_t) (*(inbuffer + offset))); + projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->projected_maps_info_length); + if(projected_maps_info_lengthT > projected_maps_info_length) + this->projected_maps_info = (map_msgs::ProjectedMapInfo*)realloc(this->projected_maps_info, projected_maps_info_lengthT * sizeof(map_msgs::ProjectedMapInfo)); + projected_maps_info_length = projected_maps_info_lengthT; + for( uint32_t i = 0; i < projected_maps_info_length; i++){ + offset += this->st_projected_maps_info.deserialize(inbuffer + offset); + memcpy( &(this->projected_maps_info[i]), &(this->st_projected_maps_info), sizeof(map_msgs::ProjectedMapInfo)); + } + return offset; + } + + const char * getType(){ return SETMAPPROJECTIONS; }; + const char * getMD5(){ return "d7980a33202421c8cd74565e57a4d229"; }; + + }; + + class SetMapProjections { + public: + typedef SetMapProjectionsRequest Request; + typedef SetMapProjectionsResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseAction.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseAction.h new file mode 100644 index 0000000000000000000000000000000000000000..ad79c6a59f7d95da4fe53724aa624930bba37fde --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_move_base_msgs_MoveBaseAction_h +#define _ROS_move_base_msgs_MoveBaseAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "move_base_msgs/MoveBaseActionGoal.h" +#include "move_base_msgs/MoveBaseActionResult.h" +#include "move_base_msgs/MoveBaseActionFeedback.h" + +namespace move_base_msgs +{ + + class MoveBaseAction : public ros::Msg + { + public: + typedef move_base_msgs::MoveBaseActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef move_base_msgs::MoveBaseActionResult _action_result_type; + _action_result_type action_result; + typedef move_base_msgs::MoveBaseActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + MoveBaseAction(): + 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 "move_base_msgs/MoveBaseAction"; }; + const char * getMD5(){ return "70b6aca7c7f7746d8d1609ad94c80bb8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseActionFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..1cfebc69b7ce76d37bdbc7c802a12949683568e2 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_move_base_msgs_MoveBaseActionFeedback_h +#define _ROS_move_base_msgs_MoveBaseActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "move_base_msgs/MoveBaseFeedback.h" + +namespace move_base_msgs +{ + + class MoveBaseActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef move_base_msgs::MoveBaseFeedback _feedback_type; + _feedback_type feedback; + + MoveBaseActionFeedback(): + 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 "move_base_msgs/MoveBaseActionFeedback"; }; + const char * getMD5(){ return "7d1870ff6e0decea702b943b5af0b42e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseActionGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..686c4960f6e73a359f2aa9247ea4392d2da5e38d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_move_base_msgs_MoveBaseActionGoal_h +#define _ROS_move_base_msgs_MoveBaseActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "move_base_msgs/MoveBaseGoal.h" + +namespace move_base_msgs +{ + + class MoveBaseActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef move_base_msgs::MoveBaseGoal _goal_type; + _goal_type goal; + + MoveBaseActionGoal(): + 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 "move_base_msgs/MoveBaseActionGoal"; }; + const char * getMD5(){ return "660d6895a1b9a16dce51fbdd9a64a56b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseActionResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..b9614e5aae84d79bb2e71ff3b4b75ae599cbff4d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_move_base_msgs_MoveBaseActionResult_h +#define _ROS_move_base_msgs_MoveBaseActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "move_base_msgs/MoveBaseResult.h" + +namespace move_base_msgs +{ + + class MoveBaseActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef move_base_msgs::MoveBaseResult _result_type; + _result_type result; + + MoveBaseActionResult(): + 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 "move_base_msgs/MoveBaseActionResult"; }; + const char * getMD5(){ return "1eb06eeff08fa7ea874431638cb52332"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..09adc4f282c38789f9c46ffc7eb1bd65195e9faf --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseFeedback.h @@ -0,0 +1,44 @@ +#ifndef _ROS_move_base_msgs_MoveBaseFeedback_h +#define _ROS_move_base_msgs_MoveBaseFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/PoseStamped.h" + +namespace move_base_msgs +{ + + class MoveBaseFeedback : public ros::Msg + { + public: + typedef geometry_msgs::PoseStamped _base_position_type; + _base_position_type base_position; + + MoveBaseFeedback(): + base_position() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->base_position.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->base_position.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "move_base_msgs/MoveBaseFeedback"; }; + const char * getMD5(){ return "3fb824c456a757373a226f6d08071bf0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..d2282173b32b178a8ad29671f28da68e8fa8eece --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseGoal.h @@ -0,0 +1,44 @@ +#ifndef _ROS_move_base_msgs_MoveBaseGoal_h +#define _ROS_move_base_msgs_MoveBaseGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/PoseStamped.h" + +namespace move_base_msgs +{ + + class MoveBaseGoal : public ros::Msg + { + public: + typedef geometry_msgs::PoseStamped _target_pose_type; + _target_pose_type target_pose; + + MoveBaseGoal(): + target_pose() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->target_pose.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->target_pose.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "move_base_msgs/MoveBaseGoal"; }; + const char * getMD5(){ return "257d089627d7eb7136c24d3593d05a16"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseResult.h new file mode 100644 index 0000000000000000000000000000000000000000..c43c53635ee2aa65222c5de4c9091be703a6243c --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseResult.h @@ -0,0 +1,38 @@ +#ifndef _ROS_move_base_msgs_MoveBaseResult_h +#define _ROS_move_base_msgs_MoveBaseResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace move_base_msgs +{ + + class MoveBaseResult : public ros::Msg + { + public: + + MoveBaseResult() + { + } + + 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 "move_base_msgs/MoveBaseResult"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMap.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMap.h new file mode 100644 index 0000000000000000000000000000000000000000..ef7e3fa061e925bd2c2481bfff112214cf03ee66 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMap.h @@ -0,0 +1,76 @@ +#ifndef _ROS_SERVICE_GetMap_h +#define _ROS_SERVICE_GetMap_h +#include +#include +#include +#include "ros/msg.h" +#include "nav_msgs/OccupancyGrid.h" + +namespace nav_msgs +{ + +static const char GETMAP[] = "nav_msgs/GetMap"; + + class GetMapRequest : public ros::Msg + { + public: + + GetMapRequest() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return GETMAP; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetMapResponse : public ros::Msg + { + public: + typedef nav_msgs::OccupancyGrid _map_type; + _map_type map; + + GetMapResponse(): + map() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->map.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->map.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return GETMAP; }; + const char * getMD5(){ return "6cdd0a18e0aff5b0a3ca2326a89b54ff"; }; + + }; + + class GetMap { + public: + typedef GetMapRequest Request; + typedef GetMapResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapAction.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapAction.h new file mode 100644 index 0000000000000000000000000000000000000000..56e82996b630e087630d1189ba7306e73947f9af --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_nav_msgs_GetMapAction_h +#define _ROS_nav_msgs_GetMapAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "nav_msgs/GetMapActionGoal.h" +#include "nav_msgs/GetMapActionResult.h" +#include "nav_msgs/GetMapActionFeedback.h" + +namespace nav_msgs +{ + + class GetMapAction : public ros::Msg + { + public: + typedef nav_msgs::GetMapActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef nav_msgs::GetMapActionResult _action_result_type; + _action_result_type action_result; + typedef nav_msgs::GetMapActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + GetMapAction(): + action_goal(), + action_result(), + action_feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->action_goal.serialize(outbuffer + offset); + offset += this->action_result.serialize(outbuffer + offset); + offset += this->action_feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->action_goal.deserialize(inbuffer + offset); + offset += this->action_result.deserialize(inbuffer + offset); + offset += this->action_feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "nav_msgs/GetMapAction"; }; + const char * getMD5(){ return "e611ad23fbf237c031b7536416dc7cd7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapActionFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..fb60003a1d35b41690069023c5832247c04fb96e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_nav_msgs_GetMapActionFeedback_h +#define _ROS_nav_msgs_GetMapActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "nav_msgs/GetMapFeedback.h" + +namespace nav_msgs +{ + + class GetMapActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef nav_msgs::GetMapFeedback _feedback_type; + _feedback_type feedback; + + GetMapActionFeedback(): + header(), + status(), + feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "nav_msgs/GetMapActionFeedback"; }; + const char * getMD5(){ return "aae20e09065c3809e8a8e87c4c8953fd"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapActionGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..da4244a675c0d8570234e22b651fe7ebf37de2ef --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_nav_msgs_GetMapActionGoal_h +#define _ROS_nav_msgs_GetMapActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "nav_msgs/GetMapGoal.h" + +namespace nav_msgs +{ + + class GetMapActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef nav_msgs::GetMapGoal _goal_type; + _goal_type goal; + + GetMapActionGoal(): + header(), + goal_id(), + goal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->goal_id.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->goal_id.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "nav_msgs/GetMapActionGoal"; }; + const char * getMD5(){ return "4b30be6cd12b9e72826df56b481f40e0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapActionResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..f614a35aa85b334160f59aa75af30c11571201bd --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_nav_msgs_GetMapActionResult_h +#define _ROS_nav_msgs_GetMapActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "nav_msgs/GetMapResult.h" + +namespace nav_msgs +{ + + class GetMapActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef nav_msgs::GetMapResult _result_type; + _result_type result; + + GetMapActionResult(): + header(), + status(), + result() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->result.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->result.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "nav_msgs/GetMapActionResult"; }; + const char * getMD5(){ return "ac66e5b9a79bb4bbd33dab245236c892"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..e3b4560abd6c8e6fdec156e71ef420bb4397b232 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapFeedback.h @@ -0,0 +1,38 @@ +#ifndef _ROS_nav_msgs_GetMapFeedback_h +#define _ROS_nav_msgs_GetMapFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace nav_msgs +{ + + class GetMapFeedback : public ros::Msg + { + public: + + GetMapFeedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return "nav_msgs/GetMapFeedback"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..88a17c5edb5e2e96076e7dbceba8f87a5cb4c6a8 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapGoal.h @@ -0,0 +1,38 @@ +#ifndef _ROS_nav_msgs_GetMapGoal_h +#define _ROS_nav_msgs_GetMapGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace nav_msgs +{ + + class GetMapGoal : public ros::Msg + { + public: + + GetMapGoal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return "nav_msgs/GetMapGoal"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapResult.h new file mode 100644 index 0000000000000000000000000000000000000000..1ef8fbd4d2df6cdaf7764ff6836156837f8e6791 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapResult.h @@ -0,0 +1,44 @@ +#ifndef _ROS_nav_msgs_GetMapResult_h +#define _ROS_nav_msgs_GetMapResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "nav_msgs/OccupancyGrid.h" + +namespace nav_msgs +{ + + class GetMapResult : public ros::Msg + { + public: + typedef nav_msgs::OccupancyGrid _map_type; + _map_type map; + + GetMapResult(): + map() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->map.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->map.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "nav_msgs/GetMapResult"; }; + const char * getMD5(){ return "6cdd0a18e0aff5b0a3ca2326a89b54ff"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetPlan.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetPlan.h new file mode 100644 index 0000000000000000000000000000000000000000..fe312b2ca9c0434749007302d951567710f23712 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GetPlan.h @@ -0,0 +1,111 @@ +#ifndef _ROS_SERVICE_GetPlan_h +#define _ROS_SERVICE_GetPlan_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/PoseStamped.h" +#include "nav_msgs/Path.h" + +namespace nav_msgs +{ + +static const char GETPLAN[] = "nav_msgs/GetPlan"; + + class GetPlanRequest : public ros::Msg + { + public: + typedef geometry_msgs::PoseStamped _start_type; + _start_type start; + typedef geometry_msgs::PoseStamped _goal_type; + _goal_type goal; + typedef float _tolerance_type; + _tolerance_type tolerance; + + GetPlanRequest(): + start(), + goal(), + tolerance(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->start.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_tolerance; + u_tolerance.real = this->tolerance; + *(outbuffer + offset + 0) = (u_tolerance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_tolerance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_tolerance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_tolerance.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->tolerance); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->start.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_tolerance; + u_tolerance.base = 0; + u_tolerance.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_tolerance.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_tolerance.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_tolerance.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->tolerance = u_tolerance.real; + offset += sizeof(this->tolerance); + return offset; + } + + const char * getType(){ return GETPLAN; }; + const char * getMD5(){ return "e25a43e0752bcca599a8c2eef8282df8"; }; + + }; + + class GetPlanResponse : public ros::Msg + { + public: + typedef nav_msgs::Path _plan_type; + _plan_type plan; + + GetPlanResponse(): + plan() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->plan.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->plan.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return GETPLAN; }; + const char * getMD5(){ return "0002bc113c0259d71f6cf8cbc9430e18"; }; + + }; + + class GetPlan { + public: + typedef GetPlanRequest Request; + typedef GetPlanResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GridCells.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GridCells.h new file mode 100644 index 0000000000000000000000000000000000000000..6c41cc669551b82b0e5a88b472e0f0df845be182 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/GridCells.h @@ -0,0 +1,118 @@ +#ifndef _ROS_nav_msgs_GridCells_h +#define _ROS_nav_msgs_GridCells_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Point.h" + +namespace nav_msgs +{ + + class GridCells : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef float _cell_width_type; + _cell_width_type cell_width; + typedef float _cell_height_type; + _cell_height_type cell_height; + uint32_t cells_length; + typedef geometry_msgs::Point _cells_type; + _cells_type st_cells; + _cells_type * cells; + + GridCells(): + header(), + cell_width(0), + cell_height(0), + cells_length(0), cells(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_cell_width; + u_cell_width.real = this->cell_width; + *(outbuffer + offset + 0) = (u_cell_width.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_cell_width.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_cell_width.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_cell_width.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->cell_width); + union { + float real; + uint32_t base; + } u_cell_height; + u_cell_height.real = this->cell_height; + *(outbuffer + offset + 0) = (u_cell_height.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_cell_height.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_cell_height.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_cell_height.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->cell_height); + *(outbuffer + offset + 0) = (this->cells_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->cells_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->cells_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->cells_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->cells_length); + for( uint32_t i = 0; i < cells_length; i++){ + offset += this->cells[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_cell_width; + u_cell_width.base = 0; + u_cell_width.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_cell_width.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_cell_width.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_cell_width.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->cell_width = u_cell_width.real; + offset += sizeof(this->cell_width); + union { + float real; + uint32_t base; + } u_cell_height; + u_cell_height.base = 0; + u_cell_height.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_cell_height.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_cell_height.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_cell_height.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->cell_height = u_cell_height.real; + offset += sizeof(this->cell_height); + uint32_t cells_lengthT = ((uint32_t) (*(inbuffer + offset))); + cells_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + cells_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + cells_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->cells_length); + if(cells_lengthT > cells_length) + this->cells = (geometry_msgs::Point*)realloc(this->cells, cells_lengthT * sizeof(geometry_msgs::Point)); + cells_length = cells_lengthT; + for( uint32_t i = 0; i < cells_length; i++){ + offset += this->st_cells.deserialize(inbuffer + offset); + memcpy( &(this->cells[i]), &(this->st_cells), sizeof(geometry_msgs::Point)); + } + return offset; + } + + const char * getType(){ return "nav_msgs/GridCells"; }; + const char * getMD5(){ return "b9e4f5df6d28e272ebde00a3994830f5"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/MapMetaData.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/MapMetaData.h new file mode 100644 index 0000000000000000000000000000000000000000..47733d907c058a9a84a3ec82a92adacb365f726b --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/MapMetaData.h @@ -0,0 +1,118 @@ +#ifndef _ROS_nav_msgs_MapMetaData_h +#define _ROS_nav_msgs_MapMetaData_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" +#include "geometry_msgs/Pose.h" + +namespace nav_msgs +{ + + class MapMetaData : public ros::Msg + { + public: + typedef ros::Time _map_load_time_type; + _map_load_time_type map_load_time; + typedef float _resolution_type; + _resolution_type resolution; + typedef uint32_t _width_type; + _width_type width; + typedef uint32_t _height_type; + _height_type height; + typedef geometry_msgs::Pose _origin_type; + _origin_type origin; + + MapMetaData(): + map_load_time(), + resolution(0), + width(0), + height(0), + origin() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->map_load_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->map_load_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->map_load_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->map_load_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->map_load_time.sec); + *(outbuffer + offset + 0) = (this->map_load_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->map_load_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->map_load_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->map_load_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->map_load_time.nsec); + union { + float real; + uint32_t base; + } u_resolution; + u_resolution.real = this->resolution; + *(outbuffer + offset + 0) = (u_resolution.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_resolution.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_resolution.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_resolution.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->resolution); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF; + offset += sizeof(this->width); + *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF; + offset += sizeof(this->height); + offset += this->origin.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->map_load_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->map_load_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->map_load_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->map_load_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->map_load_time.sec); + this->map_load_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->map_load_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->map_load_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->map_load_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->map_load_time.nsec); + union { + float real; + uint32_t base; + } u_resolution; + u_resolution.base = 0; + u_resolution.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_resolution.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_resolution.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_resolution.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->resolution = u_resolution.real; + offset += sizeof(this->resolution); + this->width = ((uint32_t) (*(inbuffer + offset))); + this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->width); + this->height = ((uint32_t) (*(inbuffer + offset))); + this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->height); + offset += this->origin.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "nav_msgs/MapMetaData"; }; + const char * getMD5(){ return "10cfc8a2818024d3248802c00c95f11b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/OccupancyGrid.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/OccupancyGrid.h new file mode 100644 index 0000000000000000000000000000000000000000..4205f43e26d0dfb119a56296d1ed474a16c435f7 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/OccupancyGrid.h @@ -0,0 +1,88 @@ +#ifndef _ROS_nav_msgs_OccupancyGrid_h +#define _ROS_nav_msgs_OccupancyGrid_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "nav_msgs/MapMetaData.h" + +namespace nav_msgs +{ + + class OccupancyGrid : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef nav_msgs::MapMetaData _info_type; + _info_type info; + uint32_t data_length; + typedef int8_t _data_type; + _data_type st_data; + _data_type * data; + + OccupancyGrid(): + header(), + info(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->info.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->info.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (int8_t*)realloc(this->data, data_lengthT * sizeof(int8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(int8_t)); + } + return offset; + } + + const char * getType(){ return "nav_msgs/OccupancyGrid"; }; + const char * getMD5(){ return "3381f2d731d4076ec5c71b0759edbe4e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/Odometry.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/Odometry.h new file mode 100644 index 0000000000000000000000000000000000000000..e8eaca598658db00830457e01f52cd466bbd47d6 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/Odometry.h @@ -0,0 +1,73 @@ +#ifndef _ROS_nav_msgs_Odometry_h +#define _ROS_nav_msgs_Odometry_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../std_msgs/Header.h" +#include "../geometry_msgs/PoseWithCovariance.h" +#include "../geometry_msgs/TwistWithCovariance.h" + +namespace nav_msgs +{ + + class Odometry : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _child_frame_id_type; + _child_frame_id_type child_frame_id; + typedef geometry_msgs::PoseWithCovariance _pose_type; + _pose_type pose; + typedef geometry_msgs::TwistWithCovariance _twist_type; + _twist_type twist; + + Odometry(): + header(), + child_frame_id(""), + pose(), + twist() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_child_frame_id = strlen(this->child_frame_id); + varToArr(outbuffer + offset, length_child_frame_id); + offset += 4; + memcpy(outbuffer + offset, this->child_frame_id, length_child_frame_id); + offset += length_child_frame_id; + offset += this->pose.serialize(outbuffer + offset); + offset += this->twist.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_child_frame_id; + arrToVar(length_child_frame_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_child_frame_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_child_frame_id-1]=0; + this->child_frame_id = (char *)(inbuffer + offset-1); + offset += length_child_frame_id; + offset += this->pose.deserialize(inbuffer + offset); + offset += this->twist.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "nav_msgs/Odometry"; }; + const char * getMD5(){ return "cd5e73d190d741a2f92e81eda573aca7"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/Path.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/Path.h new file mode 100644 index 0000000000000000000000000000000000000000..858770643a6517d6e09dcaea4a6a7653d7a9e34e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/Path.h @@ -0,0 +1,70 @@ +#ifndef _ROS_nav_msgs_Path_h +#define _ROS_nav_msgs_Path_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/PoseStamped.h" + +namespace nav_msgs +{ + + class Path : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t poses_length; + typedef geometry_msgs::PoseStamped _poses_type; + _poses_type st_poses; + _poses_type * poses; + + Path(): + header(), + poses_length(0), poses(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->poses_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->poses_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->poses_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->poses_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->poses_length); + for( uint32_t i = 0; i < poses_length; i++){ + offset += this->poses[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t poses_lengthT = ((uint32_t) (*(inbuffer + offset))); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->poses_length); + if(poses_lengthT > poses_length) + this->poses = (geometry_msgs::PoseStamped*)realloc(this->poses, poses_lengthT * sizeof(geometry_msgs::PoseStamped)); + poses_length = poses_lengthT; + for( uint32_t i = 0; i < poses_length; i++){ + offset += this->st_poses.deserialize(inbuffer + offset); + memcpy( &(this->poses[i]), &(this->st_poses), sizeof(geometry_msgs::PoseStamped)); + } + return offset; + } + + const char * getType(){ return "nav_msgs/Path"; }; + const char * getMD5(){ return "6227e2b7e9cce15051f669a5e197bbf7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/SetMap.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/SetMap.h new file mode 100644 index 0000000000000000000000000000000000000000..717cead99266b467a6146fbd76039a66b069759f --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nav_msgs/SetMap.h @@ -0,0 +1,100 @@ +#ifndef _ROS_SERVICE_SetMap_h +#define _ROS_SERVICE_SetMap_h +#include +#include +#include +#include "ros/msg.h" +#include "nav_msgs/OccupancyGrid.h" +#include "geometry_msgs/PoseWithCovarianceStamped.h" + +namespace nav_msgs +{ + +static const char SETMAP[] = "nav_msgs/SetMap"; + + class SetMapRequest : public ros::Msg + { + public: + typedef nav_msgs::OccupancyGrid _map_type; + _map_type map; + typedef geometry_msgs::PoseWithCovarianceStamped _initial_pose_type; + _initial_pose_type initial_pose; + + SetMapRequest(): + map(), + initial_pose() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->map.serialize(outbuffer + offset); + offset += this->initial_pose.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->map.deserialize(inbuffer + offset); + offset += this->initial_pose.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return SETMAP; }; + const char * getMD5(){ return "91149a20d7be299b87c340df8cc94fd4"; }; + + }; + + class SetMapResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + + SetMapResponse(): + success(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + return offset; + } + + const char * getType(){ return SETMAP; }; + const char * getMD5(){ return "358e233cde0c8a8bcfea4ce193f8fc15"; }; + + }; + + class SetMap { + public: + typedef SetMapRequest Request; + typedef SetMapResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/navfn/MakeNavPlan.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/navfn/MakeNavPlan.h new file mode 100644 index 0000000000000000000000000000000000000000..787905bd58e46393062a179e820284d59ba02568 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/navfn/MakeNavPlan.h @@ -0,0 +1,130 @@ +#ifndef _ROS_SERVICE_MakeNavPlan_h +#define _ROS_SERVICE_MakeNavPlan_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/PoseStamped.h" + +namespace navfn +{ + +static const char MAKENAVPLAN[] = "navfn/MakeNavPlan"; + + class MakeNavPlanRequest : public ros::Msg + { + public: + typedef geometry_msgs::PoseStamped _start_type; + _start_type start; + typedef geometry_msgs::PoseStamped _goal_type; + _goal_type goal; + + MakeNavPlanRequest(): + start(), + goal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->start.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->start.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return MAKENAVPLAN; }; + const char * getMD5(){ return "2fe3126bd5b2d56edd5005220333d4fd"; }; + + }; + + class MakeNavPlanResponse : public ros::Msg + { + public: + typedef uint8_t _plan_found_type; + _plan_found_type plan_found; + typedef const char* _error_message_type; + _error_message_type error_message; + uint32_t path_length; + typedef geometry_msgs::PoseStamped _path_type; + _path_type st_path; + _path_type * path; + + MakeNavPlanResponse(): + plan_found(0), + error_message(""), + path_length(0), path(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->plan_found >> (8 * 0)) & 0xFF; + offset += sizeof(this->plan_found); + uint32_t length_error_message = strlen(this->error_message); + varToArr(outbuffer + offset, length_error_message); + offset += 4; + memcpy(outbuffer + offset, this->error_message, length_error_message); + offset += length_error_message; + *(outbuffer + offset + 0) = (this->path_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->path_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->path_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->path_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->path_length); + for( uint32_t i = 0; i < path_length; i++){ + offset += this->path[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->plan_found = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->plan_found); + uint32_t length_error_message; + arrToVar(length_error_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_error_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_error_message-1]=0; + this->error_message = (char *)(inbuffer + offset-1); + offset += length_error_message; + uint32_t path_lengthT = ((uint32_t) (*(inbuffer + offset))); + path_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + path_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + path_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->path_length); + if(path_lengthT > path_length) + this->path = (geometry_msgs::PoseStamped*)realloc(this->path, path_lengthT * sizeof(geometry_msgs::PoseStamped)); + path_length = path_lengthT; + for( uint32_t i = 0; i < path_length; i++){ + offset += this->st_path.deserialize(inbuffer + offset); + memcpy( &(this->path[i]), &(this->st_path), sizeof(geometry_msgs::PoseStamped)); + } + return offset; + } + + const char * getType(){ return MAKENAVPLAN; }; + const char * getMD5(){ return "8b8ed7edf1b237dc9ddda8c8ffed5d3a"; }; + + }; + + class MakeNavPlan { + public: + typedef MakeNavPlanRequest Request; + typedef MakeNavPlanResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/navfn/SetCostmap.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/navfn/SetCostmap.h new file mode 100644 index 0000000000000000000000000000000000000000..8f746c5082e795f1d1d86c26ebdc9c5e06f15e0b --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/navfn/SetCostmap.h @@ -0,0 +1,115 @@ +#ifndef _ROS_SERVICE_SetCostmap_h +#define _ROS_SERVICE_SetCostmap_h +#include +#include +#include +#include "ros/msg.h" + +namespace navfn +{ + +static const char SETCOSTMAP[] = "navfn/SetCostmap"; + + class SetCostmapRequest : public ros::Msg + { + public: + uint32_t costs_length; + typedef uint8_t _costs_type; + _costs_type st_costs; + _costs_type * costs; + typedef uint16_t _height_type; + _height_type height; + typedef uint16_t _width_type; + _width_type width; + + SetCostmapRequest(): + costs_length(0), costs(NULL), + height(0), + width(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->costs_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->costs_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->costs_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->costs_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->costs_length); + for( uint32_t i = 0; i < costs_length; i++){ + *(outbuffer + offset + 0) = (this->costs[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->costs[i]); + } + *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; + offset += sizeof(this->height); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; + offset += sizeof(this->width); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t costs_lengthT = ((uint32_t) (*(inbuffer + offset))); + costs_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + costs_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + costs_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->costs_length); + if(costs_lengthT > costs_length) + this->costs = (uint8_t*)realloc(this->costs, costs_lengthT * sizeof(uint8_t)); + costs_length = costs_lengthT; + for( uint32_t i = 0; i < costs_length; i++){ + this->st_costs = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_costs); + memcpy( &(this->costs[i]), &(this->st_costs), sizeof(uint8_t)); + } + this->height = ((uint16_t) (*(inbuffer + offset))); + this->height |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->height); + this->width = ((uint16_t) (*(inbuffer + offset))); + this->width |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->width); + return offset; + } + + const char * getType(){ return SETCOSTMAP; }; + const char * getMD5(){ return "370ec969cdb71f9cde7c7cbe0d752308"; }; + + }; + + class SetCostmapResponse : public ros::Msg + { + public: + + SetCostmapResponse() + { + } + + 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 SETCOSTMAP; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class SetCostmap { + public: + typedef SetCostmapRequest Request; + typedef SetCostmapResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nodelet/NodeletList.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nodelet/NodeletList.h new file mode 100644 index 0000000000000000000000000000000000000000..6210fa0386bd053540d41974a8d1cae2654eca12 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nodelet/NodeletList.h @@ -0,0 +1,107 @@ +#ifndef _ROS_SERVICE_NodeletList_h +#define _ROS_SERVICE_NodeletList_h +#include +#include +#include +#include "ros/msg.h" + +namespace nodelet +{ + +static const char NODELETLIST[] = "nodelet/NodeletList"; + + class NodeletListRequest : public ros::Msg + { + public: + + NodeletListRequest() + { + } + + 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 NODELETLIST; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class NodeletListResponse : public ros::Msg + { + public: + uint32_t nodelets_length; + typedef char* _nodelets_type; + _nodelets_type st_nodelets; + _nodelets_type * nodelets; + + NodeletListResponse(): + nodelets_length(0), nodelets(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->nodelets_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->nodelets_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->nodelets_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->nodelets_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->nodelets_length); + for( uint32_t i = 0; i < nodelets_length; i++){ + uint32_t length_nodeletsi = strlen(this->nodelets[i]); + varToArr(outbuffer + offset, length_nodeletsi); + offset += 4; + memcpy(outbuffer + offset, this->nodelets[i], length_nodeletsi); + offset += length_nodeletsi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t nodelets_lengthT = ((uint32_t) (*(inbuffer + offset))); + nodelets_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + nodelets_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + nodelets_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->nodelets_length); + if(nodelets_lengthT > nodelets_length) + this->nodelets = (char**)realloc(this->nodelets, nodelets_lengthT * sizeof(char*)); + nodelets_length = nodelets_lengthT; + for( uint32_t i = 0; i < nodelets_length; i++){ + uint32_t length_st_nodelets; + arrToVar(length_st_nodelets, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_nodelets; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_nodelets-1]=0; + this->st_nodelets = (char *)(inbuffer + offset-1); + offset += length_st_nodelets; + memcpy( &(this->nodelets[i]), &(this->st_nodelets), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return NODELETLIST; }; + const char * getMD5(){ return "99c7b10e794f5600b8030e697e946ca7"; }; + + }; + + class NodeletList { + public: + typedef NodeletListRequest Request; + typedef NodeletListResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nodelet/NodeletLoad.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nodelet/NodeletLoad.h new file mode 100644 index 0000000000000000000000000000000000000000..e7a9c5c76f0dac758b6666d02c01f19d4b6d0fba --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nodelet/NodeletLoad.h @@ -0,0 +1,250 @@ +#ifndef _ROS_SERVICE_NodeletLoad_h +#define _ROS_SERVICE_NodeletLoad_h +#include +#include +#include +#include "ros/msg.h" + +namespace nodelet +{ + +static const char NODELETLOAD[] = "nodelet/NodeletLoad"; + + class NodeletLoadRequest : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _type_type; + _type_type type; + uint32_t remap_source_args_length; + typedef char* _remap_source_args_type; + _remap_source_args_type st_remap_source_args; + _remap_source_args_type * remap_source_args; + uint32_t remap_target_args_length; + typedef char* _remap_target_args_type; + _remap_target_args_type st_remap_target_args; + _remap_target_args_type * remap_target_args; + uint32_t my_argv_length; + typedef char* _my_argv_type; + _my_argv_type st_my_argv; + _my_argv_type * my_argv; + typedef const char* _bond_id_type; + _bond_id_type bond_id; + + NodeletLoadRequest(): + name(""), + type(""), + remap_source_args_length(0), remap_source_args(NULL), + remap_target_args_length(0), remap_target_args(NULL), + my_argv_length(0), my_argv(NULL), + bond_id("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_type = strlen(this->type); + varToArr(outbuffer + offset, length_type); + offset += 4; + memcpy(outbuffer + offset, this->type, length_type); + offset += length_type; + *(outbuffer + offset + 0) = (this->remap_source_args_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->remap_source_args_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->remap_source_args_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->remap_source_args_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->remap_source_args_length); + for( uint32_t i = 0; i < remap_source_args_length; i++){ + uint32_t length_remap_source_argsi = strlen(this->remap_source_args[i]); + varToArr(outbuffer + offset, length_remap_source_argsi); + offset += 4; + memcpy(outbuffer + offset, this->remap_source_args[i], length_remap_source_argsi); + offset += length_remap_source_argsi; + } + *(outbuffer + offset + 0) = (this->remap_target_args_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->remap_target_args_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->remap_target_args_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->remap_target_args_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->remap_target_args_length); + for( uint32_t i = 0; i < remap_target_args_length; i++){ + uint32_t length_remap_target_argsi = strlen(this->remap_target_args[i]); + varToArr(outbuffer + offset, length_remap_target_argsi); + offset += 4; + memcpy(outbuffer + offset, this->remap_target_args[i], length_remap_target_argsi); + offset += length_remap_target_argsi; + } + *(outbuffer + offset + 0) = (this->my_argv_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->my_argv_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->my_argv_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->my_argv_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->my_argv_length); + for( uint32_t i = 0; i < my_argv_length; i++){ + uint32_t length_my_argvi = strlen(this->my_argv[i]); + varToArr(outbuffer + offset, length_my_argvi); + offset += 4; + memcpy(outbuffer + offset, this->my_argv[i], length_my_argvi); + offset += length_my_argvi; + } + uint32_t length_bond_id = strlen(this->bond_id); + varToArr(outbuffer + offset, length_bond_id); + offset += 4; + memcpy(outbuffer + offset, this->bond_id, length_bond_id); + offset += length_bond_id; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_type; + arrToVar(length_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type-1]=0; + this->type = (char *)(inbuffer + offset-1); + offset += length_type; + uint32_t remap_source_args_lengthT = ((uint32_t) (*(inbuffer + offset))); + remap_source_args_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + remap_source_args_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + remap_source_args_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->remap_source_args_length); + if(remap_source_args_lengthT > remap_source_args_length) + this->remap_source_args = (char**)realloc(this->remap_source_args, remap_source_args_lengthT * sizeof(char*)); + remap_source_args_length = remap_source_args_lengthT; + for( uint32_t i = 0; i < remap_source_args_length; i++){ + uint32_t length_st_remap_source_args; + arrToVar(length_st_remap_source_args, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_remap_source_args; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_remap_source_args-1]=0; + this->st_remap_source_args = (char *)(inbuffer + offset-1); + offset += length_st_remap_source_args; + memcpy( &(this->remap_source_args[i]), &(this->st_remap_source_args), sizeof(char*)); + } + uint32_t remap_target_args_lengthT = ((uint32_t) (*(inbuffer + offset))); + remap_target_args_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + remap_target_args_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + remap_target_args_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->remap_target_args_length); + if(remap_target_args_lengthT > remap_target_args_length) + this->remap_target_args = (char**)realloc(this->remap_target_args, remap_target_args_lengthT * sizeof(char*)); + remap_target_args_length = remap_target_args_lengthT; + for( uint32_t i = 0; i < remap_target_args_length; i++){ + uint32_t length_st_remap_target_args; + arrToVar(length_st_remap_target_args, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_remap_target_args; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_remap_target_args-1]=0; + this->st_remap_target_args = (char *)(inbuffer + offset-1); + offset += length_st_remap_target_args; + memcpy( &(this->remap_target_args[i]), &(this->st_remap_target_args), sizeof(char*)); + } + uint32_t my_argv_lengthT = ((uint32_t) (*(inbuffer + offset))); + my_argv_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + my_argv_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + my_argv_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->my_argv_length); + if(my_argv_lengthT > my_argv_length) + this->my_argv = (char**)realloc(this->my_argv, my_argv_lengthT * sizeof(char*)); + my_argv_length = my_argv_lengthT; + for( uint32_t i = 0; i < my_argv_length; i++){ + uint32_t length_st_my_argv; + arrToVar(length_st_my_argv, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_my_argv; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_my_argv-1]=0; + this->st_my_argv = (char *)(inbuffer + offset-1); + offset += length_st_my_argv; + memcpy( &(this->my_argv[i]), &(this->st_my_argv), sizeof(char*)); + } + uint32_t length_bond_id; + arrToVar(length_bond_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_bond_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_bond_id-1]=0; + this->bond_id = (char *)(inbuffer + offset-1); + offset += length_bond_id; + return offset; + } + + const char * getType(){ return NODELETLOAD; }; + const char * getMD5(){ return "c6e28cc4d2e259249d96cfb50658fbec"; }; + + }; + + class NodeletLoadResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + + NodeletLoadResponse(): + success(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + return offset; + } + + const char * getType(){ return NODELETLOAD; }; + const char * getMD5(){ return "358e233cde0c8a8bcfea4ce193f8fc15"; }; + + }; + + class NodeletLoad { + public: + typedef NodeletLoadRequest Request; + typedef NodeletLoadResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nodelet/NodeletUnload.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nodelet/NodeletUnload.h new file mode 100644 index 0000000000000000000000000000000000000000..bc865b484c324627c098b7f29ceada5dc18c4dcf --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/nodelet/NodeletUnload.h @@ -0,0 +1,105 @@ +#ifndef _ROS_SERVICE_NodeletUnload_h +#define _ROS_SERVICE_NodeletUnload_h +#include +#include +#include +#include "ros/msg.h" + +namespace nodelet +{ + +static const char NODELETUNLOAD[] = "nodelet/NodeletUnload"; + + class NodeletUnloadRequest : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + + NodeletUnloadRequest(): + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return NODELETUNLOAD; }; + const char * getMD5(){ return "c1f3d28f1b044c871e6eff2e9fc3c667"; }; + + }; + + class NodeletUnloadResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + + NodeletUnloadResponse(): + success(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + return offset; + } + + const char * getType(){ return NODELETUNLOAD; }; + const char * getMD5(){ return "358e233cde0c8a8bcfea4ce193f8fc15"; }; + + }; + + class NodeletUnload { + public: + typedef NodeletUnloadRequest Request; + typedef NodeletUnloadResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/openni2_camera/GetSerial.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/openni2_camera/GetSerial.h new file mode 100644 index 0000000000000000000000000000000000000000..c0f1cdf6ace0963aa4697f4ed9e675a76c87fa89 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/openni2_camera/GetSerial.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_GetSerial_h +#define _ROS_SERVICE_GetSerial_h +#include +#include +#include +#include "ros/msg.h" + +namespace openni2_camera +{ + +static const char GETSERIAL[] = "openni2_camera/GetSerial"; + + class GetSerialRequest : public ros::Msg + { + public: + + GetSerialRequest() + { + } + + 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 GETSERIAL; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetSerialResponse : public ros::Msg + { + public: + typedef const char* _serial_type; + _serial_type serial; + + GetSerialResponse(): + serial("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_serial = strlen(this->serial); + varToArr(outbuffer + offset, length_serial); + offset += 4; + memcpy(outbuffer + offset, this->serial, length_serial); + offset += length_serial; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_serial; + arrToVar(length_serial, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_serial; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_serial-1]=0; + this->serial = (char *)(inbuffer + offset-1); + offset += length_serial; + return offset; + } + + const char * getType(){ return GETSERIAL; }; + const char * getMD5(){ return "fca40cf463282a80db4e2037c8a61741"; }; + + }; + + class GetSerial { + public: + typedef GetSerialRequest Request; + typedef GetSerialResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/pcl_msgs/ModelCoefficients.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/pcl_msgs/ModelCoefficients.h new file mode 100644 index 0000000000000000000000000000000000000000..3256a94821720456308306b84670a142b476e4a2 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/pcl_msgs/ModelCoefficients.h @@ -0,0 +1,88 @@ +#ifndef _ROS_pcl_msgs_ModelCoefficients_h +#define _ROS_pcl_msgs_ModelCoefficients_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace pcl_msgs +{ + + class ModelCoefficients : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t values_length; + typedef float _values_type; + _values_type st_values; + _values_type * values; + + ModelCoefficients(): + header(), + values_length(0), values(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->values_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->values_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->values_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->values_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->values_length); + for( uint32_t i = 0; i < values_length; i++){ + union { + float real; + uint32_t base; + } u_valuesi; + u_valuesi.real = this->values[i]; + *(outbuffer + offset + 0) = (u_valuesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_valuesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_valuesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_valuesi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->values[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t values_lengthT = ((uint32_t) (*(inbuffer + offset))); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->values_length); + if(values_lengthT > values_length) + this->values = (float*)realloc(this->values, values_lengthT * sizeof(float)); + values_length = values_lengthT; + for( uint32_t i = 0; i < values_length; i++){ + union { + float real; + uint32_t base; + } u_st_values; + u_st_values.base = 0; + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_values = u_st_values.real; + offset += sizeof(this->st_values); + memcpy( &(this->values[i]), &(this->st_values), sizeof(float)); + } + return offset; + } + + const char * getType(){ return "pcl_msgs/ModelCoefficients"; }; + const char * getMD5(){ return "ca27dea75e72cb894cd36f9e5005e93e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/pcl_msgs/PointIndices.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/pcl_msgs/PointIndices.h new file mode 100644 index 0000000000000000000000000000000000000000..56feb9b428ad535b79ca0be1e1e8adb3abcffba4 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/pcl_msgs/PointIndices.h @@ -0,0 +1,88 @@ +#ifndef _ROS_pcl_msgs_PointIndices_h +#define _ROS_pcl_msgs_PointIndices_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace pcl_msgs +{ + + class PointIndices : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t indices_length; + typedef int32_t _indices_type; + _indices_type st_indices; + _indices_type * indices; + + PointIndices(): + header(), + indices_length(0), indices(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->indices_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->indices_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->indices_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->indices_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->indices_length); + for( uint32_t i = 0; i < indices_length; i++){ + union { + int32_t real; + uint32_t base; + } u_indicesi; + u_indicesi.real = this->indices[i]; + *(outbuffer + offset + 0) = (u_indicesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_indicesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_indicesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_indicesi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->indices[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t indices_lengthT = ((uint32_t) (*(inbuffer + offset))); + indices_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + indices_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + indices_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->indices_length); + if(indices_lengthT > indices_length) + this->indices = (int32_t*)realloc(this->indices, indices_lengthT * sizeof(int32_t)); + indices_length = indices_lengthT; + for( uint32_t i = 0; i < indices_length; i++){ + union { + int32_t real; + uint32_t base; + } u_st_indices; + u_st_indices.base = 0; + u_st_indices.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_indices.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_indices.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_indices.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_indices = u_st_indices.real; + offset += sizeof(this->st_indices); + memcpy( &(this->indices[i]), &(this->st_indices), sizeof(int32_t)); + } + return offset; + } + + const char * getType(){ return "pcl_msgs/PointIndices"; }; + const char * getMD5(){ return "458c7998b7eaf99908256472e273b3d4"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/pcl_msgs/PolygonMesh.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/pcl_msgs/PolygonMesh.h new file mode 100644 index 0000000000000000000000000000000000000000..d98e4c15539d6d2ca6cf0367547c6dbe170bda0f --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/pcl_msgs/PolygonMesh.h @@ -0,0 +1,76 @@ +#ifndef _ROS_pcl_msgs_PolygonMesh_h +#define _ROS_pcl_msgs_PolygonMesh_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/PointCloud2.h" +#include "pcl_msgs/Vertices.h" + +namespace pcl_msgs +{ + + class PolygonMesh : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef sensor_msgs::PointCloud2 _cloud_type; + _cloud_type cloud; + uint32_t polygons_length; + typedef pcl_msgs::Vertices _polygons_type; + _polygons_type st_polygons; + _polygons_type * polygons; + + PolygonMesh(): + header(), + cloud(), + polygons_length(0), polygons(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->cloud.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->polygons_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->polygons_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->polygons_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->polygons_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->polygons_length); + for( uint32_t i = 0; i < polygons_length; i++){ + offset += this->polygons[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->cloud.deserialize(inbuffer + offset); + uint32_t polygons_lengthT = ((uint32_t) (*(inbuffer + offset))); + polygons_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + polygons_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + polygons_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->polygons_length); + if(polygons_lengthT > polygons_length) + this->polygons = (pcl_msgs::Vertices*)realloc(this->polygons, polygons_lengthT * sizeof(pcl_msgs::Vertices)); + polygons_length = polygons_lengthT; + for( uint32_t i = 0; i < polygons_length; i++){ + offset += this->st_polygons.deserialize(inbuffer + offset); + memcpy( &(this->polygons[i]), &(this->st_polygons), sizeof(pcl_msgs::Vertices)); + } + return offset; + } + + const char * getType(){ return "pcl_msgs/PolygonMesh"; }; + const char * getMD5(){ return "45a5fc6ad2cde8489600a790acc9a38a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/pcl_msgs/Vertices.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/pcl_msgs/Vertices.h new file mode 100644 index 0000000000000000000000000000000000000000..55a67045605dc403395107815dacb5b4da59f44b --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/pcl_msgs/Vertices.h @@ -0,0 +1,71 @@ +#ifndef _ROS_pcl_msgs_Vertices_h +#define _ROS_pcl_msgs_Vertices_h + +#include +#include +#include +#include "ros/msg.h" + +namespace pcl_msgs +{ + + class Vertices : public ros::Msg + { + public: + uint32_t vertices_length; + typedef uint32_t _vertices_type; + _vertices_type st_vertices; + _vertices_type * vertices; + + Vertices(): + vertices_length(0), vertices(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->vertices_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->vertices_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->vertices_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->vertices_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->vertices_length); + for( uint32_t i = 0; i < vertices_length; i++){ + *(outbuffer + offset + 0) = (this->vertices[i] >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->vertices[i] >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->vertices[i] >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->vertices[i] >> (8 * 3)) & 0xFF; + offset += sizeof(this->vertices[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t vertices_lengthT = ((uint32_t) (*(inbuffer + offset))); + vertices_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + vertices_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + vertices_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->vertices_length); + if(vertices_lengthT > vertices_length) + this->vertices = (uint32_t*)realloc(this->vertices, vertices_lengthT * sizeof(uint32_t)); + vertices_length = vertices_lengthT; + for( uint32_t i = 0; i < vertices_length; i++){ + this->st_vertices = ((uint32_t) (*(inbuffer + offset))); + this->st_vertices |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->st_vertices |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->st_vertices |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->st_vertices); + memcpy( &(this->vertices[i]), &(this->st_vertices), sizeof(uint32_t)); + } + return offset; + } + + const char * getType(){ return "pcl_msgs/Vertices"; }; + const char * getMD5(){ return "39bd7b1c23763ddd1b882b97cb7cfe11"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/polled_camera/GetPolledImage.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/polled_camera/GetPolledImage.h new file mode 100644 index 0000000000000000000000000000000000000000..b06240573d3c8944191f7ae26e3ed3a91a24ae94 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/polled_camera/GetPolledImage.h @@ -0,0 +1,202 @@ +#ifndef _ROS_SERVICE_GetPolledImage_h +#define _ROS_SERVICE_GetPolledImage_h +#include +#include +#include +#include "ros/msg.h" +#include "sensor_msgs/RegionOfInterest.h" +#include "ros/duration.h" +#include "ros/time.h" + +namespace polled_camera +{ + +static const char GETPOLLEDIMAGE[] = "polled_camera/GetPolledImage"; + + class GetPolledImageRequest : public ros::Msg + { + public: + typedef const char* _response_namespace_type; + _response_namespace_type response_namespace; + typedef ros::Duration _timeout_type; + _timeout_type timeout; + typedef uint32_t _binning_x_type; + _binning_x_type binning_x; + typedef uint32_t _binning_y_type; + _binning_y_type binning_y; + typedef sensor_msgs::RegionOfInterest _roi_type; + _roi_type roi; + + GetPolledImageRequest(): + response_namespace(""), + timeout(), + binning_x(0), + binning_y(0), + roi() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_response_namespace = strlen(this->response_namespace); + varToArr(outbuffer + offset, length_response_namespace); + offset += 4; + memcpy(outbuffer + offset, this->response_namespace, length_response_namespace); + offset += length_response_namespace; + *(outbuffer + offset + 0) = (this->timeout.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timeout.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timeout.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timeout.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timeout.sec); + *(outbuffer + offset + 0) = (this->timeout.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timeout.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timeout.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timeout.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timeout.nsec); + *(outbuffer + offset + 0) = (this->binning_x >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->binning_x >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->binning_x >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->binning_x >> (8 * 3)) & 0xFF; + offset += sizeof(this->binning_x); + *(outbuffer + offset + 0) = (this->binning_y >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->binning_y >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->binning_y >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->binning_y >> (8 * 3)) & 0xFF; + offset += sizeof(this->binning_y); + offset += this->roi.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_response_namespace; + arrToVar(length_response_namespace, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_response_namespace; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_response_namespace-1]=0; + this->response_namespace = (char *)(inbuffer + offset-1); + offset += length_response_namespace; + this->timeout.sec = ((uint32_t) (*(inbuffer + offset))); + this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timeout.sec); + this->timeout.nsec = ((uint32_t) (*(inbuffer + offset))); + this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timeout.nsec); + this->binning_x = ((uint32_t) (*(inbuffer + offset))); + this->binning_x |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->binning_x |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->binning_x |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->binning_x); + this->binning_y = ((uint32_t) (*(inbuffer + offset))); + this->binning_y |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->binning_y |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->binning_y |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->binning_y); + offset += this->roi.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return GETPOLLEDIMAGE; }; + const char * getMD5(){ return "c77ed43e530fd48e9e7a2a93845e154c"; }; + + }; + + class GetPolledImageResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + typedef ros::Time _stamp_type; + _stamp_type stamp; + + GetPolledImageResponse(): + success(0), + status_message(""), + stamp() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + *(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); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + 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); + return offset; + } + + const char * getType(){ return GETPOLLEDIMAGE; }; + const char * getMD5(){ return "dbf1f851bc511800e6129ccd5a3542ab"; }; + + }; + + class GetPolledImage { + public: + typedef GetPolledImageRequest Request; + typedef GetPolledImageResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/Behaviour.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/Behaviour.h new file mode 100644 index 0000000000000000000000000000000000000000..04c5d8ad267bab1b743a790279c50d22526e3987 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/Behaviour.h @@ -0,0 +1,183 @@ +#ifndef _ROS_py_trees_msgs_Behaviour_h +#define _ROS_py_trees_msgs_Behaviour_h + +#include +#include +#include +#include "ros/msg.h" +#include "uuid_msgs/UniqueID.h" + +namespace py_trees_msgs +{ + + class Behaviour : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _class_name_type; + _class_name_type class_name; + typedef uuid_msgs::UniqueID _own_id_type; + _own_id_type own_id; + typedef uuid_msgs::UniqueID _parent_id_type; + _parent_id_type parent_id; + typedef uuid_msgs::UniqueID _tip_id_type; + _tip_id_type tip_id; + uint32_t child_ids_length; + typedef uuid_msgs::UniqueID _child_ids_type; + _child_ids_type st_child_ids; + _child_ids_type * child_ids; + typedef uint8_t _type_type; + _type_type type; + typedef uint8_t _blackbox_level_type; + _blackbox_level_type blackbox_level; + typedef uint8_t _status_type; + _status_type status; + typedef const char* _message_type; + _message_type message; + typedef bool _is_active_type; + _is_active_type is_active; + enum { INVALID = 1 }; + enum { RUNNING = 2 }; + enum { SUCCESS = 3 }; + enum { FAILURE = 4 }; + enum { UNKNOWN_TYPE = 0 }; + enum { BEHAVIOUR = 1 }; + enum { SEQUENCE = 2 }; + enum { SELECTOR = 3 }; + enum { PARALLEL = 4 }; + enum { CHOOSER = 5 }; + enum { BLACKBOX_LEVEL_DETAIL = 1 }; + enum { BLACKBOX_LEVEL_COMPONENT = 2 }; + enum { BLACKBOX_LEVEL_BIG_PICTURE = 3 }; + enum { BLACKBOX_LEVEL_NOT_A_BLACKBOX = 4 }; + + Behaviour(): + name(""), + class_name(""), + own_id(), + parent_id(), + tip_id(), + child_ids_length(0), child_ids(NULL), + type(0), + blackbox_level(0), + status(0), + message(""), + is_active(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_class_name = strlen(this->class_name); + varToArr(outbuffer + offset, length_class_name); + offset += 4; + memcpy(outbuffer + offset, this->class_name, length_class_name); + offset += length_class_name; + offset += this->own_id.serialize(outbuffer + offset); + offset += this->parent_id.serialize(outbuffer + offset); + offset += this->tip_id.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->child_ids_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->child_ids_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->child_ids_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->child_ids_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->child_ids_length); + for( uint32_t i = 0; i < child_ids_length; i++){ + offset += this->child_ids[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->type >> (8 * 0)) & 0xFF; + offset += sizeof(this->type); + *(outbuffer + offset + 0) = (this->blackbox_level >> (8 * 0)) & 0xFF; + offset += sizeof(this->blackbox_level); + *(outbuffer + offset + 0) = (this->status >> (8 * 0)) & 0xFF; + offset += sizeof(this->status); + uint32_t length_message = strlen(this->message); + varToArr(outbuffer + offset, length_message); + offset += 4; + memcpy(outbuffer + offset, this->message, length_message); + offset += length_message; + union { + bool real; + uint8_t base; + } u_is_active; + u_is_active.real = this->is_active; + *(outbuffer + offset + 0) = (u_is_active.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->is_active); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_class_name; + arrToVar(length_class_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_class_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_class_name-1]=0; + this->class_name = (char *)(inbuffer + offset-1); + offset += length_class_name; + offset += this->own_id.deserialize(inbuffer + offset); + offset += this->parent_id.deserialize(inbuffer + offset); + offset += this->tip_id.deserialize(inbuffer + offset); + uint32_t child_ids_lengthT = ((uint32_t) (*(inbuffer + offset))); + child_ids_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + child_ids_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + child_ids_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->child_ids_length); + if(child_ids_lengthT > child_ids_length) + this->child_ids = (uuid_msgs::UniqueID*)realloc(this->child_ids, child_ids_lengthT * sizeof(uuid_msgs::UniqueID)); + child_ids_length = child_ids_lengthT; + for( uint32_t i = 0; i < child_ids_length; i++){ + offset += this->st_child_ids.deserialize(inbuffer + offset); + memcpy( &(this->child_ids[i]), &(this->st_child_ids), sizeof(uuid_msgs::UniqueID)); + } + this->type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->type); + this->blackbox_level = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->blackbox_level); + this->status = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->status); + uint32_t length_message; + arrToVar(length_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message-1]=0; + this->message = (char *)(inbuffer + offset-1); + offset += length_message; + union { + bool real; + uint8_t base; + } u_is_active; + u_is_active.base = 0; + u_is_active.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->is_active = u_is_active.real; + offset += sizeof(this->is_active); + return offset; + } + + const char * getType(){ return "py_trees_msgs/Behaviour"; }; + const char * getMD5(){ return "88ddda148fc81f5dc402f56e3e333222"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/BehaviourTree.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/BehaviourTree.h new file mode 100644 index 0000000000000000000000000000000000000000..33bfd19c52655c242834aa35a8b1a0689ee1a932 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/BehaviourTree.h @@ -0,0 +1,70 @@ +#ifndef _ROS_py_trees_msgs_BehaviourTree_h +#define _ROS_py_trees_msgs_BehaviourTree_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "py_trees_msgs/Behaviour.h" + +namespace py_trees_msgs +{ + + class BehaviourTree : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t behaviours_length; + typedef py_trees_msgs::Behaviour _behaviours_type; + _behaviours_type st_behaviours; + _behaviours_type * behaviours; + + BehaviourTree(): + header(), + behaviours_length(0), behaviours(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->behaviours_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->behaviours_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->behaviours_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->behaviours_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->behaviours_length); + for( uint32_t i = 0; i < behaviours_length; i++){ + offset += this->behaviours[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t behaviours_lengthT = ((uint32_t) (*(inbuffer + offset))); + behaviours_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + behaviours_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + behaviours_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->behaviours_length); + if(behaviours_lengthT > behaviours_length) + this->behaviours = (py_trees_msgs::Behaviour*)realloc(this->behaviours, behaviours_lengthT * sizeof(py_trees_msgs::Behaviour)); + behaviours_length = behaviours_lengthT; + for( uint32_t i = 0; i < behaviours_length; i++){ + offset += this->st_behaviours.deserialize(inbuffer + offset); + memcpy( &(this->behaviours[i]), &(this->st_behaviours), sizeof(py_trees_msgs::Behaviour)); + } + return offset; + } + + const char * getType(){ return "py_trees_msgs/BehaviourTree"; }; + const char * getMD5(){ return "239023f5538cba34a10a3a5cd6610fa0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/CloseBlackboardWatcher.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/CloseBlackboardWatcher.h new file mode 100644 index 0000000000000000000000000000000000000000..5c6d3922acfb310aa0753bdf63451342a00573fe --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/CloseBlackboardWatcher.h @@ -0,0 +1,105 @@ +#ifndef _ROS_SERVICE_CloseBlackboardWatcher_h +#define _ROS_SERVICE_CloseBlackboardWatcher_h +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + +static const char CLOSEBLACKBOARDWATCHER[] = "py_trees_msgs/CloseBlackboardWatcher"; + + class CloseBlackboardWatcherRequest : public ros::Msg + { + public: + typedef const char* _topic_name_type; + _topic_name_type topic_name; + + CloseBlackboardWatcherRequest(): + topic_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic_name = strlen(this->topic_name); + varToArr(outbuffer + offset, length_topic_name); + offset += 4; + memcpy(outbuffer + offset, this->topic_name, length_topic_name); + offset += length_topic_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic_name; + arrToVar(length_topic_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic_name-1]=0; + this->topic_name = (char *)(inbuffer + offset-1); + offset += length_topic_name; + return offset; + } + + const char * getType(){ return CLOSEBLACKBOARDWATCHER; }; + const char * getMD5(){ return "b38cc2f19f45368c2db7867751ce95a9"; }; + + }; + + class CloseBlackboardWatcherResponse : public ros::Msg + { + public: + typedef bool _result_type; + _result_type result; + + CloseBlackboardWatcherResponse(): + result(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_result; + u_result.real = this->result; + *(outbuffer + offset + 0) = (u_result.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->result); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_result; + u_result.base = 0; + u_result.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->result = u_result.real; + offset += sizeof(this->result); + return offset; + } + + const char * getType(){ return CLOSEBLACKBOARDWATCHER; }; + const char * getMD5(){ return "eb13ac1f1354ccecb7941ee8fa2192e8"; }; + + }; + + class CloseBlackboardWatcher { + public: + typedef CloseBlackboardWatcherRequest Request; + typedef CloseBlackboardWatcherResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockAction.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockAction.h new file mode 100644 index 0000000000000000000000000000000000000000..d9945d023e8243937a54ebd9db130197da19c45e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_DockAction_h +#define _ROS_py_trees_msgs_DockAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "py_trees_msgs/DockActionGoal.h" +#include "py_trees_msgs/DockActionResult.h" +#include "py_trees_msgs/DockActionFeedback.h" + +namespace py_trees_msgs +{ + + class DockAction : public ros::Msg + { + public: + typedef py_trees_msgs::DockActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef py_trees_msgs::DockActionResult _action_result_type; + _action_result_type action_result; + typedef py_trees_msgs::DockActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + DockAction(): + 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 "py_trees_msgs/DockAction"; }; + const char * getMD5(){ return "1487f2ccdee1636e3fa5ee088040ee3a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockActionFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..f485e2bf2f330fa39b3fd7c909598b4427608134 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_DockActionFeedback_h +#define _ROS_py_trees_msgs_DockActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "py_trees_msgs/DockFeedback.h" + +namespace py_trees_msgs +{ + + class DockActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef py_trees_msgs::DockFeedback _feedback_type; + _feedback_type feedback; + + DockActionFeedback(): + 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 "py_trees_msgs/DockActionFeedback"; }; + const char * getMD5(){ return "2ff213e56f8a13eff9119a87d46f6e06"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockActionGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..e90092988579600144b8c9679681107aad69146d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_DockActionGoal_h +#define _ROS_py_trees_msgs_DockActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "py_trees_msgs/DockGoal.h" + +namespace py_trees_msgs +{ + + class DockActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef py_trees_msgs::DockGoal _goal_type; + _goal_type goal; + + DockActionGoal(): + 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 "py_trees_msgs/DockActionGoal"; }; + const char * getMD5(){ return "792a8f48465c33ddc8270c5f2a92be76"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockActionResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..622b6665d7871ba7940c0cc787a8790fc8c2548c --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_DockActionResult_h +#define _ROS_py_trees_msgs_DockActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "py_trees_msgs/DockResult.h" + +namespace py_trees_msgs +{ + + class DockActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef py_trees_msgs::DockResult _result_type; + _result_type result; + + DockActionResult(): + 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 "py_trees_msgs/DockActionResult"; }; + const char * getMD5(){ return "4eda63f75c02197dafd2a62a0d413ab0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..8f6e2a1f598cd25fb6a3442f20c82d55be4003b2 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockFeedback.h @@ -0,0 +1,62 @@ +#ifndef _ROS_py_trees_msgs_DockFeedback_h +#define _ROS_py_trees_msgs_DockFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + + class DockFeedback : public ros::Msg + { + public: + typedef float _percentage_completed_type; + _percentage_completed_type percentage_completed; + + DockFeedback(): + percentage_completed(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_percentage_completed; + u_percentage_completed.real = this->percentage_completed; + *(outbuffer + offset + 0) = (u_percentage_completed.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_percentage_completed.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_percentage_completed.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_percentage_completed.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->percentage_completed); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_percentage_completed; + u_percentage_completed.base = 0; + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->percentage_completed = u_percentage_completed.real; + offset += sizeof(this->percentage_completed); + return offset; + } + + const char * getType(){ return "py_trees_msgs/DockFeedback"; }; + const char * getMD5(){ return "26e2c7154b190781742892deccb6c8f0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..ac04af8ea1ba1cb169a39a9c89e515a30d6a4983 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_DockGoal_h +#define _ROS_py_trees_msgs_DockGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + + class DockGoal : public ros::Msg + { + public: + typedef bool _dock_type; + _dock_type dock; + + DockGoal(): + dock(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_dock; + u_dock.real = this->dock; + *(outbuffer + offset + 0) = (u_dock.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->dock); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_dock; + u_dock.base = 0; + u_dock.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->dock = u_dock.real; + offset += sizeof(this->dock); + return offset; + } + + const char * getType(){ return "py_trees_msgs/DockGoal"; }; + const char * getMD5(){ return "035360b0bb03f7f742a0b2d734a3a660"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockResult.h new file mode 100644 index 0000000000000000000000000000000000000000..685ba137251b2b04811050a30c57ba134bb2680a --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockResult.h @@ -0,0 +1,75 @@ +#ifndef _ROS_py_trees_msgs_DockResult_h +#define _ROS_py_trees_msgs_DockResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + + class DockResult : public ros::Msg + { + public: + typedef int8_t _value_type; + _value_type value; + typedef const char* _message_type; + _message_type message; + enum { SUCCESS = 0 }; + enum { ERROR = 1 }; + + DockResult(): + value(0), + message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_value; + u_value.real = this->value; + *(outbuffer + offset + 0) = (u_value.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->value); + uint32_t length_message = strlen(this->message); + varToArr(outbuffer + offset, length_message); + offset += 4; + memcpy(outbuffer + offset, this->message, length_message); + offset += length_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_value; + u_value.base = 0; + u_value.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->value = u_value.real; + offset += sizeof(this->value); + uint32_t length_message; + arrToVar(length_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message-1]=0; + this->message = (char *)(inbuffer + offset-1); + offset += length_message; + return offset; + } + + const char * getType(){ return "py_trees_msgs/DockResult"; }; + const char * getMD5(){ return "7e3448b3518ac363f90f534593733372"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/GetBlackboardVariables.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/GetBlackboardVariables.h new file mode 100644 index 0000000000000000000000000000000000000000..cd90747425dedcd77baf86916c341a5de93b3993 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/GetBlackboardVariables.h @@ -0,0 +1,107 @@ +#ifndef _ROS_SERVICE_GetBlackboardVariables_h +#define _ROS_SERVICE_GetBlackboardVariables_h +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + +static const char GETBLACKBOARDVARIABLES[] = "py_trees_msgs/GetBlackboardVariables"; + + class GetBlackboardVariablesRequest : public ros::Msg + { + public: + + GetBlackboardVariablesRequest() + { + } + + 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 GETBLACKBOARDVARIABLES; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetBlackboardVariablesResponse : public ros::Msg + { + public: + uint32_t variables_length; + typedef char* _variables_type; + _variables_type st_variables; + _variables_type * variables; + + GetBlackboardVariablesResponse(): + variables_length(0), variables(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->variables_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->variables_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->variables_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->variables_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->variables_length); + for( uint32_t i = 0; i < variables_length; i++){ + uint32_t length_variablesi = strlen(this->variables[i]); + varToArr(outbuffer + offset, length_variablesi); + offset += 4; + memcpy(outbuffer + offset, this->variables[i], length_variablesi); + offset += length_variablesi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t variables_lengthT = ((uint32_t) (*(inbuffer + offset))); + variables_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + variables_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + variables_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->variables_length); + if(variables_lengthT > variables_length) + this->variables = (char**)realloc(this->variables, variables_lengthT * sizeof(char*)); + variables_length = variables_lengthT; + for( uint32_t i = 0; i < variables_length; i++){ + uint32_t length_st_variables; + arrToVar(length_st_variables, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_variables; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_variables-1]=0; + this->st_variables = (char *)(inbuffer + offset-1); + offset += length_st_variables; + memcpy( &(this->variables[i]), &(this->st_variables), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return GETBLACKBOARDVARIABLES; }; + const char * getMD5(){ return "8f184382c36d538fab610317191b119e"; }; + + }; + + class GetBlackboardVariables { + public: + typedef GetBlackboardVariablesRequest Request; + typedef GetBlackboardVariablesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/OpenBlackboardWatcher.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/OpenBlackboardWatcher.h new file mode 100644 index 0000000000000000000000000000000000000000..e4fb7633ed794a72f4cb29d07ac472c363254f4f --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/OpenBlackboardWatcher.h @@ -0,0 +1,124 @@ +#ifndef _ROS_SERVICE_OpenBlackboardWatcher_h +#define _ROS_SERVICE_OpenBlackboardWatcher_h +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + +static const char OPENBLACKBOARDWATCHER[] = "py_trees_msgs/OpenBlackboardWatcher"; + + class OpenBlackboardWatcherRequest : public ros::Msg + { + public: + uint32_t variables_length; + typedef char* _variables_type; + _variables_type st_variables; + _variables_type * variables; + + OpenBlackboardWatcherRequest(): + variables_length(0), variables(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->variables_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->variables_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->variables_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->variables_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->variables_length); + for( uint32_t i = 0; i < variables_length; i++){ + uint32_t length_variablesi = strlen(this->variables[i]); + varToArr(outbuffer + offset, length_variablesi); + offset += 4; + memcpy(outbuffer + offset, this->variables[i], length_variablesi); + offset += length_variablesi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t variables_lengthT = ((uint32_t) (*(inbuffer + offset))); + variables_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + variables_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + variables_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->variables_length); + if(variables_lengthT > variables_length) + this->variables = (char**)realloc(this->variables, variables_lengthT * sizeof(char*)); + variables_length = variables_lengthT; + for( uint32_t i = 0; i < variables_length; i++){ + uint32_t length_st_variables; + arrToVar(length_st_variables, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_variables; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_variables-1]=0; + this->st_variables = (char *)(inbuffer + offset-1); + offset += length_st_variables; + memcpy( &(this->variables[i]), &(this->st_variables), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return OPENBLACKBOARDWATCHER; }; + const char * getMD5(){ return "8f184382c36d538fab610317191b119e"; }; + + }; + + class OpenBlackboardWatcherResponse : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + + OpenBlackboardWatcherResponse(): + topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + return offset; + } + + const char * getType(){ return OPENBLACKBOARDWATCHER; }; + const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; }; + + }; + + class OpenBlackboardWatcher { + public: + typedef OpenBlackboardWatcherRequest Request; + typedef OpenBlackboardWatcherResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateAction.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateAction.h new file mode 100644 index 0000000000000000000000000000000000000000..dda6c2f17acccc74eeca287f78067ae8319a2562 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_RotateAction_h +#define _ROS_py_trees_msgs_RotateAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "py_trees_msgs/RotateActionGoal.h" +#include "py_trees_msgs/RotateActionResult.h" +#include "py_trees_msgs/RotateActionFeedback.h" + +namespace py_trees_msgs +{ + + class RotateAction : public ros::Msg + { + public: + typedef py_trees_msgs::RotateActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef py_trees_msgs::RotateActionResult _action_result_type; + _action_result_type action_result; + typedef py_trees_msgs::RotateActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + RotateAction(): + 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 "py_trees_msgs/RotateAction"; }; + const char * getMD5(){ return "c68d9e0a719660a32868a081a56942db"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateActionFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..e1a7f5bf88549af58d4fac0f2defa7ba0e8752c9 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_RotateActionFeedback_h +#define _ROS_py_trees_msgs_RotateActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "py_trees_msgs/RotateFeedback.h" + +namespace py_trees_msgs +{ + + class RotateActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef py_trees_msgs::RotateFeedback _feedback_type; + _feedback_type feedback; + + RotateActionFeedback(): + 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 "py_trees_msgs/RotateActionFeedback"; }; + const char * getMD5(){ return "344ed0daa120e01d5801edcb980cf618"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateActionGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..1afb37b85cf212f6cb4b200830bd01f08983edbb --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_RotateActionGoal_h +#define _ROS_py_trees_msgs_RotateActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "py_trees_msgs/RotateGoal.h" + +namespace py_trees_msgs +{ + + class RotateActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef py_trees_msgs::RotateGoal _goal_type; + _goal_type goal; + + RotateActionGoal(): + 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 "py_trees_msgs/RotateActionGoal"; }; + const char * getMD5(){ return "4b30be6cd12b9e72826df56b481f40e0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateActionResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..72914314140d4fe2d2430f981536cba4382c30d6 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_RotateActionResult_h +#define _ROS_py_trees_msgs_RotateActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "py_trees_msgs/RotateResult.h" + +namespace py_trees_msgs +{ + + class RotateActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef py_trees_msgs::RotateResult _result_type; + _result_type result; + + RotateActionResult(): + 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 "py_trees_msgs/RotateActionResult"; }; + const char * getMD5(){ return "4eda63f75c02197dafd2a62a0d413ab0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..52aa269941c973aff1c654fd862821079503533e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateFeedback.h @@ -0,0 +1,86 @@ +#ifndef _ROS_py_trees_msgs_RotateFeedback_h +#define _ROS_py_trees_msgs_RotateFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + + class RotateFeedback : public ros::Msg + { + public: + typedef float _percentage_completed_type; + _percentage_completed_type percentage_completed; + typedef float _angle_rotated_type; + _angle_rotated_type angle_rotated; + + RotateFeedback(): + percentage_completed(0), + angle_rotated(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_percentage_completed; + u_percentage_completed.real = this->percentage_completed; + *(outbuffer + offset + 0) = (u_percentage_completed.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_percentage_completed.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_percentage_completed.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_percentage_completed.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->percentage_completed); + union { + float real; + uint32_t base; + } u_angle_rotated; + u_angle_rotated.real = this->angle_rotated; + *(outbuffer + offset + 0) = (u_angle_rotated.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angle_rotated.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angle_rotated.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angle_rotated.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angle_rotated); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_percentage_completed; + u_percentage_completed.base = 0; + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->percentage_completed = u_percentage_completed.real; + offset += sizeof(this->percentage_completed); + union { + float real; + uint32_t base; + } u_angle_rotated; + u_angle_rotated.base = 0; + u_angle_rotated.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angle_rotated.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angle_rotated.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angle_rotated.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angle_rotated = u_angle_rotated.real; + offset += sizeof(this->angle_rotated); + return offset; + } + + const char * getType(){ return "py_trees_msgs/RotateFeedback"; }; + const char * getMD5(){ return "f1088922e17b4a9f4319356ac8d99645"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..4d196edae8ec3ef76bcf8afa4625f23015095d3d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateGoal.h @@ -0,0 +1,38 @@ +#ifndef _ROS_py_trees_msgs_RotateGoal_h +#define _ROS_py_trees_msgs_RotateGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + + class RotateGoal : public ros::Msg + { + public: + + RotateGoal() + { + } + + 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 "py_trees_msgs/RotateGoal"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateResult.h new file mode 100644 index 0000000000000000000000000000000000000000..d84dc6125db11c09cd72f56013bbc66f706e3ad3 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateResult.h @@ -0,0 +1,75 @@ +#ifndef _ROS_py_trees_msgs_RotateResult_h +#define _ROS_py_trees_msgs_RotateResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + + class RotateResult : public ros::Msg + { + public: + typedef int8_t _value_type; + _value_type value; + typedef const char* _message_type; + _message_type message; + enum { SUCCESS = 0 }; + enum { ERROR = 1 }; + + RotateResult(): + value(0), + message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_value; + u_value.real = this->value; + *(outbuffer + offset + 0) = (u_value.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->value); + uint32_t length_message = strlen(this->message); + varToArr(outbuffer + offset, length_message); + offset += 4; + memcpy(outbuffer + offset, this->message, length_message); + offset += length_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_value; + u_value.base = 0; + u_value.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->value = u_value.real; + offset += sizeof(this->value); + uint32_t length_message; + arrToVar(length_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message-1]=0; + this->message = (char *)(inbuffer + offset-1); + offset += length_message; + return offset; + } + + const char * getType(){ return "py_trees_msgs/RotateResult"; }; + const char * getMD5(){ return "7e3448b3518ac363f90f534593733372"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/robot_pose_ekf/GetStatus.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/robot_pose_ekf/GetStatus.h new file mode 100644 index 0000000000000000000000000000000000000000..155cde3422aec6a6f2d131d7573c06e6889ee279 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/robot_pose_ekf/GetStatus.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_GetStatus_h +#define _ROS_SERVICE_GetStatus_h +#include +#include +#include +#include "ros/msg.h" + +namespace robot_pose_ekf +{ + +static const char GETSTATUS[] = "robot_pose_ekf/GetStatus"; + + class GetStatusRequest : public ros::Msg + { + public: + + GetStatusRequest() + { + } + + 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 GETSTATUS; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetStatusResponse : public ros::Msg + { + public: + typedef const char* _status_type; + _status_type status; + + GetStatusResponse(): + status("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_status = strlen(this->status); + varToArr(outbuffer + offset, length_status); + offset += 4; + memcpy(outbuffer + offset, this->status, length_status); + offset += length_status; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_status; + arrToVar(length_status, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status-1]=0; + this->status = (char *)(inbuffer + offset-1); + offset += length_status; + return offset; + } + + const char * getType(){ return GETSTATUS; }; + const char * getMD5(){ return "4fe5af303955c287688e7347e9b00278"; }; + + }; + + class GetStatus { + public: + typedef GetStatusRequest Request; + typedef GetStatusResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesPair.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesPair.h new file mode 100644 index 0000000000000000000000000000000000000000..4ea6cfdea2fc8f69281a83b2134d89ffc4793d69 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesPair.h @@ -0,0 +1,50 @@ +#ifndef _ROS_rocon_service_pair_msgs_TestiesPair_h +#define _ROS_rocon_service_pair_msgs_TestiesPair_h + +#include +#include +#include +#include "ros/msg.h" +#include "rocon_service_pair_msgs/TestiesPairRequest.h" +#include "rocon_service_pair_msgs/TestiesPairResponse.h" + +namespace rocon_service_pair_msgs +{ + + class TestiesPair : public ros::Msg + { + public: + typedef rocon_service_pair_msgs::TestiesPairRequest _pair_request_type; + _pair_request_type pair_request; + typedef rocon_service_pair_msgs::TestiesPairResponse _pair_response_type; + _pair_response_type pair_response; + + TestiesPair(): + pair_request(), + pair_response() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->pair_request.serialize(outbuffer + offset); + offset += this->pair_response.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->pair_request.deserialize(inbuffer + offset); + offset += this->pair_response.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "rocon_service_pair_msgs/TestiesPair"; }; + const char * getMD5(){ return "7b5cb9b4ccdb74840ce04ea92d2a141d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesPairRequest.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesPairRequest.h new file mode 100644 index 0000000000000000000000000000000000000000..8da52e4bfb190b844885b8761e774a21601aaf75 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesPairRequest.h @@ -0,0 +1,50 @@ +#ifndef _ROS_rocon_service_pair_msgs_TestiesPairRequest_h +#define _ROS_rocon_service_pair_msgs_TestiesPairRequest_h + +#include +#include +#include +#include "ros/msg.h" +#include "uuid_msgs/UniqueID.h" +#include "rocon_service_pair_msgs/TestiesRequest.h" + +namespace rocon_service_pair_msgs +{ + + class TestiesPairRequest : public ros::Msg + { + public: + typedef uuid_msgs::UniqueID _id_type; + _id_type id; + typedef rocon_service_pair_msgs::TestiesRequest _request_type; + _request_type request; + + TestiesPairRequest(): + id(), + request() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->id.serialize(outbuffer + offset); + offset += this->request.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->id.deserialize(inbuffer + offset); + offset += this->request.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "rocon_service_pair_msgs/TestiesPairRequest"; }; + const char * getMD5(){ return "71ec95e384ce52aa32491f3b69a62027"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesPairResponse.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesPairResponse.h new file mode 100644 index 0000000000000000000000000000000000000000..4fec039a918024d32c747d50156938adbc1c8df7 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesPairResponse.h @@ -0,0 +1,50 @@ +#ifndef _ROS_rocon_service_pair_msgs_TestiesPairResponse_h +#define _ROS_rocon_service_pair_msgs_TestiesPairResponse_h + +#include +#include +#include +#include "ros/msg.h" +#include "uuid_msgs/UniqueID.h" +#include "rocon_service_pair_msgs/TestiesResponse.h" + +namespace rocon_service_pair_msgs +{ + + class TestiesPairResponse : public ros::Msg + { + public: + typedef uuid_msgs::UniqueID _id_type; + _id_type id; + typedef rocon_service_pair_msgs::TestiesResponse _response_type; + _response_type response; + + TestiesPairResponse(): + id(), + response() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->id.serialize(outbuffer + offset); + offset += this->response.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->id.deserialize(inbuffer + offset); + offset += this->response.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "rocon_service_pair_msgs/TestiesPairResponse"; }; + const char * getMD5(){ return "05404c9fe275eda57650fdfced8cf402"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesRequest.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesRequest.h new file mode 100644 index 0000000000000000000000000000000000000000..058b24d991059a3c14b3687cd12e00f04d917e83 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesRequest.h @@ -0,0 +1,55 @@ +#ifndef _ROS_rocon_service_pair_msgs_TestiesRequest_h +#define _ROS_rocon_service_pair_msgs_TestiesRequest_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_service_pair_msgs +{ + + class TestiesRequest : public ros::Msg + { + public: + typedef const char* _data_type; + _data_type data; + + TestiesRequest(): + data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_data = strlen(this->data); + varToArr(outbuffer + offset, length_data); + offset += 4; + memcpy(outbuffer + offset, this->data, length_data); + offset += length_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_data; + arrToVar(length_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data-1]=0; + this->data = (char *)(inbuffer + offset-1); + offset += length_data; + return offset; + } + + const char * getType(){ return "rocon_service_pair_msgs/TestiesRequest"; }; + const char * getMD5(){ return "992ce8a1687cec8c8bd883ec73ca41d1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesResponse.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesResponse.h new file mode 100644 index 0000000000000000000000000000000000000000..3449e717c709e6359d624af30a96ef9a94b75b9d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesResponse.h @@ -0,0 +1,61 @@ +#ifndef _ROS_rocon_service_pair_msgs_TestiesResponse_h +#define _ROS_rocon_service_pair_msgs_TestiesResponse_h + +#include +#include +#include +#include "ros/msg.h" +#include "uuid_msgs/UniqueID.h" + +namespace rocon_service_pair_msgs +{ + + class TestiesResponse : public ros::Msg + { + public: + typedef uuid_msgs::UniqueID _id_type; + _id_type id; + typedef const char* _data_type; + _data_type data; + + TestiesResponse(): + id(), + data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->id.serialize(outbuffer + offset); + uint32_t length_data = strlen(this->data); + varToArr(outbuffer + offset, length_data); + offset += 4; + memcpy(outbuffer + offset, this->data, length_data); + offset += length_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->id.deserialize(inbuffer + offset); + uint32_t length_data; + arrToVar(length_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data-1]=0; + this->data = (char *)(inbuffer + offset-1); + offset += length_data; + return offset; + } + + const char * getType(){ return "rocon_service_pair_msgs/TestiesResponse"; }; + const char * getMD5(){ return "f2e0bb16a22dc66826bb64ac8b44aeb3"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Connection.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Connection.h new file mode 100644 index 0000000000000000000000000000000000000000..6b4ac1d7e91dce2526aa548cecb201859a090d64 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Connection.h @@ -0,0 +1,146 @@ +#ifndef _ROS_rocon_std_msgs_Connection_h +#define _ROS_rocon_std_msgs_Connection_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class Connection : public ros::Msg + { + public: + typedef const char* _type_type; + _type_type type; + typedef const char* _name_type; + _name_type name; + typedef const char* _node_type; + _node_type node; + typedef const char* _type_msg_type; + _type_msg_type type_msg; + typedef const char* _type_info_type; + _type_info_type type_info; + typedef const char* _xmlrpc_uri_type; + _xmlrpc_uri_type xmlrpc_uri; + enum { PUBLISHER = publisher }; + enum { SUBSCRIBER = subscriber }; + enum { SERVICE = service }; + enum { ACTION_CLIENT = action_client }; + enum { ACTION_SERVER = action_server }; + enum { INVALID = invalid }; + + Connection(): + type(""), + name(""), + node(""), + type_msg(""), + type_info(""), + xmlrpc_uri("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_type = strlen(this->type); + varToArr(outbuffer + offset, length_type); + offset += 4; + memcpy(outbuffer + offset, this->type, length_type); + offset += length_type; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_node = strlen(this->node); + varToArr(outbuffer + offset, length_node); + offset += 4; + memcpy(outbuffer + offset, this->node, length_node); + offset += length_node; + uint32_t length_type_msg = strlen(this->type_msg); + varToArr(outbuffer + offset, length_type_msg); + offset += 4; + memcpy(outbuffer + offset, this->type_msg, length_type_msg); + offset += length_type_msg; + uint32_t length_type_info = strlen(this->type_info); + varToArr(outbuffer + offset, length_type_info); + offset += 4; + memcpy(outbuffer + offset, this->type_info, length_type_info); + offset += length_type_info; + uint32_t length_xmlrpc_uri = strlen(this->xmlrpc_uri); + varToArr(outbuffer + offset, length_xmlrpc_uri); + offset += 4; + memcpy(outbuffer + offset, this->xmlrpc_uri, length_xmlrpc_uri); + offset += length_xmlrpc_uri; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_type; + arrToVar(length_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type-1]=0; + this->type = (char *)(inbuffer + offset-1); + offset += length_type; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_node; + arrToVar(length_node, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_node; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_node-1]=0; + this->node = (char *)(inbuffer + offset-1); + offset += length_node; + uint32_t length_type_msg; + arrToVar(length_type_msg, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type_msg; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type_msg-1]=0; + this->type_msg = (char *)(inbuffer + offset-1); + offset += length_type_msg; + uint32_t length_type_info; + arrToVar(length_type_info, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type_info; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type_info-1]=0; + this->type_info = (char *)(inbuffer + offset-1); + offset += length_type_info; + uint32_t length_xmlrpc_uri; + arrToVar(length_xmlrpc_uri, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_xmlrpc_uri; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_xmlrpc_uri-1]=0; + this->xmlrpc_uri = (char *)(inbuffer + offset-1); + offset += length_xmlrpc_uri; + return offset; + } + + const char * getType(){ return "rocon_std_msgs/Connection"; }; + const char * getMD5(){ return "0dee991006513320090e2ee648136101"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/ConnectionCacheSpin.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/ConnectionCacheSpin.h new file mode 100644 index 0000000000000000000000000000000000000000..274a4527eb2f2d9cbbebc068127dec8142016db4 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/ConnectionCacheSpin.h @@ -0,0 +1,86 @@ +#ifndef _ROS_rocon_std_msgs_ConnectionCacheSpin_h +#define _ROS_rocon_std_msgs_ConnectionCacheSpin_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class ConnectionCacheSpin : public ros::Msg + { + public: + typedef float _spin_freq_type; + _spin_freq_type spin_freq; + typedef float _spin_timer_type; + _spin_timer_type spin_timer; + + ConnectionCacheSpin(): + spin_freq(0), + spin_timer(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_spin_freq; + u_spin_freq.real = this->spin_freq; + *(outbuffer + offset + 0) = (u_spin_freq.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_spin_freq.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_spin_freq.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_spin_freq.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->spin_freq); + union { + float real; + uint32_t base; + } u_spin_timer; + u_spin_timer.real = this->spin_timer; + *(outbuffer + offset + 0) = (u_spin_timer.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_spin_timer.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_spin_timer.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_spin_timer.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->spin_timer); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_spin_freq; + u_spin_freq.base = 0; + u_spin_freq.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_spin_freq.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_spin_freq.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_spin_freq.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->spin_freq = u_spin_freq.real; + offset += sizeof(this->spin_freq); + union { + float real; + uint32_t base; + } u_spin_timer; + u_spin_timer.base = 0; + u_spin_timer.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_spin_timer.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_spin_timer.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_spin_timer.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->spin_timer = u_spin_timer.real; + offset += sizeof(this->spin_timer); + return offset; + } + + const char * getType(){ return "rocon_std_msgs/ConnectionCacheSpin"; }; + const char * getMD5(){ return "b6c0b0ddb1d2a2de9918dc5f6d87680a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/ConnectionsDiff.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/ConnectionsDiff.h new file mode 100644 index 0000000000000000000000000000000000000000..f7848ac00914249f5873c06a10b9733fc029ef94 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/ConnectionsDiff.h @@ -0,0 +1,89 @@ +#ifndef _ROS_rocon_std_msgs_ConnectionsDiff_h +#define _ROS_rocon_std_msgs_ConnectionsDiff_h + +#include +#include +#include +#include "ros/msg.h" +#include "rocon_std_msgs/Connection.h" + +namespace rocon_std_msgs +{ + + class ConnectionsDiff : public ros::Msg + { + public: + uint32_t added_length; + typedef rocon_std_msgs::Connection _added_type; + _added_type st_added; + _added_type * added; + uint32_t lost_length; + typedef rocon_std_msgs::Connection _lost_type; + _lost_type st_lost; + _lost_type * lost; + + ConnectionsDiff(): + added_length(0), added(NULL), + lost_length(0), lost(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->added_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->added_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->added_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->added_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->added_length); + for( uint32_t i = 0; i < added_length; i++){ + offset += this->added[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->lost_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->lost_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->lost_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->lost_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->lost_length); + for( uint32_t i = 0; i < lost_length; i++){ + offset += this->lost[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t added_lengthT = ((uint32_t) (*(inbuffer + offset))); + added_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + added_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + added_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->added_length); + if(added_lengthT > added_length) + this->added = (rocon_std_msgs::Connection*)realloc(this->added, added_lengthT * sizeof(rocon_std_msgs::Connection)); + added_length = added_lengthT; + for( uint32_t i = 0; i < added_length; i++){ + offset += this->st_added.deserialize(inbuffer + offset); + memcpy( &(this->added[i]), &(this->st_added), sizeof(rocon_std_msgs::Connection)); + } + uint32_t lost_lengthT = ((uint32_t) (*(inbuffer + offset))); + lost_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + lost_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + lost_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->lost_length); + if(lost_lengthT > lost_length) + this->lost = (rocon_std_msgs::Connection*)realloc(this->lost, lost_lengthT * sizeof(rocon_std_msgs::Connection)); + lost_length = lost_lengthT; + for( uint32_t i = 0; i < lost_length; i++){ + offset += this->st_lost.deserialize(inbuffer + offset); + memcpy( &(this->lost[i]), &(this->st_lost), sizeof(rocon_std_msgs::Connection)); + } + return offset; + } + + const char * getType(){ return "rocon_std_msgs/ConnectionsDiff"; }; + const char * getMD5(){ return "19f9e3bef1153b4bc619ec3d21b94718"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/ConnectionsList.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/ConnectionsList.h new file mode 100644 index 0000000000000000000000000000000000000000..3d595df768ea4a55316afd74c181349bc3a59160 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/ConnectionsList.h @@ -0,0 +1,64 @@ +#ifndef _ROS_rocon_std_msgs_ConnectionsList_h +#define _ROS_rocon_std_msgs_ConnectionsList_h + +#include +#include +#include +#include "ros/msg.h" +#include "rocon_std_msgs/Connection.h" + +namespace rocon_std_msgs +{ + + class ConnectionsList : public ros::Msg + { + public: + uint32_t connections_length; + typedef rocon_std_msgs::Connection _connections_type; + _connections_type st_connections; + _connections_type * connections; + + ConnectionsList(): + connections_length(0), connections(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->connections_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->connections_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->connections_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->connections_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->connections_length); + for( uint32_t i = 0; i < connections_length; i++){ + offset += this->connections[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t connections_lengthT = ((uint32_t) (*(inbuffer + offset))); + connections_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + connections_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + connections_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->connections_length); + if(connections_lengthT > connections_length) + this->connections = (rocon_std_msgs::Connection*)realloc(this->connections, connections_lengthT * sizeof(rocon_std_msgs::Connection)); + connections_length = connections_lengthT; + for( uint32_t i = 0; i < connections_length; i++){ + offset += this->st_connections.deserialize(inbuffer + offset); + memcpy( &(this->connections[i]), &(this->st_connections), sizeof(rocon_std_msgs::Connection)); + } + return offset; + } + + const char * getType(){ return "rocon_std_msgs/ConnectionsList"; }; + const char * getMD5(){ return "672d6ad69b684884f8fb6f4acedbd39f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/EmptyString.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/EmptyString.h new file mode 100644 index 0000000000000000000000000000000000000000..a6d873352777b5e88765f613913e516144587d6b --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/EmptyString.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_EmptyString_h +#define _ROS_SERVICE_EmptyString_h +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + +static const char EMPTYSTRING[] = "rocon_std_msgs/EmptyString"; + + class EmptyStringRequest : public ros::Msg + { + public: + + EmptyStringRequest() + { + } + + 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 EMPTYSTRING; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class EmptyStringResponse : public ros::Msg + { + public: + typedef const char* _data_type; + _data_type data; + + EmptyStringResponse(): + data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_data = strlen(this->data); + varToArr(outbuffer + offset, length_data); + offset += 4; + memcpy(outbuffer + offset, this->data, length_data); + offset += length_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_data; + arrToVar(length_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data-1]=0; + this->data = (char *)(inbuffer + offset-1); + offset += length_data; + return offset; + } + + const char * getType(){ return EMPTYSTRING; }; + const char * getMD5(){ return "992ce8a1687cec8c8bd883ec73ca41d1"; }; + + }; + + class EmptyString { + public: + typedef EmptyStringRequest Request; + typedef EmptyStringResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Float32Stamped.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Float32Stamped.h new file mode 100644 index 0000000000000000000000000000000000000000..fd8f5ffc8fc57fc6a6559993596960bcafd2a084 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Float32Stamped.h @@ -0,0 +1,68 @@ +#ifndef _ROS_rocon_std_msgs_Float32Stamped_h +#define _ROS_rocon_std_msgs_Float32Stamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace rocon_std_msgs +{ + + class Float32Stamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef float _data_type; + _data_type data; + + Float32Stamped(): + header(), + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + 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); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + 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); + return offset; + } + + const char * getType(){ return "rocon_std_msgs/Float32Stamped"; }; + const char * getMD5(){ return "ef848af8cf12f6df11682cc76fba477b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Icon.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Icon.h new file mode 100644 index 0000000000000000000000000000000000000000..b30516e81ba691b26d6ce651df72041c98720cc7 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Icon.h @@ -0,0 +1,99 @@ +#ifndef _ROS_rocon_std_msgs_Icon_h +#define _ROS_rocon_std_msgs_Icon_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class Icon : public ros::Msg + { + public: + typedef const char* _resource_name_type; + _resource_name_type resource_name; + typedef const char* _format_type; + _format_type format; + uint32_t data_length; + typedef uint8_t _data_type; + _data_type st_data; + _data_type * data; + + Icon(): + resource_name(""), + format(""), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_resource_name = strlen(this->resource_name); + varToArr(outbuffer + offset, length_resource_name); + offset += 4; + memcpy(outbuffer + offset, this->resource_name, length_resource_name); + offset += length_resource_name; + uint32_t length_format = strlen(this->format); + varToArr(outbuffer + offset, length_format); + offset += 4; + memcpy(outbuffer + offset, this->format, length_format); + offset += length_format; + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_resource_name; + arrToVar(length_resource_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_resource_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_resource_name-1]=0; + this->resource_name = (char *)(inbuffer + offset-1); + offset += length_resource_name; + uint32_t length_format; + arrToVar(length_format, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_format; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_format-1]=0; + this->format = (char *)(inbuffer + offset-1); + offset += length_format; + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint8_t*)realloc(this->data, data_lengthT * sizeof(uint8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint8_t)); + } + return offset; + } + + const char * getType(){ return "rocon_std_msgs/Icon"; }; + const char * getMD5(){ return "2ddacfedd31b6da3f723794afbd3b9de"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/KeyValue.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/KeyValue.h new file mode 100644 index 0000000000000000000000000000000000000000..980b1b5f3b837bca96ac40900f80dfa73781ee5d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/KeyValue.h @@ -0,0 +1,72 @@ +#ifndef _ROS_rocon_std_msgs_KeyValue_h +#define _ROS_rocon_std_msgs_KeyValue_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class KeyValue : public ros::Msg + { + public: + typedef const char* _key_type; + _key_type key; + typedef const char* _value_type; + _value_type value; + + KeyValue(): + key(""), + value("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_key = strlen(this->key); + varToArr(outbuffer + offset, length_key); + offset += 4; + memcpy(outbuffer + offset, this->key, length_key); + offset += length_key; + uint32_t length_value = strlen(this->value); + varToArr(outbuffer + offset, length_value); + offset += 4; + memcpy(outbuffer + offset, this->value, length_value); + offset += length_value; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_key; + arrToVar(length_key, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_key; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_key-1]=0; + this->key = (char *)(inbuffer + offset-1); + offset += length_key; + uint32_t length_value; + arrToVar(length_value, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_value; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_value-1]=0; + this->value = (char *)(inbuffer + offset-1); + offset += length_value; + return offset; + } + + const char * getType(){ return "rocon_std_msgs/KeyValue"; }; + const char * getMD5(){ return "cf57fdc6617a881a88c16e768132149c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/MasterInfo.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/MasterInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..7cf4d4a95c41e39967d583b441ae44ef67c76785 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/MasterInfo.h @@ -0,0 +1,112 @@ +#ifndef _ROS_rocon_std_msgs_MasterInfo_h +#define _ROS_rocon_std_msgs_MasterInfo_h + +#include +#include +#include +#include "ros/msg.h" +#include "rocon_std_msgs/Icon.h" + +namespace rocon_std_msgs +{ + + class MasterInfo : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _rocon_uri_type; + _rocon_uri_type rocon_uri; + typedef const char* _description_type; + _description_type description; + typedef rocon_std_msgs::Icon _icon_type; + _icon_type icon; + typedef const char* _version_type; + _version_type version; + + MasterInfo(): + name(""), + rocon_uri(""), + description(""), + icon(), + version("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_rocon_uri = strlen(this->rocon_uri); + varToArr(outbuffer + offset, length_rocon_uri); + offset += 4; + memcpy(outbuffer + offset, this->rocon_uri, length_rocon_uri); + offset += length_rocon_uri; + uint32_t length_description = strlen(this->description); + varToArr(outbuffer + offset, length_description); + offset += 4; + memcpy(outbuffer + offset, this->description, length_description); + offset += length_description; + offset += this->icon.serialize(outbuffer + offset); + uint32_t length_version = strlen(this->version); + varToArr(outbuffer + offset, length_version); + offset += 4; + memcpy(outbuffer + offset, this->version, length_version); + offset += length_version; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_rocon_uri; + arrToVar(length_rocon_uri, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_rocon_uri; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_rocon_uri-1]=0; + this->rocon_uri = (char *)(inbuffer + offset-1); + offset += length_rocon_uri; + uint32_t length_description; + arrToVar(length_description, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_description; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_description-1]=0; + this->description = (char *)(inbuffer + offset-1); + offset += length_description; + offset += this->icon.deserialize(inbuffer + offset); + uint32_t length_version; + arrToVar(length_version, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_version; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_version-1]=0; + this->version = (char *)(inbuffer + offset-1); + offset += length_version; + return offset; + } + + const char * getType(){ return "rocon_std_msgs/MasterInfo"; }; + const char * getMD5(){ return "e85613ae2e3faade6b77d94b4e0bf4bf"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Remapping.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Remapping.h new file mode 100644 index 0000000000000000000000000000000000000000..5e94955524da6b93c5013fc59393ef62dd1e128a --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Remapping.h @@ -0,0 +1,72 @@ +#ifndef _ROS_rocon_std_msgs_Remapping_h +#define _ROS_rocon_std_msgs_Remapping_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class Remapping : public ros::Msg + { + public: + typedef const char* _remap_from_type; + _remap_from_type remap_from; + typedef const char* _remap_to_type; + _remap_to_type remap_to; + + Remapping(): + remap_from(""), + remap_to("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_remap_from = strlen(this->remap_from); + varToArr(outbuffer + offset, length_remap_from); + offset += 4; + memcpy(outbuffer + offset, this->remap_from, length_remap_from); + offset += length_remap_from; + uint32_t length_remap_to = strlen(this->remap_to); + varToArr(outbuffer + offset, length_remap_to); + offset += 4; + memcpy(outbuffer + offset, this->remap_to, length_remap_to); + offset += length_remap_to; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_remap_from; + arrToVar(length_remap_from, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_remap_from; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_remap_from-1]=0; + this->remap_from = (char *)(inbuffer + offset-1); + offset += length_remap_from; + uint32_t length_remap_to; + arrToVar(length_remap_to, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_remap_to; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_remap_to-1]=0; + this->remap_to = (char *)(inbuffer + offset-1); + offset += length_remap_to; + return offset; + } + + const char * getType(){ return "rocon_std_msgs/Remapping"; }; + const char * getMD5(){ return "26f16c667d483280bc5d040bf2c0cd8d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringArray.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringArray.h new file mode 100644 index 0000000000000000000000000000000000000000..9beb93ab99b69fb28a07aad67e0974a23813ea4f --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringArray.h @@ -0,0 +1,75 @@ +#ifndef _ROS_rocon_std_msgs_StringArray_h +#define _ROS_rocon_std_msgs_StringArray_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class StringArray : public ros::Msg + { + public: + uint32_t strings_length; + typedef char* _strings_type; + _strings_type st_strings; + _strings_type * strings; + + StringArray(): + strings_length(0), strings(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->strings_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->strings_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->strings_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->strings_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->strings_length); + for( uint32_t i = 0; i < strings_length; i++){ + uint32_t length_stringsi = strlen(this->strings[i]); + varToArr(outbuffer + offset, length_stringsi); + offset += 4; + memcpy(outbuffer + offset, this->strings[i], length_stringsi); + offset += length_stringsi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t strings_lengthT = ((uint32_t) (*(inbuffer + offset))); + strings_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + strings_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + strings_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->strings_length); + if(strings_lengthT > strings_length) + this->strings = (char**)realloc(this->strings, strings_lengthT * sizeof(char*)); + strings_length = strings_lengthT; + for( uint32_t i = 0; i < strings_length; i++){ + uint32_t length_st_strings; + arrToVar(length_st_strings, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_strings; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_strings-1]=0; + this->st_strings = (char *)(inbuffer + offset-1); + offset += length_st_strings; + memcpy( &(this->strings[i]), &(this->st_strings), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return "rocon_std_msgs/StringArray"; }; + const char * getMD5(){ return "51789d20146e565223d0963361aecda1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Strings.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Strings.h new file mode 100644 index 0000000000000000000000000000000000000000..71f98091922e3e9728c845555a2df8b2dfac688d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Strings.h @@ -0,0 +1,83 @@ +#ifndef _ROS_rocon_std_msgs_Strings_h +#define _ROS_rocon_std_msgs_Strings_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class Strings : public ros::Msg + { + public: + enum { ROCON_VERSION = acdc }; + enum { URI_WILDCARD = * }; + enum { HW_PC = pc }; + enum { HW_TURTLEBOT2 = turtlebot2 }; + enum { HW_PR2 = pr2 }; + enum { HW_WAITERBOT = waiterbot }; + enum { HW_ROBOT_OTHER = robot_other }; + enum { HW_GALAXY = galaxy }; + enum { HW_MEGA = mega }; + enum { HW_NOTE3 = note3 }; + enum { HW_PHONE_OTHER = phone_other }; + enum { HW_XOOM = xoom }; + enum { HW_NOTE10 = note10 }; + enum { HW_TABLET_OTHER = tablet_other }; + enum { APPLICATION_FRAMEWORK_OTHER = application_framework_other }; + enum { APPLICATION_FRAMEWORK_OPROS = opros }; + enum { APPLICATION_FRAMEWORK_GROOVY = groovy }; + enum { APPLICATION_FRAMEWORK_HYDRO = hydro }; + enum { APPLICATION_FRAMEWORK_INDIGO = indigo }; + enum { APPLICATION_FRAMEWORK_ROS_OTHER = ros_other }; + enum { OS_OSX = osx }; + enum { OS_FREEBSD = freebsd }; + enum { OS_WINXP = winxp }; + enum { OS_WINDOWS7 = windows7 }; + enum { OS_ARCH = arch }; + enum { OS_DEBIAN = debian }; + enum { OS_FEDORA = fedora }; + enum { OS_GENTOO = gentoo }; + enum { OS_PRECISE = precise }; + enum { OS_QUANTAL = quantal }; + enum { OS_RARING = raring }; + enum { OS_SAUCY = saucy }; + enum { OS_HONEYCOMB = honeycomb }; + enum { OS_ICE_CREAM_SANDWICH = ice_cream_sandwich }; + enum { OS_JELLYBEAN = jellybean }; + enum { OS_KITKAT = kitkat }; + enum { OS_CHROME = chrome }; + enum { OS_FIREFOX = firefox }; + enum { OS_INTERNET_EXPLORER = internet_explorer }; + enum { OS_SAFARI = safari }; + enum { OS_OPERA = opera }; + enum { TAG_SERVICE = concert_service }; + enum { TAG_RAPP = rocon_app }; + enum { TAG_GAZEBO_ROBOT_TYPE = concert_gazebo }; + enum { TAG_SOFTWARE = software_farm }; + + Strings() + { + } + + 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 "rocon_std_msgs/Strings"; }; + const char * getMD5(){ return "58fa1e54e6c0338b3faebae82a13e892"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsPair.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsPair.h new file mode 100644 index 0000000000000000000000000000000000000000..1a8071601845057823ea959a48f1fb8e50210551 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsPair.h @@ -0,0 +1,50 @@ +#ifndef _ROS_rocon_std_msgs_StringsPair_h +#define _ROS_rocon_std_msgs_StringsPair_h + +#include +#include +#include +#include "ros/msg.h" +#include "rocon_std_msgs/StringsPairRequest.h" +#include "rocon_std_msgs/StringsPairResponse.h" + +namespace rocon_std_msgs +{ + + class StringsPair : public ros::Msg + { + public: + typedef rocon_std_msgs::StringsPairRequest _pair_request_type; + _pair_request_type pair_request; + typedef rocon_std_msgs::StringsPairResponse _pair_response_type; + _pair_response_type pair_response; + + StringsPair(): + pair_request(), + pair_response() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->pair_request.serialize(outbuffer + offset); + offset += this->pair_response.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->pair_request.deserialize(inbuffer + offset); + offset += this->pair_response.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "rocon_std_msgs/StringsPair"; }; + const char * getMD5(){ return "d41c9071bd514be249c417a13ec83e65"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsPairRequest.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsPairRequest.h new file mode 100644 index 0000000000000000000000000000000000000000..ba892510b0fbda1c011ddd6f9b12b6319d590f6b --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsPairRequest.h @@ -0,0 +1,50 @@ +#ifndef _ROS_rocon_std_msgs_StringsPairRequest_h +#define _ROS_rocon_std_msgs_StringsPairRequest_h + +#include +#include +#include +#include "ros/msg.h" +#include "uuid_msgs/UniqueID.h" +#include "rocon_std_msgs/StringsRequest.h" + +namespace rocon_std_msgs +{ + + class StringsPairRequest : public ros::Msg + { + public: + typedef uuid_msgs::UniqueID _id_type; + _id_type id; + typedef rocon_std_msgs::StringsRequest _request_type; + _request_type request; + + StringsPairRequest(): + id(), + request() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->id.serialize(outbuffer + offset); + offset += this->request.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->id.deserialize(inbuffer + offset); + offset += this->request.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "rocon_std_msgs/StringsPairRequest"; }; + const char * getMD5(){ return "71ec95e384ce52aa32491f3b69a62027"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsPairResponse.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsPairResponse.h new file mode 100644 index 0000000000000000000000000000000000000000..65e29cd1f446d0014ec2d65af22b01e8a4eb89d9 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsPairResponse.h @@ -0,0 +1,50 @@ +#ifndef _ROS_rocon_std_msgs_StringsPairResponse_h +#define _ROS_rocon_std_msgs_StringsPairResponse_h + +#include +#include +#include +#include "ros/msg.h" +#include "uuid_msgs/UniqueID.h" +#include "rocon_std_msgs/StringsResponse.h" + +namespace rocon_std_msgs +{ + + class StringsPairResponse : public ros::Msg + { + public: + typedef uuid_msgs::UniqueID _id_type; + _id_type id; + typedef rocon_std_msgs::StringsResponse _response_type; + _response_type response; + + StringsPairResponse(): + id(), + response() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->id.serialize(outbuffer + offset); + offset += this->response.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->id.deserialize(inbuffer + offset); + offset += this->response.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "rocon_std_msgs/StringsPairResponse"; }; + const char * getMD5(){ return "7b20492548347a7692aa8c5680af8d1b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsRequest.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsRequest.h new file mode 100644 index 0000000000000000000000000000000000000000..ce30bde171dc96fe5b9c46383ff4ef5eee17a5c8 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsRequest.h @@ -0,0 +1,55 @@ +#ifndef _ROS_rocon_std_msgs_StringsRequest_h +#define _ROS_rocon_std_msgs_StringsRequest_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class StringsRequest : public ros::Msg + { + public: + typedef const char* _data_type; + _data_type data; + + StringsRequest(): + data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_data = strlen(this->data); + varToArr(outbuffer + offset, length_data); + offset += 4; + memcpy(outbuffer + offset, this->data, length_data); + offset += length_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_data; + arrToVar(length_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data-1]=0; + this->data = (char *)(inbuffer + offset-1); + offset += length_data; + return offset; + } + + const char * getType(){ return "rocon_std_msgs/StringsRequest"; }; + const char * getMD5(){ return "992ce8a1687cec8c8bd883ec73ca41d1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsResponse.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsResponse.h new file mode 100644 index 0000000000000000000000000000000000000000..31a9bec25e0ce55de55fa1e5081890e85aa511b4 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsResponse.h @@ -0,0 +1,55 @@ +#ifndef _ROS_rocon_std_msgs_StringsResponse_h +#define _ROS_rocon_std_msgs_StringsResponse_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class StringsResponse : public ros::Msg + { + public: + typedef const char* _data_type; + _data_type data; + + StringsResponse(): + data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_data = strlen(this->data); + varToArr(outbuffer + offset, length_data); + offset += 4; + memcpy(outbuffer + offset, this->data, length_data); + offset += length_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_data; + arrToVar(length_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data-1]=0; + this->data = (char *)(inbuffer + offset-1); + offset += length_data; + return offset; + } + + const char * getType(){ return "rocon_std_msgs/StringsResponse"; }; + const char * getMD5(){ return "992ce8a1687cec8c8bd883ec73ca41d1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros.h new file mode 100644 index 0000000000000000000000000000000000000000..a81550b73005795f7d244d16991c0ecbdce1a4ed --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros.h @@ -0,0 +1,52 @@ +/* + * 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_H_ +#define _ROS_H_ + +#ifndef BUILD_LIBROSSERIALEMBEDDEDLINUX +#include "embedded_linux_comms.c" +#include "duration.cpp" +#include "time.cpp" +#endif + +#include "ros/node_handle.h" +#include "embedded_linux_hardware.h" + +namespace ros +{ +typedef NodeHandle_ NodeHandle; +} + +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/duration.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/duration.h new file mode 100644 index 0000000000000000000000000000000000000000..5ec6d9003024b5e0077bebb1f61d80933f34862d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/duration.h @@ -0,0 +1,75 @@ +/* + * 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_DURATION_H_ +#define _ROS_DURATION_H_ + +#include +#include + +namespace ros +{ + +void normalizeSecNSecSigned(int32_t& sec, int32_t& nsec); + +class Duration +{ +public: + int32_t sec, nsec; + + Duration() : sec(0), nsec(0) {} + Duration(int32_t _sec, int32_t _nsec) : sec(_sec), nsec(_nsec) + { + normalizeSecNSecSigned(sec, nsec); + } + + double toSec() const + { + return (double)sec + 1e-9 * (double)nsec; + }; + void fromSec(double t) + { + sec = (uint32_t) floor(t); + nsec = (uint32_t) round((t - sec) * 1e9); + }; + + Duration& operator+=(const Duration &rhs); + Duration& operator-=(const Duration &rhs); + Duration& operator*=(double scale); +}; + +} + +#endif + diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/msg.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/msg.h new file mode 100644 index 0000000000000000000000000000000000000000..aea0f6f0b506518ca9d2cffb94af57b84104e9a1 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/msg.h @@ -0,0 +1,148 @@ +/* + * 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_MSG_H_ +#define _ROS_MSG_H_ + +#include +#include + +namespace ros +{ + +/* Base Message Type */ +class Msg +{ +public: + virtual int serialize(unsigned char *outbuffer) const = 0; + virtual int deserialize(unsigned char *data) = 0; + virtual const char * getType() = 0; + virtual const char * getMD5() = 0; + + /** + * @brief This tricky function handles promoting a 32bit float to a 64bit + * double, so that AVR can publish messages containing float64 + * fields, despite AVV having no native support for double. + * + * @param[out] outbuffer pointer for buffer to serialize to. + * @param[in] f value to serialize. + * + * @return number of bytes to advance the buffer pointer. + * + */ + static int serializeAvrFloat64(unsigned char* outbuffer, const float f) + { + const int32_t* val = (int32_t*) &f; + int32_t exp = ((*val >> 23) & 255); + if (exp != 0) + { + exp += 1023 - 127; + } + + int32_t sig = *val; + *(outbuffer++) = 0; + *(outbuffer++) = 0; + *(outbuffer++) = 0; + *(outbuffer++) = (sig << 5) & 0xff; + *(outbuffer++) = (sig >> 3) & 0xff; + *(outbuffer++) = (sig >> 11) & 0xff; + *(outbuffer++) = ((exp << 4) & 0xF0) | ((sig >> 19) & 0x0F); + *(outbuffer++) = (exp >> 4) & 0x7F; + + // Mark negative bit as necessary. + if (f < 0) + { + *(outbuffer - 1) |= 0x80; + } + + return 8; + } + + /** + * @brief This tricky function handles demoting a 64bit double to a + * 32bit float, so that AVR can understand messages containing + * float64 fields, despite AVR having no native support for double. + * + * @param[in] inbuffer pointer for buffer to deserialize from. + * @param[out] f pointer to place the deserialized value in. + * + * @return number of bytes to advance the buffer pointer. + */ + static int deserializeAvrFloat64(const unsigned char* inbuffer, float* f) + { + uint32_t* val = (uint32_t*)f; + inbuffer += 3; + + // Copy truncated mantissa. + *val = ((uint32_t)(*(inbuffer++)) >> 5 & 0x07); + *val |= ((uint32_t)(*(inbuffer++)) & 0xff) << 3; + *val |= ((uint32_t)(*(inbuffer++)) & 0xff) << 11; + *val |= ((uint32_t)(*inbuffer) & 0x0f) << 19; + + // Copy truncated exponent. + uint32_t exp = ((uint32_t)(*(inbuffer++)) & 0xf0) >> 4; + exp |= ((uint32_t)(*inbuffer) & 0x7f) << 4; + if (exp != 0) + { + *val |= ((exp) - 1023 + 127) << 23; + } + + // Copy negative sign. + *val |= ((uint32_t)(*(inbuffer++)) & 0x80) << 24; + + return 8; + } + + // Copy data from variable into a byte array + template + static void varToArr(A arr, const V var) + { + for (size_t i = 0; i < sizeof(V); i++) + arr[i] = (var >> (8 * i)); + } + + // Copy data from a byte array into variable + template + static void arrToVar(V& var, const A arr) + { + var = 0; + for (size_t i = 0; i < sizeof(V); i++) + var |= (arr[i] << (8 * i)); + } + +}; + +} // namespace ros + +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/node_handle.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/node_handle.h new file mode 100644 index 0000000000000000000000000000000000000000..9321ed75d4e5f1e93858812ba22e5b000c8dbdb6 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/node_handle.h @@ -0,0 +1,668 @@ +/* + * 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_NODE_HANDLE_H_ +#define ROS_NODE_HANDLE_H_ + +#include + +#include "../std_msgs/Time.h" +#include "../rosserial_msgs/TopicInfo.h" +#include "../rosserial_msgs/Log.h" +#include "../rosserial_msgs/RequestParam.h" + +#include "../ros/msg.h" + +namespace ros +{ + +class NodeHandleBase_ +{ +public: + virtual int publish(int id, const Msg* msg) = 0; + virtual int spinOnce() = 0; + virtual bool connected() = 0; +}; +} + +#include "../ros/publisher.h" +#include "../ros/subscriber.h" +#include "../ros/service_server.h" +#include "../ros/service_client.h" + +namespace ros +{ + +const int SPIN_OK = 0; +const int SPIN_ERR = -1; +const int SPIN_TIMEOUT = -2; + +const uint8_t SYNC_SECONDS = 5; +const uint8_t MODE_FIRST_FF = 0; +/* + * The second sync byte is a protocol version. It's value is 0xff for the first + * version of the rosserial protocol (used up to hydro), 0xfe for the second version + * (introduced in hydro), 0xfd for the next, and so on. Its purpose is to enable + * detection of mismatched protocol versions (e.g. hydro rosserial_python with groovy + * rosserial_arduino. It must be changed in both this file and in + * rosserial_python/src/rosserial_python/SerialClient.py + */ +const uint8_t MODE_PROTOCOL_VER = 1; +const uint8_t PROTOCOL_VER1 = 0xff; // through groovy +const uint8_t PROTOCOL_VER2 = 0xfe; // in hydro +const uint8_t PROTOCOL_VER = PROTOCOL_VER2; +const uint8_t MODE_SIZE_L = 2; +const uint8_t MODE_SIZE_H = 3; +const uint8_t MODE_SIZE_CHECKSUM = 4; // checksum for msg size received from size L and H +const uint8_t MODE_TOPIC_L = 5; // waiting for topic id +const uint8_t MODE_TOPIC_H = 6; +const uint8_t MODE_MESSAGE = 7; +const uint8_t MODE_MSG_CHECKSUM = 8; // checksum for msg and topic id + + +const uint8_t SERIAL_MSG_TIMEOUT = 20; // 20 milliseconds to recieve all of message data + +using rosserial_msgs::TopicInfo; + +/* Node Handle */ +template +class NodeHandle_ : public NodeHandleBase_ +{ +protected: + Hardware hardware_; + + /* time used for syncing */ + uint32_t rt_time; + + /* used for computing current time */ + uint32_t sec_offset, nsec_offset; + + /* Spinonce maximum work timeout */ + uint32_t spin_timeout_; + + uint8_t message_in[INPUT_SIZE]; + uint8_t message_out[OUTPUT_SIZE]; + + Publisher * publishers[MAX_PUBLISHERS]; + Subscriber_ * subscribers[MAX_SUBSCRIBERS]; + + /* + * Setup Functions + */ +public: + NodeHandle_() : configured_(false) + { + + for (unsigned int i = 0; i < MAX_PUBLISHERS; i++) + publishers[i] = 0; + + for (unsigned int i = 0; i < MAX_SUBSCRIBERS; i++) + subscribers[i] = 0; + + for (unsigned int i = 0; i < INPUT_SIZE; i++) + message_in[i] = 0; + + for (unsigned int i = 0; i < OUTPUT_SIZE; i++) + message_out[i] = 0; + + req_param_resp.ints_length = 0; + req_param_resp.ints = NULL; + req_param_resp.floats_length = 0; + req_param_resp.floats = NULL; + req_param_resp.ints_length = 0; + req_param_resp.ints = NULL; + + spin_timeout_ = 0; + } + + Hardware* getHardware() + { + return &hardware_; + } + + /* Start serial, initialize buffers */ + void initNode() + { + hardware_.init(); + mode_ = 0; + bytes_ = 0; + index_ = 0; + topic_ = 0; + }; + + /* Start a named port, which may be network server IP, initialize buffers */ + void initNode(char *portName) + { + hardware_.init(portName); + mode_ = 0; + bytes_ = 0; + index_ = 0; + topic_ = 0; + }; + + /** + * @brief Sets the maximum time in millisconds that spinOnce() can work. + * This will not effect the processing of the buffer, as spinOnce processes + * one byte at a time. It simply sets the maximum time that one call can + * process for. You can choose to clear the buffer if that is beneficial if + * SPIN_TIMEOUT is returned from spinOnce(). + * @param timeout The timeout in milliseconds that spinOnce will function. + */ + void setSpinTimeout(const uint32_t& timeout) + { + spin_timeout_ = timeout; + } + +protected: + //State machine variables for spinOnce + int mode_; + int bytes_; + int topic_; + int index_; + int checksum_; + + bool configured_; + + /* used for syncing the time */ + uint32_t last_sync_time; + uint32_t last_sync_receive_time; + uint32_t last_msg_timeout_time; + +public: + /* This function goes in your loop() function, it handles + * serial input and callbacks for subscribers. + */ + + + virtual int spinOnce() + { + /* restart if timed out */ + uint32_t c_time = hardware_.time(); + if ((c_time - last_sync_receive_time) > (SYNC_SECONDS * 2200)) + { + configured_ = false; + } + + /* reset if message has timed out */ + if (mode_ != MODE_FIRST_FF) + { + if (c_time > last_msg_timeout_time) + { + mode_ = MODE_FIRST_FF; + } + } + + /* while available buffer, read data */ + while (true) + { + // If a timeout has been specified, check how long spinOnce has been running. + if (spin_timeout_ > 0) + { + // If the maximum processing timeout has been exceeded, exit with error. + // The next spinOnce can continue where it left off, or optionally + // based on the application in use, the hardware buffer could be flushed + // and start fresh. + if ((hardware_.time() - c_time) > spin_timeout_) + { + // Exit the spin, processing timeout exceeded. + return SPIN_TIMEOUT; + } + } + int data = hardware_.read(); + if (data < 0) + break; + checksum_ += data; + if (mode_ == MODE_MESSAGE) /* message data being recieved */ + { + message_in[index_++] = data; + bytes_--; + if (bytes_ == 0) /* is message complete? if so, checksum */ + mode_ = MODE_MSG_CHECKSUM; + } + else if (mode_ == MODE_FIRST_FF) + { + if (data == 0xff) + { + mode_++; + last_msg_timeout_time = c_time + SERIAL_MSG_TIMEOUT; + } + else if (hardware_.time() - c_time > (SYNC_SECONDS * 1000)) + { + /* We have been stuck in spinOnce too long, return error */ + configured_ = false; + return SPIN_TIMEOUT; + } + } + else if (mode_ == MODE_PROTOCOL_VER) + { + if (data == PROTOCOL_VER) + { + mode_++; + } + else + { + mode_ = MODE_FIRST_FF; + if (configured_ == false) + requestSyncTime(); /* send a msg back showing our protocol version */ + } + } + else if (mode_ == MODE_SIZE_L) /* bottom half of message size */ + { + bytes_ = data; + index_ = 0; + mode_++; + checksum_ = data; /* first byte for calculating size checksum */ + } + else if (mode_ == MODE_SIZE_H) /* top half of message size */ + { + bytes_ += data << 8; + mode_++; + } + else if (mode_ == MODE_SIZE_CHECKSUM) + { + if ((checksum_ % 256) == 255) + mode_++; + else + mode_ = MODE_FIRST_FF; /* Abandon the frame if the msg len is wrong */ + } + else if (mode_ == MODE_TOPIC_L) /* bottom half of topic id */ + { + topic_ = data; + mode_++; + checksum_ = data; /* first byte included in checksum */ + } + else if (mode_ == MODE_TOPIC_H) /* top half of topic id */ + { + topic_ += data << 8; + mode_ = MODE_MESSAGE; + if (bytes_ == 0) + mode_ = MODE_MSG_CHECKSUM; + } + else if (mode_ == MODE_MSG_CHECKSUM) /* do checksum */ + { + mode_ = MODE_FIRST_FF; + if ((checksum_ % 256) == 255) + { + if (topic_ == TopicInfo::ID_PUBLISHER) + { + requestSyncTime(); + negotiateTopics(); + last_sync_time = c_time; + last_sync_receive_time = c_time; + return SPIN_ERR; + } + else if (topic_ == TopicInfo::ID_TIME) + { + syncTime(message_in); + } + else if (topic_ == TopicInfo::ID_PARAMETER_REQUEST) + { + req_param_resp.deserialize(message_in); + param_recieved = true; + } + else if (topic_ == TopicInfo::ID_TX_STOP) + { + configured_ = false; + } + else + { + if (subscribers[topic_ - 100]) + subscribers[topic_ - 100]->callback(message_in); + } + } + } + } + + /* occasionally sync time */ + if (configured_ && ((c_time - last_sync_time) > (SYNC_SECONDS * 500))) + { + requestSyncTime(); + last_sync_time = c_time; + } + + return SPIN_OK; + } + + + /* Are we connected to the PC? */ + virtual bool connected() + { + return configured_; + }; + + /******************************************************************** + * Time functions + */ + + void requestSyncTime() + { + std_msgs::Time t; + publish(TopicInfo::ID_TIME, &t); + rt_time = hardware_.time(); + } + + void syncTime(uint8_t * data) + { + std_msgs::Time t; + uint32_t offset = hardware_.time() - rt_time; + + t.deserialize(data); + t.data.sec += offset / 1000; + t.data.nsec += (offset % 1000) * 1000000UL; + + this->setNow(t.data); + last_sync_receive_time = hardware_.time(); + } + + Time now() + { + uint32_t ms = hardware_.time(); + Time current_time; + current_time.sec = ms / 1000 + sec_offset; + current_time.nsec = (ms % 1000) * 1000000UL + nsec_offset; + normalizeSecNSec(current_time.sec, current_time.nsec); + return current_time; + } + + void setNow(Time & new_now) + { + uint32_t ms = hardware_.time(); + sec_offset = new_now.sec - ms / 1000 - 1; + nsec_offset = new_now.nsec - (ms % 1000) * 1000000UL + 1000000000UL; + normalizeSecNSec(sec_offset, nsec_offset); + } + + /******************************************************************** + * Topic Management + */ + + /* Register a new publisher */ + bool advertise(Publisher & p) + { + for (int i = 0; i < MAX_PUBLISHERS; i++) + { + if (publishers[i] == 0) // empty slot + { + publishers[i] = &p; + p.id_ = i + 100 + MAX_SUBSCRIBERS; + p.nh_ = this; + return true; + } + } + return false; + } + + /* Register a new subscriber */ + template + bool subscribe(SubscriberT& s) + { + for (int i = 0; i < MAX_SUBSCRIBERS; i++) + { + if (subscribers[i] == 0) // empty slot + { + subscribers[i] = static_cast(&s); + s.id_ = i + 100; + return true; + } + } + return false; + } + + /* Register a new Service Server */ + template + bool advertiseService(ServiceServer& srv) + { + bool v = advertise(srv.pub); + for (int i = 0; i < MAX_SUBSCRIBERS; i++) + { + if (subscribers[i] == 0) // empty slot + { + subscribers[i] = static_cast(&srv); + srv.id_ = i + 100; + return v; + } + } + return false; + } + + /* Register a new Service Client */ + template + bool serviceClient(ServiceClient& srv) + { + bool v = advertise(srv.pub); + for (int i = 0; i < MAX_SUBSCRIBERS; i++) + { + if (subscribers[i] == 0) // empty slot + { + subscribers[i] = static_cast(&srv); + srv.id_ = i + 100; + return v; + } + } + return false; + } + + void negotiateTopics() + { + rosserial_msgs::TopicInfo ti; + int i; + for (i = 0; i < MAX_PUBLISHERS; i++) + { + if (publishers[i] != 0) // non-empty slot + { + ti.topic_id = publishers[i]->id_; + ti.topic_name = (char *) publishers[i]->topic_; + ti.message_type = (char *) publishers[i]->msg_->getType(); + ti.md5sum = (char *) publishers[i]->msg_->getMD5(); + ti.buffer_size = OUTPUT_SIZE; + publish(publishers[i]->getEndpointType(), &ti); + } + } + for (i = 0; i < MAX_SUBSCRIBERS; i++) + { + if (subscribers[i] != 0) // non-empty slot + { + ti.topic_id = subscribers[i]->id_; + ti.topic_name = (char *) subscribers[i]->topic_; + ti.message_type = (char *) subscribers[i]->getMsgType(); + ti.md5sum = (char *) subscribers[i]->getMsgMD5(); + ti.buffer_size = INPUT_SIZE; + publish(subscribers[i]->getEndpointType(), &ti); + } + } + configured_ = true; + } + + virtual int publish(int id, const Msg * msg) + { + if (id >= 100 && !configured_) + return 0; + + /* serialize message */ + int l = msg->serialize(message_out + 7); + + /* setup the header */ + message_out[0] = 0xff; + message_out[1] = PROTOCOL_VER; + message_out[2] = (uint8_t)((uint16_t)l & 255); + message_out[3] = (uint8_t)((uint16_t)l >> 8); + message_out[4] = 255 - ((message_out[2] + message_out[3]) % 256); + message_out[5] = (uint8_t)((int16_t)id & 255); + message_out[6] = (uint8_t)((int16_t)id >> 8); + + /* calculate checksum */ + int chk = 0; + for (int i = 5; i < l + 7; i++) + chk += message_out[i]; + l += 7; + message_out[l++] = 255 - (chk % 256); + + if (l <= OUTPUT_SIZE) + { + hardware_.write(message_out, l); + return l; + } + else + { + logerror("Message from device dropped: message larger than buffer."); + return -1; + } + } + + /******************************************************************** + * Logging + */ + +private: + void log(char byte, const char * msg) + { + rosserial_msgs::Log l; + l.level = byte; + l.msg = (char*)msg; + publish(rosserial_msgs::TopicInfo::ID_LOG, &l); + } + +public: + void logdebug(const char* msg) + { + log(rosserial_msgs::Log::ROSDEBUG, msg); + } + void loginfo(const char * msg) + { + log(rosserial_msgs::Log::INFO, msg); + } + void logwarn(const char *msg) + { + log(rosserial_msgs::Log::WARN, msg); + } + void logerror(const char*msg) + { + log(rosserial_msgs::Log::ERROR, msg); + } + void logfatal(const char*msg) + { + log(rosserial_msgs::Log::FATAL, msg); + } + + /******************************************************************** + * Parameters + */ + +private: + bool param_recieved; + rosserial_msgs::RequestParamResponse req_param_resp; + + bool requestParam(const char * name, int time_out = 1000) + { + param_recieved = false; + rosserial_msgs::RequestParamRequest req; + req.name = (char*)name; + publish(TopicInfo::ID_PARAMETER_REQUEST, &req); + uint32_t end_time = hardware_.time() + time_out; + while (!param_recieved) + { + spinOnce(); + if (hardware_.time() > end_time) + { + logwarn("Failed to get param: timeout expired"); + return false; + } + } + return true; + } + +public: + bool getParam(const char* name, int* param, int length = 1, int timeout = 1000) + { + if (requestParam(name, timeout)) + { + if (length == req_param_resp.ints_length) + { + //copy it over + for (int i = 0; i < length; i++) + param[i] = req_param_resp.ints[i]; + return true; + } + else + { + logwarn("Failed to get param: length mismatch"); + } + } + return false; + } + bool getParam(const char* name, float* param, int length = 1, int timeout = 1000) + { + if (requestParam(name, timeout)) + { + if (length == req_param_resp.floats_length) + { + //copy it over + for (int i = 0; i < length; i++) + param[i] = req_param_resp.floats[i]; + return true; + } + else + { + logwarn("Failed to get param: length mismatch"); + } + } + return false; + } + bool getParam(const char* name, char** param, int length = 1, int timeout = 1000) + { + if (requestParam(name, timeout)) + { + if (length == req_param_resp.strings_length) + { + //copy it over + for (int i = 0; i < length; i++) + strcpy(param[i], req_param_resp.strings[i]); + return true; + } + else + { + logwarn("Failed to get param: length mismatch"); + } + } + return false; + } +}; + +} + +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/publisher.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/publisher.h new file mode 100644 index 0000000000000000000000000000000000000000..86dde386fcad40bd691803279e9e8cf8ef5a3986 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/publisher.h @@ -0,0 +1,74 @@ +/* + * 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_PUBLISHER_H_ +#define _ROS_PUBLISHER_H_ + +#include "../rosserial_msgs/TopicInfo.h" +#include "../ros/node_handle.h" + +namespace ros +{ + +/* Generic Publisher */ +class Publisher +{ +public: + Publisher(const char * topic_name, Msg * msg, int endpoint = rosserial_msgs::TopicInfo::ID_PUBLISHER) : + topic_(topic_name), + msg_(msg), + endpoint_(endpoint) {}; + + int publish(const Msg * msg) + { + return nh_->publish(id_, msg); + }; + int getEndpointType() + { + return endpoint_; + } + + const char * topic_; + Msg *msg_; + // id_ and no_ are set by NodeHandle when we advertise + int id_; + NodeHandleBase_* nh_; + +private: + int endpoint_; +}; + +} + +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/service_client.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/service_client.h new file mode 100644 index 0000000000000000000000000000000000000000..d0629a462e24af2687c03cab925d5e23cf04b68f --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/service_client.h @@ -0,0 +1,95 @@ +/* + * 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_SERVICE_CLIENT_H_ +#define _ROS_SERVICE_CLIENT_H_ + +#include "../rosserial_msgs/TopicInfo.h" + +#include "../ros/publisher.h" +#include "../ros/subscriber.h" + +namespace ros +{ + +template +class ServiceClient : public Subscriber_ +{ +public: + ServiceClient(const char* topic_name) : + pub(topic_name, &req, rosserial_msgs::TopicInfo::ID_SERVICE_CLIENT + rosserial_msgs::TopicInfo::ID_PUBLISHER) + { + this->topic_ = topic_name; + this->waiting = true; + } + + virtual void call(const MReq & request, MRes & response) + { + if (!pub.nh_->connected()) return; + ret = &response; + waiting = true; + pub.publish(&request); + while (waiting && pub.nh_->connected()) + if (pub.nh_->spinOnce() < 0) break; + } + + // these refer to the subscriber + virtual void callback(unsigned char *data) + { + ret->deserialize(data); + waiting = false; + } + virtual const char * getMsgType() + { + return this->resp.getType(); + } + virtual const char * getMsgMD5() + { + return this->resp.getMD5(); + } + virtual int getEndpointType() + { + return rosserial_msgs::TopicInfo::ID_SERVICE_CLIENT + rosserial_msgs::TopicInfo::ID_SUBSCRIBER; + } + + MReq req; + MRes resp; + MRes * ret; + bool waiting; + Publisher pub; +}; + +} + +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/service_server.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/service_server.h new file mode 100644 index 0000000000000000000000000000000000000000..1b95a9e863abc65e73c191d6a6ee3f890a3e9d0b --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/service_server.h @@ -0,0 +1,130 @@ +/* + * 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_SERVICE_SERVER_H_ +#define _ROS_SERVICE_SERVER_H_ + +#include "../rosserial_msgs/TopicInfo.h" + +#include "../ros/publisher.h" +#include "../ros/subscriber.h" + +namespace ros +{ + +template +class ServiceServer : public Subscriber_ +{ +public: + typedef void(ObjT::*CallbackT)(const MReq&, MRes&); + + ServiceServer(const char* topic_name, CallbackT cb, ObjT* obj) : + pub(topic_name, &resp, rosserial_msgs::TopicInfo::ID_SERVICE_SERVER + rosserial_msgs::TopicInfo::ID_PUBLISHER), + obj_(obj) + { + this->topic_ = topic_name; + this->cb_ = cb; + } + + // these refer to the subscriber + virtual void callback(unsigned char *data) + { + req.deserialize(data); + (obj_->*cb_)(req, resp); + pub.publish(&resp); + } + virtual const char * getMsgType() + { + return this->req.getType(); + } + virtual const char * getMsgMD5() + { + return this->req.getMD5(); + } + virtual int getEndpointType() + { + return rosserial_msgs::TopicInfo::ID_SERVICE_SERVER + rosserial_msgs::TopicInfo::ID_SUBSCRIBER; + } + + MReq req; + MRes resp; + Publisher pub; +private: + CallbackT cb_; + ObjT* obj_; +}; + +template +class ServiceServer : public Subscriber_ +{ +public: + typedef void(*CallbackT)(const MReq&, MRes&); + + ServiceServer(const char* topic_name, CallbackT cb) : + pub(topic_name, &resp, rosserial_msgs::TopicInfo::ID_SERVICE_SERVER + rosserial_msgs::TopicInfo::ID_PUBLISHER) + { + this->topic_ = topic_name; + this->cb_ = cb; + } + + // these refer to the subscriber + virtual void callback(unsigned char *data) + { + req.deserialize(data); + cb_(req, resp); + pub.publish(&resp); + } + virtual const char * getMsgType() + { + return this->req.getType(); + } + virtual const char * getMsgMD5() + { + return this->req.getMD5(); + } + virtual int getEndpointType() + { + return rosserial_msgs::TopicInfo::ID_SERVICE_SERVER + rosserial_msgs::TopicInfo::ID_SUBSCRIBER; + } + + MReq req; + MRes resp; + Publisher pub; +private: + CallbackT cb_; +}; + +} + +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/subscriber.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/subscriber.h new file mode 100644 index 0000000000000000000000000000000000000000..0f7364afbf9f864d0920dcd4b72c6ecab4583d4f --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/subscriber.h @@ -0,0 +1,140 @@ +/* + * 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_SUBSCRIBER_H_ +#define ROS_SUBSCRIBER_H_ + +#include "../rosserial_msgs/TopicInfo.h" + +namespace ros +{ + +/* Base class for objects subscribers. */ +class Subscriber_ +{ +public: + virtual void callback(unsigned char *data) = 0; + virtual int getEndpointType() = 0; + + // id_ is set by NodeHandle when we advertise + int id_; + + virtual const char * getMsgType() = 0; + virtual const char * getMsgMD5() = 0; + const char * topic_; +}; + +/* Bound function subscriber. */ +template +class Subscriber: public Subscriber_ +{ +public: + typedef void(ObjT::*CallbackT)(const MsgT&); + MsgT msg; + + Subscriber(const char * topic_name, CallbackT cb, ObjT* obj, int endpoint = rosserial_msgs::TopicInfo::ID_SUBSCRIBER) : + cb_(cb), + obj_(obj), + endpoint_(endpoint) + { + topic_ = topic_name; + }; + + virtual void callback(unsigned char* data) + { + msg.deserialize(data); + (obj_->*cb_)(msg); + } + + virtual const char * getMsgType() + { + return this->msg.getType(); + } + virtual const char * getMsgMD5() + { + return this->msg.getMD5(); + } + virtual int getEndpointType() + { + return endpoint_; + } + +private: + CallbackT cb_; + ObjT* obj_; + int endpoint_; +}; + +/* Standalone function subscriber. */ +template +class Subscriber: public Subscriber_ +{ +public: + typedef void(*CallbackT)(const MsgT&); + MsgT msg; + + Subscriber(const char * topic_name, CallbackT cb, int endpoint = rosserial_msgs::TopicInfo::ID_SUBSCRIBER) : + cb_(cb), + endpoint_(endpoint) + { + topic_ = topic_name; + }; + + virtual void callback(unsigned char* data) + { + msg.deserialize(data); + this->cb_(msg); + } + + virtual const char * getMsgType() + { + return this->msg.getType(); + } + virtual const char * getMsgMD5() + { + return this->msg.getMD5(); + } + virtual int getEndpointType() + { + return endpoint_; + } + +private: + CallbackT cb_; + int endpoint_; +}; + +} + +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/time.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/time.h new file mode 100644 index 0000000000000000000000000000000000000000..72657cb357e7511a124a397a9c6a24bfee61f9d1 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/ros/time.h @@ -0,0 +1,82 @@ +/* + * 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_TIME_H_ +#define ROS_TIME_H_ + +#include "duration.h" +#include +#include + +namespace ros +{ +void normalizeSecNSec(uint32_t &sec, uint32_t &nsec); + +class Time +{ +public: + uint32_t sec, nsec; + + Time() : sec(0), nsec(0) {} + Time(uint32_t _sec, uint32_t _nsec) : sec(_sec), nsec(_nsec) + { + normalizeSecNSec(sec, nsec); + } + + double toSec() const + { + return (double)sec + 1e-9 * (double)nsec; + }; + void fromSec(double t) + { + sec = (uint32_t) floor(t); + nsec = (uint32_t) round((t - sec) * 1e9); + }; + + uint32_t toNsec() + { + return (uint32_t)sec * 1000000000ull + (uint32_t)nsec; + }; + Time& fromNSec(int32_t t); + + Time& operator +=(const Duration &rhs); + Time& operator -=(const Duration &rhs); + + static Time now(); + static void setNow(Time & new_now); +}; + +} + +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/roscpp/Empty.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/roscpp/Empty.h new file mode 100644 index 0000000000000000000000000000000000000000..df021b79188f55ba4e5a3bbf468ad0d2f0c7605f --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/roscpp/Empty.h @@ -0,0 +1,70 @@ +#ifndef _ROS_SERVICE_Empty_h +#define _ROS_SERVICE_Empty_h +#include +#include +#include +#include "ros/msg.h" + +namespace roscpp +{ + +static const char EMPTY[] = "roscpp/Empty"; + + class EmptyRequest : public ros::Msg + { + public: + + EmptyRequest() + { + } + + 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 EMPTY; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class EmptyResponse : public ros::Msg + { + public: + + EmptyResponse() + { + } + + 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 EMPTY; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class Empty { + public: + typedef EmptyRequest Request; + typedef EmptyResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/roscpp/GetLoggers.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/roscpp/GetLoggers.h new file mode 100644 index 0000000000000000000000000000000000000000..35f67fbc4a8447280e69c6560841888e868d738e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/roscpp/GetLoggers.h @@ -0,0 +1,96 @@ +#ifndef _ROS_SERVICE_GetLoggers_h +#define _ROS_SERVICE_GetLoggers_h +#include +#include +#include +#include "ros/msg.h" +#include "roscpp/Logger.h" + +namespace roscpp +{ + +static const char GETLOGGERS[] = "roscpp/GetLoggers"; + + class GetLoggersRequest : public ros::Msg + { + public: + + GetLoggersRequest() + { + } + + 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 GETLOGGERS; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetLoggersResponse : public ros::Msg + { + public: + uint32_t loggers_length; + typedef roscpp::Logger _loggers_type; + _loggers_type st_loggers; + _loggers_type * loggers; + + GetLoggersResponse(): + loggers_length(0), loggers(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->loggers_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->loggers_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->loggers_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->loggers_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->loggers_length); + for( uint32_t i = 0; i < loggers_length; i++){ + offset += this->loggers[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t loggers_lengthT = ((uint32_t) (*(inbuffer + offset))); + loggers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + loggers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + loggers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->loggers_length); + if(loggers_lengthT > loggers_length) + this->loggers = (roscpp::Logger*)realloc(this->loggers, loggers_lengthT * sizeof(roscpp::Logger)); + loggers_length = loggers_lengthT; + for( uint32_t i = 0; i < loggers_length; i++){ + offset += this->st_loggers.deserialize(inbuffer + offset); + memcpy( &(this->loggers[i]), &(this->st_loggers), sizeof(roscpp::Logger)); + } + return offset; + } + + const char * getType(){ return GETLOGGERS; }; + const char * getMD5(){ return "32e97e85527d4678a8f9279894bb64b0"; }; + + }; + + class GetLoggers { + public: + typedef GetLoggersRequest Request; + typedef GetLoggersResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/roscpp/Logger.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/roscpp/Logger.h new file mode 100644 index 0000000000000000000000000000000000000000..b954b7160dc01fd98c96757a7090910e8dc578b6 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/roscpp/Logger.h @@ -0,0 +1,72 @@ +#ifndef _ROS_roscpp_Logger_h +#define _ROS_roscpp_Logger_h + +#include +#include +#include +#include "ros/msg.h" + +namespace roscpp +{ + + class Logger : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _level_type; + _level_type level; + + Logger(): + name(""), + level("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_level = strlen(this->level); + varToArr(outbuffer + offset, length_level); + offset += 4; + memcpy(outbuffer + offset, this->level, length_level); + offset += length_level; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_level; + arrToVar(length_level, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_level; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_level-1]=0; + this->level = (char *)(inbuffer + offset-1); + offset += length_level; + return offset; + } + + const char * getType(){ return "roscpp/Logger"; }; + const char * getMD5(){ return "a6069a2ff40db7bd32143dd66e1f408e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/roscpp/SetLoggerLevel.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/roscpp/SetLoggerLevel.h new file mode 100644 index 0000000000000000000000000000000000000000..64f2a24b39a0c9ec1fd675db08fa64401395fe77 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/roscpp/SetLoggerLevel.h @@ -0,0 +1,104 @@ +#ifndef _ROS_SERVICE_SetLoggerLevel_h +#define _ROS_SERVICE_SetLoggerLevel_h +#include +#include +#include +#include "ros/msg.h" + +namespace roscpp +{ + +static const char SETLOGGERLEVEL[] = "roscpp/SetLoggerLevel"; + + class SetLoggerLevelRequest : public ros::Msg + { + public: + typedef const char* _logger_type; + _logger_type logger; + typedef const char* _level_type; + _level_type level; + + SetLoggerLevelRequest(): + logger(""), + level("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_logger = strlen(this->logger); + varToArr(outbuffer + offset, length_logger); + offset += 4; + memcpy(outbuffer + offset, this->logger, length_logger); + offset += length_logger; + uint32_t length_level = strlen(this->level); + varToArr(outbuffer + offset, length_level); + offset += 4; + memcpy(outbuffer + offset, this->level, length_level); + offset += length_level; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_logger; + arrToVar(length_logger, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_logger; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_logger-1]=0; + this->logger = (char *)(inbuffer + offset-1); + offset += length_logger; + uint32_t length_level; + arrToVar(length_level, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_level; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_level-1]=0; + this->level = (char *)(inbuffer + offset-1); + offset += length_level; + return offset; + } + + const char * getType(){ return SETLOGGERLEVEL; }; + const char * getMD5(){ return "51da076440d78ca1684d36c868df61ea"; }; + + }; + + class SetLoggerLevelResponse : public ros::Msg + { + public: + + SetLoggerLevelResponse() + { + } + + 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 SETLOGGERLEVEL; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class SetLoggerLevel { + public: + typedef SetLoggerLevelRequest Request; + typedef SetLoggerLevelResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/roscpp_tutorials/TwoInts.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/roscpp_tutorials/TwoInts.h new file mode 100644 index 0000000000000000000000000000000000000000..03510bb864554e7e9682522d3ac7f046171fd5d4 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/roscpp_tutorials/TwoInts.h @@ -0,0 +1,166 @@ +#ifndef _ROS_SERVICE_TwoInts_h +#define _ROS_SERVICE_TwoInts_h +#include +#include +#include +#include "ros/msg.h" + +namespace roscpp_tutorials +{ + +static const char TWOINTS[] = "roscpp_tutorials/TwoInts"; + + class TwoIntsRequest : public ros::Msg + { + public: + typedef int64_t _a_type; + _a_type a; + typedef int64_t _b_type; + _b_type b; + + TwoIntsRequest(): + 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 TWOINTS; }; + const char * getMD5(){ return "36d09b846be0b371c5f190354dd3153e"; }; + + }; + + class TwoIntsResponse : public ros::Msg + { + public: + typedef int64_t _sum_type; + _sum_type sum; + + TwoIntsResponse(): + 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 TWOINTS; }; + const char * getMD5(){ return "b88405221c77b1878a3cbbfff53428d7"; }; + + }; + + class TwoInts { + public: + typedef TwoIntsRequest Request; + typedef TwoIntsResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosgraph_msgs/Clock.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosgraph_msgs/Clock.h new file mode 100644 index 0000000000000000000000000000000000000000..4d8736ce012dd58632c5f345f83b9de45dd2958e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosgraph_msgs/Clock.h @@ -0,0 +1,62 @@ +#ifndef _ROS_rosgraph_msgs_Clock_h +#define _ROS_rosgraph_msgs_Clock_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" + +namespace rosgraph_msgs +{ + + class Clock : public ros::Msg + { + public: + typedef ros::Time _clock_type; + _clock_type clock; + + Clock(): + clock() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->clock.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->clock.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->clock.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->clock.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->clock.sec); + *(outbuffer + offset + 0) = (this->clock.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->clock.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->clock.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->clock.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->clock.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->clock.sec = ((uint32_t) (*(inbuffer + offset))); + this->clock.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->clock.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->clock.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->clock.sec); + this->clock.nsec = ((uint32_t) (*(inbuffer + offset))); + this->clock.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->clock.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->clock.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->clock.nsec); + return offset; + } + + const char * getType(){ return "rosgraph_msgs/Clock"; }; + const char * getMD5(){ return "a9c97c1d230cfc112e270351a944ee47"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosgraph_msgs/Log.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosgraph_msgs/Log.h new file mode 100644 index 0000000000000000000000000000000000000000..45c45669743c22a1283c3099ea16e0387a3dd4c6 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosgraph_msgs/Log.h @@ -0,0 +1,185 @@ +#ifndef _ROS_rosgraph_msgs_Log_h +#define _ROS_rosgraph_msgs_Log_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace rosgraph_msgs +{ + + class Log : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef int8_t _level_type; + _level_type level; + typedef const char* _name_type; + _name_type name; + typedef const char* _msg_type; + _msg_type msg; + typedef const char* _file_type; + _file_type file; + typedef const char* _function_type; + _function_type function; + typedef uint32_t _line_type; + _line_type line; + uint32_t topics_length; + typedef char* _topics_type; + _topics_type st_topics; + _topics_type * topics; + enum { DEBUG = 1 }; + enum { INFO = 2 }; + enum { WARN = 4 }; + enum { ERROR = 8 }; + enum { FATAL = 16 }; + + Log(): + header(), + level(0), + name(""), + msg(""), + file(""), + function(""), + line(0), + topics_length(0), topics(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + int8_t real; + uint8_t base; + } u_level; + u_level.real = this->level; + *(outbuffer + offset + 0) = (u_level.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->level); + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_msg = strlen(this->msg); + varToArr(outbuffer + offset, length_msg); + offset += 4; + memcpy(outbuffer + offset, this->msg, length_msg); + offset += length_msg; + uint32_t length_file = strlen(this->file); + varToArr(outbuffer + offset, length_file); + offset += 4; + memcpy(outbuffer + offset, this->file, length_file); + offset += length_file; + uint32_t length_function = strlen(this->function); + varToArr(outbuffer + offset, length_function); + offset += 4; + memcpy(outbuffer + offset, this->function, length_function); + offset += length_function; + *(outbuffer + offset + 0) = (this->line >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->line >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->line >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->line >> (8 * 3)) & 0xFF; + offset += sizeof(this->line); + *(outbuffer + offset + 0) = (this->topics_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->topics_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->topics_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->topics_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->topics_length); + for( uint32_t i = 0; i < topics_length; i++){ + uint32_t length_topicsi = strlen(this->topics[i]); + varToArr(outbuffer + offset, length_topicsi); + offset += 4; + memcpy(outbuffer + offset, this->topics[i], length_topicsi); + offset += length_topicsi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + int8_t real; + uint8_t base; + } u_level; + u_level.base = 0; + u_level.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->level = u_level.real; + offset += sizeof(this->level); + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_msg; + arrToVar(length_msg, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_msg; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_msg-1]=0; + this->msg = (char *)(inbuffer + offset-1); + offset += length_msg; + uint32_t length_file; + arrToVar(length_file, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_file; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_file-1]=0; + this->file = (char *)(inbuffer + offset-1); + offset += length_file; + uint32_t length_function; + arrToVar(length_function, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_function; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_function-1]=0; + this->function = (char *)(inbuffer + offset-1); + offset += length_function; + this->line = ((uint32_t) (*(inbuffer + offset))); + this->line |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->line |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->line |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->line); + uint32_t topics_lengthT = ((uint32_t) (*(inbuffer + offset))); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->topics_length); + if(topics_lengthT > topics_length) + this->topics = (char**)realloc(this->topics, topics_lengthT * sizeof(char*)); + topics_length = topics_lengthT; + for( uint32_t i = 0; i < topics_length; i++){ + uint32_t length_st_topics; + arrToVar(length_st_topics, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_topics; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_topics-1]=0; + this->st_topics = (char *)(inbuffer + offset-1); + offset += length_st_topics; + memcpy( &(this->topics[i]), &(this->st_topics), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return "rosgraph_msgs/Log"; }; + const char * getMD5(){ return "acffd30cd6b6de30f120938c17c593fb"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosgraph_msgs/TopicStatistics.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosgraph_msgs/TopicStatistics.h new file mode 100644 index 0000000000000000000000000000000000000000..c62f2f901e82215291a8f3885de2cb996a7b27aa --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosgraph_msgs/TopicStatistics.h @@ -0,0 +1,347 @@ +#ifndef _ROS_rosgraph_msgs_TopicStatistics_h +#define _ROS_rosgraph_msgs_TopicStatistics_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" +#include "ros/duration.h" + +namespace rosgraph_msgs +{ + + class TopicStatistics : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + typedef const char* _node_pub_type; + _node_pub_type node_pub; + typedef const char* _node_sub_type; + _node_sub_type node_sub; + typedef ros::Time _window_start_type; + _window_start_type window_start; + typedef ros::Time _window_stop_type; + _window_stop_type window_stop; + typedef int32_t _delivered_msgs_type; + _delivered_msgs_type delivered_msgs; + typedef int32_t _dropped_msgs_type; + _dropped_msgs_type dropped_msgs; + typedef int32_t _traffic_type; + _traffic_type traffic; + typedef ros::Duration _period_mean_type; + _period_mean_type period_mean; + typedef ros::Duration _period_stddev_type; + _period_stddev_type period_stddev; + typedef ros::Duration _period_max_type; + _period_max_type period_max; + typedef ros::Duration _stamp_age_mean_type; + _stamp_age_mean_type stamp_age_mean; + typedef ros::Duration _stamp_age_stddev_type; + _stamp_age_stddev_type stamp_age_stddev; + typedef ros::Duration _stamp_age_max_type; + _stamp_age_max_type stamp_age_max; + + TopicStatistics(): + topic(""), + node_pub(""), + node_sub(""), + window_start(), + window_stop(), + delivered_msgs(0), + dropped_msgs(0), + traffic(0), + period_mean(), + period_stddev(), + period_max(), + stamp_age_mean(), + stamp_age_stddev(), + stamp_age_max() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + uint32_t length_node_pub = strlen(this->node_pub); + varToArr(outbuffer + offset, length_node_pub); + offset += 4; + memcpy(outbuffer + offset, this->node_pub, length_node_pub); + offset += length_node_pub; + uint32_t length_node_sub = strlen(this->node_sub); + varToArr(outbuffer + offset, length_node_sub); + offset += 4; + memcpy(outbuffer + offset, this->node_sub, length_node_sub); + offset += length_node_sub; + *(outbuffer + offset + 0) = (this->window_start.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->window_start.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->window_start.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->window_start.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->window_start.sec); + *(outbuffer + offset + 0) = (this->window_start.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->window_start.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->window_start.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->window_start.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->window_start.nsec); + *(outbuffer + offset + 0) = (this->window_stop.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->window_stop.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->window_stop.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->window_stop.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->window_stop.sec); + *(outbuffer + offset + 0) = (this->window_stop.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->window_stop.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->window_stop.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->window_stop.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->window_stop.nsec); + union { + int32_t real; + uint32_t base; + } u_delivered_msgs; + u_delivered_msgs.real = this->delivered_msgs; + *(outbuffer + offset + 0) = (u_delivered_msgs.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_delivered_msgs.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_delivered_msgs.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_delivered_msgs.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->delivered_msgs); + union { + int32_t real; + uint32_t base; + } u_dropped_msgs; + u_dropped_msgs.real = this->dropped_msgs; + *(outbuffer + offset + 0) = (u_dropped_msgs.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_dropped_msgs.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_dropped_msgs.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_dropped_msgs.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->dropped_msgs); + union { + int32_t real; + uint32_t base; + } u_traffic; + u_traffic.real = this->traffic; + *(outbuffer + offset + 0) = (u_traffic.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_traffic.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_traffic.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_traffic.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->traffic); + *(outbuffer + offset + 0) = (this->period_mean.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->period_mean.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->period_mean.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->period_mean.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->period_mean.sec); + *(outbuffer + offset + 0) = (this->period_mean.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->period_mean.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->period_mean.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->period_mean.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->period_mean.nsec); + *(outbuffer + offset + 0) = (this->period_stddev.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->period_stddev.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->period_stddev.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->period_stddev.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->period_stddev.sec); + *(outbuffer + offset + 0) = (this->period_stddev.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->period_stddev.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->period_stddev.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->period_stddev.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->period_stddev.nsec); + *(outbuffer + offset + 0) = (this->period_max.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->period_max.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->period_max.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->period_max.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->period_max.sec); + *(outbuffer + offset + 0) = (this->period_max.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->period_max.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->period_max.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->period_max.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->period_max.nsec); + *(outbuffer + offset + 0) = (this->stamp_age_mean.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp_age_mean.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp_age_mean.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp_age_mean.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp_age_mean.sec); + *(outbuffer + offset + 0) = (this->stamp_age_mean.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp_age_mean.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp_age_mean.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp_age_mean.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp_age_mean.nsec); + *(outbuffer + offset + 0) = (this->stamp_age_stddev.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp_age_stddev.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp_age_stddev.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp_age_stddev.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp_age_stddev.sec); + *(outbuffer + offset + 0) = (this->stamp_age_stddev.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp_age_stddev.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp_age_stddev.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp_age_stddev.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp_age_stddev.nsec); + *(outbuffer + offset + 0) = (this->stamp_age_max.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp_age_max.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp_age_max.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp_age_max.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp_age_max.sec); + *(outbuffer + offset + 0) = (this->stamp_age_max.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp_age_max.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp_age_max.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp_age_max.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp_age_max.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + uint32_t length_node_pub; + arrToVar(length_node_pub, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_node_pub; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_node_pub-1]=0; + this->node_pub = (char *)(inbuffer + offset-1); + offset += length_node_pub; + uint32_t length_node_sub; + arrToVar(length_node_sub, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_node_sub; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_node_sub-1]=0; + this->node_sub = (char *)(inbuffer + offset-1); + offset += length_node_sub; + this->window_start.sec = ((uint32_t) (*(inbuffer + offset))); + this->window_start.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->window_start.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->window_start.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->window_start.sec); + this->window_start.nsec = ((uint32_t) (*(inbuffer + offset))); + this->window_start.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->window_start.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->window_start.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->window_start.nsec); + this->window_stop.sec = ((uint32_t) (*(inbuffer + offset))); + this->window_stop.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->window_stop.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->window_stop.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->window_stop.sec); + this->window_stop.nsec = ((uint32_t) (*(inbuffer + offset))); + this->window_stop.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->window_stop.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->window_stop.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->window_stop.nsec); + union { + int32_t real; + uint32_t base; + } u_delivered_msgs; + u_delivered_msgs.base = 0; + u_delivered_msgs.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_delivered_msgs.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_delivered_msgs.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_delivered_msgs.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->delivered_msgs = u_delivered_msgs.real; + offset += sizeof(this->delivered_msgs); + union { + int32_t real; + uint32_t base; + } u_dropped_msgs; + u_dropped_msgs.base = 0; + u_dropped_msgs.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_dropped_msgs.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_dropped_msgs.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_dropped_msgs.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->dropped_msgs = u_dropped_msgs.real; + offset += sizeof(this->dropped_msgs); + union { + int32_t real; + uint32_t base; + } u_traffic; + u_traffic.base = 0; + u_traffic.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_traffic.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_traffic.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_traffic.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->traffic = u_traffic.real; + offset += sizeof(this->traffic); + this->period_mean.sec = ((uint32_t) (*(inbuffer + offset))); + this->period_mean.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->period_mean.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->period_mean.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->period_mean.sec); + this->period_mean.nsec = ((uint32_t) (*(inbuffer + offset))); + this->period_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->period_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->period_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->period_mean.nsec); + this->period_stddev.sec = ((uint32_t) (*(inbuffer + offset))); + this->period_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->period_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->period_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->period_stddev.sec); + this->period_stddev.nsec = ((uint32_t) (*(inbuffer + offset))); + this->period_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->period_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->period_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->period_stddev.nsec); + this->period_max.sec = ((uint32_t) (*(inbuffer + offset))); + this->period_max.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->period_max.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->period_max.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->period_max.sec); + this->period_max.nsec = ((uint32_t) (*(inbuffer + offset))); + this->period_max.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->period_max.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->period_max.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->period_max.nsec); + this->stamp_age_mean.sec = ((uint32_t) (*(inbuffer + offset))); + this->stamp_age_mean.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp_age_mean.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp_age_mean.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp_age_mean.sec); + this->stamp_age_mean.nsec = ((uint32_t) (*(inbuffer + offset))); + this->stamp_age_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp_age_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp_age_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp_age_mean.nsec); + this->stamp_age_stddev.sec = ((uint32_t) (*(inbuffer + offset))); + this->stamp_age_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp_age_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp_age_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp_age_stddev.sec); + this->stamp_age_stddev.nsec = ((uint32_t) (*(inbuffer + offset))); + this->stamp_age_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp_age_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp_age_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp_age_stddev.nsec); + this->stamp_age_max.sec = ((uint32_t) (*(inbuffer + offset))); + this->stamp_age_max.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp_age_max.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp_age_max.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp_age_max.sec); + this->stamp_age_max.nsec = ((uint32_t) (*(inbuffer + offset))); + this->stamp_age_max.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp_age_max.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp_age_max.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp_age_max.nsec); + return offset; + } + + const char * getType(){ return "rosgraph_msgs/TopicStatistics"; }; + const char * getMD5(){ return "10152ed868c5097a5e2e4a89d7daa710"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rospy_tutorials/AddTwoInts.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rospy_tutorials/AddTwoInts.h new file mode 100644 index 0000000000000000000000000000000000000000..04dec98e8a895f29413a923b7f906c41ad5e66fa --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rospy_tutorials/AddTwoInts.h @@ -0,0 +1,166 @@ +#ifndef _ROS_SERVICE_AddTwoInts_h +#define _ROS_SERVICE_AddTwoInts_h +#include +#include +#include +#include "ros/msg.h" + +namespace rospy_tutorials +{ + +static const char ADDTWOINTS[] = "rospy_tutorials/AddTwoInts"; + + class AddTwoIntsRequest : public ros::Msg + { + public: + typedef int64_t _a_type; + _a_type a; + typedef int64_t _b_type; + _b_type b; + + AddTwoIntsRequest(): + 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 ADDTWOINTS; }; + const char * getMD5(){ return "36d09b846be0b371c5f190354dd3153e"; }; + + }; + + class AddTwoIntsResponse : public ros::Msg + { + public: + typedef int64_t _sum_type; + _sum_type sum; + + AddTwoIntsResponse(): + 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 ADDTWOINTS; }; + const char * getMD5(){ return "b88405221c77b1878a3cbbfff53428d7"; }; + + }; + + class AddTwoInts { + public: + typedef AddTwoIntsRequest Request; + typedef AddTwoIntsResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rospy_tutorials/BadTwoInts.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rospy_tutorials/BadTwoInts.h new file mode 100644 index 0000000000000000000000000000000000000000..0218f5495c586af59f4e2c28f315e255f2451f20 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rospy_tutorials/BadTwoInts.h @@ -0,0 +1,150 @@ +#ifndef _ROS_SERVICE_BadTwoInts_h +#define _ROS_SERVICE_BadTwoInts_h +#include +#include +#include +#include "ros/msg.h" + +namespace rospy_tutorials +{ + +static const char BADTWOINTS[] = "rospy_tutorials/BadTwoInts"; + + class BadTwoIntsRequest : public ros::Msg + { + public: + typedef int64_t _a_type; + _a_type a; + typedef int32_t _b_type; + _b_type b; + + BadTwoIntsRequest(): + 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 { + int32_t real; + uint32_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; + 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 { + int32_t real; + uint32_t base; + } u_b; + u_b.base = 0; + u_b.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_b.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_b.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_b.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->b = u_b.real; + offset += sizeof(this->b); + return offset; + } + + const char * getType(){ return BADTWOINTS; }; + const char * getMD5(){ return "29bb5c7dea8bf822f53e94b0ee5a3a56"; }; + + }; + + class BadTwoIntsResponse : public ros::Msg + { + public: + typedef int32_t _sum_type; + _sum_type sum; + + BadTwoIntsResponse(): + sum(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int32_t real; + uint32_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; + offset += sizeof(this->sum); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int32_t real; + uint32_t base; + } u_sum; + u_sum.base = 0; + u_sum.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_sum.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_sum.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_sum.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->sum = u_sum.real; + offset += sizeof(this->sum); + return offset; + } + + const char * getType(){ return BADTWOINTS; }; + const char * getMD5(){ return "0ba699c25c9418c0366f3595c0c8e8ec"; }; + + }; + + class BadTwoInts { + public: + typedef BadTwoIntsRequest Request; + typedef BadTwoIntsResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rospy_tutorials/Floats.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rospy_tutorials/Floats.h new file mode 100644 index 0000000000000000000000000000000000000000..c0d284cbcac9b8273fc6ee332a9c4a41d716ad77 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rospy_tutorials/Floats.h @@ -0,0 +1,82 @@ +#ifndef _ROS_rospy_tutorials_Floats_h +#define _ROS_rospy_tutorials_Floats_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rospy_tutorials +{ + + class Floats : public ros::Msg + { + public: + uint32_t data_length; + typedef float _data_type; + _data_type st_data; + _data_type * data; + + Floats(): + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + float real; + uint32_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_datai.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_datai.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_datai.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (float*)realloc(this->data, data_lengthT * sizeof(float)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + float real; + uint32_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(float)); + } + return offset; + } + + const char * getType(){ return "rospy_tutorials/Floats"; }; + const char * getMD5(){ return "420cd38b6b071cd49f2970c3e2cee511"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rospy_tutorials/HeaderString.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rospy_tutorials/HeaderString.h new file mode 100644 index 0000000000000000000000000000000000000000..9fac4ef37291651ef6bb05c4b1f07cd77f9a5825 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rospy_tutorials/HeaderString.h @@ -0,0 +1,61 @@ +#ifndef _ROS_rospy_tutorials_HeaderString_h +#define _ROS_rospy_tutorials_HeaderString_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace rospy_tutorials +{ + + class HeaderString : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _data_type; + _data_type data; + + HeaderString(): + header(), + data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_data = strlen(this->data); + varToArr(outbuffer + offset, length_data); + offset += 4; + memcpy(outbuffer + offset, this->data, length_data); + offset += length_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_data; + arrToVar(length_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data-1]=0; + this->data = (char *)(inbuffer + offset-1); + offset += length_data; + return offset; + } + + const char * getType(){ return "rospy_tutorials/HeaderString"; }; + const char * getMD5(){ return "c99a9440709e4d4a9716d55b8270d5e7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_arduino/Adc.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_arduino/Adc.h new file mode 100644 index 0000000000000000000000000000000000000000..ac48677904be7de9b5f1eca577b9f3252fa45b6d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_arduino/Adc.h @@ -0,0 +1,92 @@ +#ifndef _ROS_rosserial_arduino_Adc_h +#define _ROS_rosserial_arduino_Adc_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rosserial_arduino +{ + + class Adc : public ros::Msg + { + public: + typedef uint16_t _adc0_type; + _adc0_type adc0; + typedef uint16_t _adc1_type; + _adc1_type adc1; + typedef uint16_t _adc2_type; + _adc2_type adc2; + typedef uint16_t _adc3_type; + _adc3_type adc3; + typedef uint16_t _adc4_type; + _adc4_type adc4; + typedef uint16_t _adc5_type; + _adc5_type adc5; + + Adc(): + adc0(0), + adc1(0), + adc2(0), + adc3(0), + adc4(0), + adc5(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->adc0 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc0 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc0); + *(outbuffer + offset + 0) = (this->adc1 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc1 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc1); + *(outbuffer + offset + 0) = (this->adc2 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc2 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc2); + *(outbuffer + offset + 0) = (this->adc3 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc3 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc3); + *(outbuffer + offset + 0) = (this->adc4 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc4 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc4); + *(outbuffer + offset + 0) = (this->adc5 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc5 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc5); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->adc0 = ((uint16_t) (*(inbuffer + offset))); + this->adc0 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc0); + this->adc1 = ((uint16_t) (*(inbuffer + offset))); + this->adc1 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc1); + this->adc2 = ((uint16_t) (*(inbuffer + offset))); + this->adc2 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc2); + this->adc3 = ((uint16_t) (*(inbuffer + offset))); + this->adc3 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc3); + this->adc4 = ((uint16_t) (*(inbuffer + offset))); + this->adc4 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc4); + this->adc5 = ((uint16_t) (*(inbuffer + offset))); + this->adc5 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc5); + return offset; + } + + const char * getType(){ return "rosserial_arduino/Adc"; }; + const char * getMD5(){ return "6d7853a614e2e821319068311f2af25b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_arduino/Test.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_arduino/Test.h new file mode 100644 index 0000000000000000000000000000000000000000..cd806db905309e7ab4aaba03279d8b625ab84514 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_arduino/Test.h @@ -0,0 +1,104 @@ +#ifndef _ROS_SERVICE_Test_h +#define _ROS_SERVICE_Test_h +#include +#include +#include +#include "ros/msg.h" + +namespace rosserial_arduino +{ + +static const char TEST[] = "rosserial_arduino/Test"; + + class TestRequest : public ros::Msg + { + public: + typedef const char* _input_type; + _input_type input; + + TestRequest(): + input("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_input = strlen(this->input); + varToArr(outbuffer + offset, length_input); + offset += 4; + memcpy(outbuffer + offset, this->input, length_input); + offset += length_input; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_input; + arrToVar(length_input, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_input; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_input-1]=0; + this->input = (char *)(inbuffer + offset-1); + offset += length_input; + return offset; + } + + const char * getType(){ return TEST; }; + const char * getMD5(){ return "39e92f1778057359c64c7b8a7d7b19de"; }; + + }; + + class TestResponse : public ros::Msg + { + public: + typedef const char* _output_type; + _output_type output; + + TestResponse(): + output("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_output = strlen(this->output); + varToArr(outbuffer + offset, length_output); + offset += 4; + memcpy(outbuffer + offset, this->output, length_output); + offset += length_output; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_output; + arrToVar(length_output, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_output; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_output-1]=0; + this->output = (char *)(inbuffer + offset-1); + offset += length_output; + return offset; + } + + const char * getType(){ return TEST; }; + const char * getMD5(){ return "0825d95fdfa2c8f4bbb4e9c74bccd3fd"; }; + + }; + + class Test { + public: + typedef TestRequest Request; + typedef TestResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_mbed/Adc.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_mbed/Adc.h new file mode 100644 index 0000000000000000000000000000000000000000..0de6480b705aba28fbb63d1043e77956188642d1 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_mbed/Adc.h @@ -0,0 +1,92 @@ +#ifndef _ROS_rosserial_mbed_Adc_h +#define _ROS_rosserial_mbed_Adc_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rosserial_mbed +{ + + class Adc : public ros::Msg + { + public: + typedef uint16_t _adc0_type; + _adc0_type adc0; + typedef uint16_t _adc1_type; + _adc1_type adc1; + typedef uint16_t _adc2_type; + _adc2_type adc2; + typedef uint16_t _adc3_type; + _adc3_type adc3; + typedef uint16_t _adc4_type; + _adc4_type adc4; + typedef uint16_t _adc5_type; + _adc5_type adc5; + + Adc(): + adc0(0), + adc1(0), + adc2(0), + adc3(0), + adc4(0), + adc5(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->adc0 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc0 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc0); + *(outbuffer + offset + 0) = (this->adc1 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc1 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc1); + *(outbuffer + offset + 0) = (this->adc2 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc2 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc2); + *(outbuffer + offset + 0) = (this->adc3 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc3 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc3); + *(outbuffer + offset + 0) = (this->adc4 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc4 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc4); + *(outbuffer + offset + 0) = (this->adc5 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc5 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc5); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->adc0 = ((uint16_t) (*(inbuffer + offset))); + this->adc0 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc0); + this->adc1 = ((uint16_t) (*(inbuffer + offset))); + this->adc1 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc1); + this->adc2 = ((uint16_t) (*(inbuffer + offset))); + this->adc2 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc2); + this->adc3 = ((uint16_t) (*(inbuffer + offset))); + this->adc3 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc3); + this->adc4 = ((uint16_t) (*(inbuffer + offset))); + this->adc4 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc4); + this->adc5 = ((uint16_t) (*(inbuffer + offset))); + this->adc5 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc5); + return offset; + } + + const char * getType(){ return "rosserial_mbed/Adc"; }; + const char * getMD5(){ return "6d7853a614e2e821319068311f2af25b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_mbed/Test.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_mbed/Test.h new file mode 100644 index 0000000000000000000000000000000000000000..6a2658fad5970c71bfe524bf281e9de27c96fcb3 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_mbed/Test.h @@ -0,0 +1,104 @@ +#ifndef _ROS_SERVICE_Test_h +#define _ROS_SERVICE_Test_h +#include +#include +#include +#include "ros/msg.h" + +namespace rosserial_mbed +{ + +static const char TEST[] = "rosserial_mbed/Test"; + + class TestRequest : public ros::Msg + { + public: + typedef const char* _input_type; + _input_type input; + + TestRequest(): + input("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_input = strlen(this->input); + varToArr(outbuffer + offset, length_input); + offset += 4; + memcpy(outbuffer + offset, this->input, length_input); + offset += length_input; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_input; + arrToVar(length_input, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_input; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_input-1]=0; + this->input = (char *)(inbuffer + offset-1); + offset += length_input; + return offset; + } + + const char * getType(){ return TEST; }; + const char * getMD5(){ return "39e92f1778057359c64c7b8a7d7b19de"; }; + + }; + + class TestResponse : public ros::Msg + { + public: + typedef const char* _output_type; + _output_type output; + + TestResponse(): + output("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_output = strlen(this->output); + varToArr(outbuffer + offset, length_output); + offset += 4; + memcpy(outbuffer + offset, this->output, length_output); + offset += length_output; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_output; + arrToVar(length_output, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_output; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_output-1]=0; + this->output = (char *)(inbuffer + offset-1); + offset += length_output; + return offset; + } + + const char * getType(){ return TEST; }; + const char * getMD5(){ return "0825d95fdfa2c8f4bbb4e9c74bccd3fd"; }; + + }; + + class Test { + public: + typedef TestRequest Request; + typedef TestResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_msgs/Log.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_msgs/Log.h new file mode 100644 index 0000000000000000000000000000000000000000..a162ca8e5e1cfa559c69fe29dc61a2b62a58b813 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_msgs/Log.h @@ -0,0 +1,67 @@ +#ifndef _ROS_rosserial_msgs_Log_h +#define _ROS_rosserial_msgs_Log_h + +#include +#include +#include +#include "../ros/msg.h" + +namespace rosserial_msgs +{ + + class Log : public ros::Msg + { + public: + typedef uint8_t _level_type; + _level_type level; + typedef const char* _msg_type; + _msg_type msg; + enum { ROSDEBUG = 0 }; + enum { INFO = 1 }; + enum { WARN = 2 }; + enum { ERROR = 3 }; + enum { FATAL = 4 }; + + Log(): + level(0), + msg("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->level >> (8 * 0)) & 0xFF; + offset += sizeof(this->level); + uint32_t length_msg = strlen(this->msg); + varToArr(outbuffer + offset, length_msg); + offset += 4; + memcpy(outbuffer + offset, this->msg, length_msg); + offset += length_msg; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->level = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->level); + uint32_t length_msg; + arrToVar(length_msg, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_msg; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_msg-1]=0; + this->msg = (char *)(inbuffer + offset-1); + offset += length_msg; + return offset; + } + + const char * getType(){ return "rosserial_msgs/Log"; }; + const char * getMD5(){ return "11abd731c25933261cd6183bd12d6295"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_msgs/RequestMessageInfo.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_msgs/RequestMessageInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..3466ddc463df63b573ca65efdaf125b5d40429ec --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_msgs/RequestMessageInfo.h @@ -0,0 +1,121 @@ +#ifndef _ROS_SERVICE_RequestMessageInfo_h +#define _ROS_SERVICE_RequestMessageInfo_h +#include +#include +#include +#include "ros/msg.h" + +namespace rosserial_msgs +{ + +static const char REQUESTMESSAGEINFO[] = "rosserial_msgs/RequestMessageInfo"; + + class RequestMessageInfoRequest : public ros::Msg + { + public: + typedef const char* _type_type; + _type_type type; + + RequestMessageInfoRequest(): + type("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_type = strlen(this->type); + varToArr(outbuffer + offset, length_type); + offset += 4; + memcpy(outbuffer + offset, this->type, length_type); + offset += length_type; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_type; + arrToVar(length_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type-1]=0; + this->type = (char *)(inbuffer + offset-1); + offset += length_type; + return offset; + } + + const char * getType(){ return REQUESTMESSAGEINFO; }; + const char * getMD5(){ return "dc67331de85cf97091b7d45e5c64ab75"; }; + + }; + + class RequestMessageInfoResponse : public ros::Msg + { + public: + typedef const char* _md5_type; + _md5_type md5; + typedef const char* _definition_type; + _definition_type definition; + + RequestMessageInfoResponse(): + md5(""), + definition("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_md5 = strlen(this->md5); + varToArr(outbuffer + offset, length_md5); + offset += 4; + memcpy(outbuffer + offset, this->md5, length_md5); + offset += length_md5; + uint32_t length_definition = strlen(this->definition); + varToArr(outbuffer + offset, length_definition); + offset += 4; + memcpy(outbuffer + offset, this->definition, length_definition); + offset += length_definition; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_md5; + arrToVar(length_md5, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_md5; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_md5-1]=0; + this->md5 = (char *)(inbuffer + offset-1); + offset += length_md5; + uint32_t length_definition; + arrToVar(length_definition, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_definition; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_definition-1]=0; + this->definition = (char *)(inbuffer + offset-1); + offset += length_definition; + return offset; + } + + const char * getType(){ return REQUESTMESSAGEINFO; }; + const char * getMD5(){ return "fe452186a069bed40f09b8628fe5eac8"; }; + + }; + + class RequestMessageInfo { + public: + typedef RequestMessageInfoRequest Request; + typedef RequestMessageInfoResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_msgs/RequestParam.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_msgs/RequestParam.h new file mode 100644 index 0000000000000000000000000000000000000000..aaecd13d17f3d223d13e8cfe9180abbeed995712 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_msgs/RequestParam.h @@ -0,0 +1,212 @@ +#ifndef _ROS_SERVICE_RequestParam_h +#define _ROS_SERVICE_RequestParam_h +#include +#include +#include +#include "../ros/msg.h" + +namespace rosserial_msgs +{ + +static const char REQUESTPARAM[] = "rosserial_msgs/RequestParam"; + + class RequestParamRequest : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + + RequestParamRequest(): + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return REQUESTPARAM; }; + const char * getMD5(){ return "c1f3d28f1b044c871e6eff2e9fc3c667"; }; + + }; + + class RequestParamResponse : public ros::Msg + { + public: + uint32_t ints_length; + typedef int32_t _ints_type; + _ints_type st_ints; + _ints_type * ints; + uint32_t floats_length; + typedef float _floats_type; + _floats_type st_floats; + _floats_type * floats; + uint32_t strings_length; + typedef char* _strings_type; + _strings_type st_strings; + _strings_type * strings; + + RequestParamResponse(): + ints_length(0), ints(NULL), + floats_length(0), floats(NULL), + strings_length(0), strings(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->ints_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->ints_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->ints_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->ints_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->ints_length); + for( uint32_t i = 0; i < ints_length; i++){ + union { + int32_t real; + uint32_t base; + } u_intsi; + u_intsi.real = this->ints[i]; + *(outbuffer + offset + 0) = (u_intsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_intsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_intsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_intsi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->ints[i]); + } + *(outbuffer + offset + 0) = (this->floats_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->floats_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->floats_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->floats_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->floats_length); + for( uint32_t i = 0; i < floats_length; i++){ + union { + float real; + uint32_t base; + } u_floatsi; + u_floatsi.real = this->floats[i]; + *(outbuffer + offset + 0) = (u_floatsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_floatsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_floatsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_floatsi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->floats[i]); + } + *(outbuffer + offset + 0) = (this->strings_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->strings_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->strings_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->strings_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->strings_length); + for( uint32_t i = 0; i < strings_length; i++){ + uint32_t length_stringsi = strlen(this->strings[i]); + varToArr(outbuffer + offset, length_stringsi); + offset += 4; + memcpy(outbuffer + offset, this->strings[i], length_stringsi); + offset += length_stringsi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t ints_lengthT = ((uint32_t) (*(inbuffer + offset))); + ints_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + ints_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + ints_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->ints_length); + if(ints_lengthT > ints_length) + this->ints = (int32_t*)realloc(this->ints, ints_lengthT * sizeof(int32_t)); + ints_length = ints_lengthT; + for( uint32_t i = 0; i < ints_length; i++){ + union { + int32_t real; + uint32_t base; + } u_st_ints; + u_st_ints.base = 0; + u_st_ints.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_ints.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_ints.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_ints.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_ints = u_st_ints.real; + offset += sizeof(this->st_ints); + memcpy( &(this->ints[i]), &(this->st_ints), sizeof(int32_t)); + } + uint32_t floats_lengthT = ((uint32_t) (*(inbuffer + offset))); + floats_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + floats_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + floats_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->floats_length); + if(floats_lengthT > floats_length) + this->floats = (float*)realloc(this->floats, floats_lengthT * sizeof(float)); + floats_length = floats_lengthT; + for( uint32_t i = 0; i < floats_length; i++){ + union { + float real; + uint32_t base; + } u_st_floats; + u_st_floats.base = 0; + u_st_floats.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_floats.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_floats.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_floats.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_floats = u_st_floats.real; + offset += sizeof(this->st_floats); + memcpy( &(this->floats[i]), &(this->st_floats), sizeof(float)); + } + uint32_t strings_lengthT = ((uint32_t) (*(inbuffer + offset))); + strings_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + strings_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + strings_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->strings_length); + if(strings_lengthT > strings_length) + this->strings = (char**)realloc(this->strings, strings_lengthT * sizeof(char*)); + strings_length = strings_lengthT; + for( uint32_t i = 0; i < strings_length; i++){ + uint32_t length_st_strings; + arrToVar(length_st_strings, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_strings; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_strings-1]=0; + this->st_strings = (char *)(inbuffer + offset-1); + offset += length_st_strings; + memcpy( &(this->strings[i]), &(this->st_strings), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return REQUESTPARAM; }; + const char * getMD5(){ return "9f0e98bda65981986ddf53afa7a40e49"; }; + + }; + + class RequestParam { + public: + typedef RequestParamRequest Request; + typedef RequestParamResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_msgs/RequestServiceInfo.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_msgs/RequestServiceInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..b18cf9dbf7303c65a387a0ac622708bc054f96fc --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_msgs/RequestServiceInfo.h @@ -0,0 +1,138 @@ +#ifndef _ROS_SERVICE_RequestServiceInfo_h +#define _ROS_SERVICE_RequestServiceInfo_h +#include +#include +#include +#include "ros/msg.h" + +namespace rosserial_msgs +{ + +static const char REQUESTSERVICEINFO[] = "rosserial_msgs/RequestServiceInfo"; + + class RequestServiceInfoRequest : public ros::Msg + { + public: + typedef const char* _service_type; + _service_type service; + + RequestServiceInfoRequest(): + service("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_service = strlen(this->service); + varToArr(outbuffer + offset, length_service); + offset += 4; + memcpy(outbuffer + offset, this->service, length_service); + offset += length_service; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_service; + arrToVar(length_service, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_service; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_service-1]=0; + this->service = (char *)(inbuffer + offset-1); + offset += length_service; + return offset; + } + + const char * getType(){ return REQUESTSERVICEINFO; }; + const char * getMD5(){ return "1cbcfa13b08f6d36710b9af8741e6112"; }; + + }; + + class RequestServiceInfoResponse : public ros::Msg + { + public: + typedef const char* _service_md5_type; + _service_md5_type service_md5; + typedef const char* _request_md5_type; + _request_md5_type request_md5; + typedef const char* _response_md5_type; + _response_md5_type response_md5; + + RequestServiceInfoResponse(): + service_md5(""), + request_md5(""), + response_md5("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_service_md5 = strlen(this->service_md5); + varToArr(outbuffer + offset, length_service_md5); + offset += 4; + memcpy(outbuffer + offset, this->service_md5, length_service_md5); + offset += length_service_md5; + uint32_t length_request_md5 = strlen(this->request_md5); + varToArr(outbuffer + offset, length_request_md5); + offset += 4; + memcpy(outbuffer + offset, this->request_md5, length_request_md5); + offset += length_request_md5; + uint32_t length_response_md5 = strlen(this->response_md5); + varToArr(outbuffer + offset, length_response_md5); + offset += 4; + memcpy(outbuffer + offset, this->response_md5, length_response_md5); + offset += length_response_md5; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_service_md5; + arrToVar(length_service_md5, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_service_md5; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_service_md5-1]=0; + this->service_md5 = (char *)(inbuffer + offset-1); + offset += length_service_md5; + uint32_t length_request_md5; + arrToVar(length_request_md5, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_request_md5; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_request_md5-1]=0; + this->request_md5 = (char *)(inbuffer + offset-1); + offset += length_request_md5; + uint32_t length_response_md5; + arrToVar(length_response_md5, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_response_md5; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_response_md5-1]=0; + this->response_md5 = (char *)(inbuffer + offset-1); + offset += length_response_md5; + return offset; + } + + const char * getType(){ return REQUESTSERVICEINFO; }; + const char * getMD5(){ return "c3d6dd25b909596479fbbc6559fa6874"; }; + + }; + + class RequestServiceInfo { + public: + typedef RequestServiceInfoRequest Request; + typedef RequestServiceInfoResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_msgs/TopicInfo.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_msgs/TopicInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..987c16105223e25ff1c371cf5eb2c8f76ec6093d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/rosserial_msgs/TopicInfo.h @@ -0,0 +1,130 @@ +#ifndef _ROS_rosserial_msgs_TopicInfo_h +#define _ROS_rosserial_msgs_TopicInfo_h + +#include +#include +#include +#include "../ros/msg.h" + +namespace rosserial_msgs +{ + + class TopicInfo : public ros::Msg + { + public: + typedef uint16_t _topic_id_type; + _topic_id_type topic_id; + typedef const char* _topic_name_type; + _topic_name_type topic_name; + typedef const char* _message_type_type; + _message_type_type message_type; + typedef const char* _md5sum_type; + _md5sum_type md5sum; + typedef int32_t _buffer_size_type; + _buffer_size_type buffer_size; + enum { ID_PUBLISHER = 0 }; + enum { ID_SUBSCRIBER = 1 }; + enum { ID_SERVICE_SERVER = 2 }; + enum { ID_SERVICE_CLIENT = 4 }; + enum { ID_PARAMETER_REQUEST = 6 }; + enum { ID_LOG = 7 }; + enum { ID_TIME = 10 }; + enum { ID_TX_STOP = 11 }; + + TopicInfo(): + topic_id(0), + topic_name(""), + message_type(""), + md5sum(""), + buffer_size(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->topic_id >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->topic_id >> (8 * 1)) & 0xFF; + offset += sizeof(this->topic_id); + uint32_t length_topic_name = strlen(this->topic_name); + varToArr(outbuffer + offset, length_topic_name); + offset += 4; + memcpy(outbuffer + offset, this->topic_name, length_topic_name); + offset += length_topic_name; + uint32_t length_message_type = strlen(this->message_type); + varToArr(outbuffer + offset, length_message_type); + offset += 4; + memcpy(outbuffer + offset, this->message_type, length_message_type); + offset += length_message_type; + uint32_t length_md5sum = strlen(this->md5sum); + varToArr(outbuffer + offset, length_md5sum); + offset += 4; + memcpy(outbuffer + offset, this->md5sum, length_md5sum); + offset += length_md5sum; + union { + int32_t real; + uint32_t base; + } u_buffer_size; + u_buffer_size.real = this->buffer_size; + *(outbuffer + offset + 0) = (u_buffer_size.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_buffer_size.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_buffer_size.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_buffer_size.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->buffer_size); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->topic_id = ((uint16_t) (*(inbuffer + offset))); + this->topic_id |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->topic_id); + uint32_t length_topic_name; + arrToVar(length_topic_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic_name-1]=0; + this->topic_name = (char *)(inbuffer + offset-1); + offset += length_topic_name; + uint32_t length_message_type; + arrToVar(length_message_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message_type-1]=0; + this->message_type = (char *)(inbuffer + offset-1); + offset += length_message_type; + uint32_t length_md5sum; + arrToVar(length_md5sum, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_md5sum; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_md5sum-1]=0; + this->md5sum = (char *)(inbuffer + offset-1); + offset += length_md5sum; + union { + int32_t real; + uint32_t base; + } u_buffer_size; + u_buffer_size.base = 0; + u_buffer_size.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_buffer_size.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_buffer_size.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_buffer_size.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->buffer_size = u_buffer_size.real; + offset += sizeof(this->buffer_size); + return offset; + } + + const char * getType(){ return "rosserial_msgs/TopicInfo"; }; + const char * getMD5(){ return "0ad51f88fc44892f8c10684077646005"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/BatteryState.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/BatteryState.h new file mode 100644 index 0000000000000000000000000000000000000000..4e9cba443efd4e2644114d45c9de7a31f4e13d0d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/BatteryState.h @@ -0,0 +1,326 @@ +#ifndef _ROS_sensor_msgs_BatteryState_h +#define _ROS_sensor_msgs_BatteryState_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class BatteryState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef float _voltage_type; + _voltage_type voltage; + typedef float _current_type; + _current_type current; + typedef float _charge_type; + _charge_type charge; + typedef float _capacity_type; + _capacity_type capacity; + typedef float _design_capacity_type; + _design_capacity_type design_capacity; + typedef float _percentage_type; + _percentage_type percentage; + typedef uint8_t _power_supply_status_type; + _power_supply_status_type power_supply_status; + typedef uint8_t _power_supply_health_type; + _power_supply_health_type power_supply_health; + typedef uint8_t _power_supply_technology_type; + _power_supply_technology_type power_supply_technology; + typedef bool _present_type; + _present_type present; + uint32_t cell_voltage_length; + typedef float _cell_voltage_type; + _cell_voltage_type st_cell_voltage; + _cell_voltage_type * cell_voltage; + typedef const char* _location_type; + _location_type location; + typedef const char* _serial_number_type; + _serial_number_type serial_number; + enum { POWER_SUPPLY_STATUS_UNKNOWN = 0 }; + enum { POWER_SUPPLY_STATUS_CHARGING = 1 }; + enum { POWER_SUPPLY_STATUS_DISCHARGING = 2 }; + enum { POWER_SUPPLY_STATUS_NOT_CHARGING = 3 }; + enum { POWER_SUPPLY_STATUS_FULL = 4 }; + enum { POWER_SUPPLY_HEALTH_UNKNOWN = 0 }; + enum { POWER_SUPPLY_HEALTH_GOOD = 1 }; + enum { POWER_SUPPLY_HEALTH_OVERHEAT = 2 }; + enum { POWER_SUPPLY_HEALTH_DEAD = 3 }; + enum { POWER_SUPPLY_HEALTH_OVERVOLTAGE = 4 }; + enum { POWER_SUPPLY_HEALTH_UNSPEC_FAILURE = 5 }; + enum { POWER_SUPPLY_HEALTH_COLD = 6 }; + enum { POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE = 7 }; + enum { POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE = 8 }; + enum { POWER_SUPPLY_TECHNOLOGY_UNKNOWN = 0 }; + enum { POWER_SUPPLY_TECHNOLOGY_NIMH = 1 }; + enum { POWER_SUPPLY_TECHNOLOGY_LION = 2 }; + enum { POWER_SUPPLY_TECHNOLOGY_LIPO = 3 }; + enum { POWER_SUPPLY_TECHNOLOGY_LIFE = 4 }; + enum { POWER_SUPPLY_TECHNOLOGY_NICD = 5 }; + enum { POWER_SUPPLY_TECHNOLOGY_LIMN = 6 }; + + BatteryState(): + header(), + voltage(0), + current(0), + charge(0), + capacity(0), + design_capacity(0), + percentage(0), + power_supply_status(0), + power_supply_health(0), + power_supply_technology(0), + present(0), + cell_voltage_length(0), cell_voltage(NULL), + location(""), + serial_number("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_voltage; + u_voltage.real = this->voltage; + *(outbuffer + offset + 0) = (u_voltage.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_voltage.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_voltage.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_voltage.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->voltage); + union { + float real; + uint32_t base; + } u_current; + u_current.real = this->current; + *(outbuffer + offset + 0) = (u_current.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_current.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_current.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_current.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->current); + union { + float real; + uint32_t base; + } u_charge; + u_charge.real = this->charge; + *(outbuffer + offset + 0) = (u_charge.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_charge.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_charge.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_charge.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->charge); + union { + float real; + uint32_t base; + } u_capacity; + u_capacity.real = this->capacity; + *(outbuffer + offset + 0) = (u_capacity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_capacity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_capacity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_capacity.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->capacity); + union { + float real; + uint32_t base; + } u_design_capacity; + u_design_capacity.real = this->design_capacity; + *(outbuffer + offset + 0) = (u_design_capacity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_design_capacity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_design_capacity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_design_capacity.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->design_capacity); + union { + float real; + uint32_t base; + } u_percentage; + u_percentage.real = this->percentage; + *(outbuffer + offset + 0) = (u_percentage.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_percentage.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_percentage.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_percentage.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->percentage); + *(outbuffer + offset + 0) = (this->power_supply_status >> (8 * 0)) & 0xFF; + offset += sizeof(this->power_supply_status); + *(outbuffer + offset + 0) = (this->power_supply_health >> (8 * 0)) & 0xFF; + offset += sizeof(this->power_supply_health); + *(outbuffer + offset + 0) = (this->power_supply_technology >> (8 * 0)) & 0xFF; + offset += sizeof(this->power_supply_technology); + union { + bool real; + uint8_t base; + } u_present; + u_present.real = this->present; + *(outbuffer + offset + 0) = (u_present.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->present); + *(outbuffer + offset + 0) = (this->cell_voltage_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->cell_voltage_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->cell_voltage_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->cell_voltage_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->cell_voltage_length); + for( uint32_t i = 0; i < cell_voltage_length; i++){ + union { + float real; + uint32_t base; + } u_cell_voltagei; + u_cell_voltagei.real = this->cell_voltage[i]; + *(outbuffer + offset + 0) = (u_cell_voltagei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_cell_voltagei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_cell_voltagei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_cell_voltagei.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->cell_voltage[i]); + } + uint32_t length_location = strlen(this->location); + varToArr(outbuffer + offset, length_location); + offset += 4; + memcpy(outbuffer + offset, this->location, length_location); + offset += length_location; + uint32_t length_serial_number = strlen(this->serial_number); + varToArr(outbuffer + offset, length_serial_number); + offset += 4; + memcpy(outbuffer + offset, this->serial_number, length_serial_number); + offset += length_serial_number; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_voltage; + u_voltage.base = 0; + u_voltage.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_voltage.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_voltage.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_voltage.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->voltage = u_voltage.real; + offset += sizeof(this->voltage); + union { + float real; + uint32_t base; + } u_current; + u_current.base = 0; + u_current.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_current.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_current.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_current.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->current = u_current.real; + offset += sizeof(this->current); + union { + float real; + uint32_t base; + } u_charge; + u_charge.base = 0; + u_charge.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_charge.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_charge.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_charge.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->charge = u_charge.real; + offset += sizeof(this->charge); + union { + float real; + uint32_t base; + } u_capacity; + u_capacity.base = 0; + u_capacity.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_capacity.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_capacity.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_capacity.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->capacity = u_capacity.real; + offset += sizeof(this->capacity); + union { + float real; + uint32_t base; + } u_design_capacity; + u_design_capacity.base = 0; + u_design_capacity.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_design_capacity.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_design_capacity.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_design_capacity.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->design_capacity = u_design_capacity.real; + offset += sizeof(this->design_capacity); + union { + float real; + uint32_t base; + } u_percentage; + u_percentage.base = 0; + u_percentage.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_percentage.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_percentage.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_percentage.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->percentage = u_percentage.real; + offset += sizeof(this->percentage); + this->power_supply_status = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->power_supply_status); + this->power_supply_health = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->power_supply_health); + this->power_supply_technology = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->power_supply_technology); + union { + bool real; + uint8_t base; + } u_present; + u_present.base = 0; + u_present.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->present = u_present.real; + offset += sizeof(this->present); + uint32_t cell_voltage_lengthT = ((uint32_t) (*(inbuffer + offset))); + cell_voltage_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + cell_voltage_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + cell_voltage_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->cell_voltage_length); + if(cell_voltage_lengthT > cell_voltage_length) + this->cell_voltage = (float*)realloc(this->cell_voltage, cell_voltage_lengthT * sizeof(float)); + cell_voltage_length = cell_voltage_lengthT; + for( uint32_t i = 0; i < cell_voltage_length; i++){ + union { + float real; + uint32_t base; + } u_st_cell_voltage; + u_st_cell_voltage.base = 0; + u_st_cell_voltage.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_cell_voltage.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_cell_voltage.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_cell_voltage.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_cell_voltage = u_st_cell_voltage.real; + offset += sizeof(this->st_cell_voltage); + memcpy( &(this->cell_voltage[i]), &(this->st_cell_voltage), sizeof(float)); + } + uint32_t length_location; + arrToVar(length_location, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_location; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_location-1]=0; + this->location = (char *)(inbuffer + offset-1); + offset += length_location; + uint32_t length_serial_number; + arrToVar(length_serial_number, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_serial_number; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_serial_number-1]=0; + this->serial_number = (char *)(inbuffer + offset-1); + offset += length_serial_number; + return offset; + } + + const char * getType(){ return "sensor_msgs/BatteryState"; }; + const char * getMD5(){ return "476f837fa6771f6e16e3bf4ef96f8770"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/CameraInfo.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/CameraInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..5bd1c7d0f7009f851b0d92fa837752575de5c78d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/CameraInfo.h @@ -0,0 +1,276 @@ +#ifndef _ROS_sensor_msgs_CameraInfo_h +#define _ROS_sensor_msgs_CameraInfo_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/RegionOfInterest.h" + +namespace sensor_msgs +{ + + class CameraInfo : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef uint32_t _height_type; + _height_type height; + typedef uint32_t _width_type; + _width_type width; + typedef const char* _distortion_model_type; + _distortion_model_type distortion_model; + uint32_t D_length; + typedef double _D_type; + _D_type st_D; + _D_type * D; + double K[9]; + double R[9]; + double P[12]; + typedef uint32_t _binning_x_type; + _binning_x_type binning_x; + typedef uint32_t _binning_y_type; + _binning_y_type binning_y; + typedef sensor_msgs::RegionOfInterest _roi_type; + _roi_type roi; + + CameraInfo(): + header(), + height(0), + width(0), + distortion_model(""), + D_length(0), D(NULL), + K(), + R(), + P(), + binning_x(0), + binning_y(0), + roi() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF; + offset += sizeof(this->height); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF; + offset += sizeof(this->width); + uint32_t length_distortion_model = strlen(this->distortion_model); + varToArr(outbuffer + offset, length_distortion_model); + offset += 4; + memcpy(outbuffer + offset, this->distortion_model, length_distortion_model); + offset += length_distortion_model; + *(outbuffer + offset + 0) = (this->D_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->D_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->D_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->D_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->D_length); + for( uint32_t i = 0; i < D_length; i++){ + union { + double real; + uint64_t base; + } u_Di; + u_Di.real = this->D[i]; + *(outbuffer + offset + 0) = (u_Di.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_Di.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_Di.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_Di.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_Di.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_Di.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_Di.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_Di.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->D[i]); + } + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_Ki; + u_Ki.real = this->K[i]; + *(outbuffer + offset + 0) = (u_Ki.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_Ki.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_Ki.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_Ki.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_Ki.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_Ki.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_Ki.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_Ki.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->K[i]); + } + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_Ri; + u_Ri.real = this->R[i]; + *(outbuffer + offset + 0) = (u_Ri.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_Ri.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_Ri.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_Ri.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_Ri.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_Ri.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_Ri.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_Ri.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->R[i]); + } + for( uint32_t i = 0; i < 12; i++){ + union { + double real; + uint64_t base; + } u_Pi; + u_Pi.real = this->P[i]; + *(outbuffer + offset + 0) = (u_Pi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_Pi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_Pi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_Pi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_Pi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_Pi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_Pi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_Pi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->P[i]); + } + *(outbuffer + offset + 0) = (this->binning_x >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->binning_x >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->binning_x >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->binning_x >> (8 * 3)) & 0xFF; + offset += sizeof(this->binning_x); + *(outbuffer + offset + 0) = (this->binning_y >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->binning_y >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->binning_y >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->binning_y >> (8 * 3)) & 0xFF; + offset += sizeof(this->binning_y); + offset += this->roi.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->height = ((uint32_t) (*(inbuffer + offset))); + this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->height); + this->width = ((uint32_t) (*(inbuffer + offset))); + this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->width); + uint32_t length_distortion_model; + arrToVar(length_distortion_model, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_distortion_model; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_distortion_model-1]=0; + this->distortion_model = (char *)(inbuffer + offset-1); + offset += length_distortion_model; + uint32_t D_lengthT = ((uint32_t) (*(inbuffer + offset))); + D_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + D_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + D_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->D_length); + if(D_lengthT > D_length) + this->D = (double*)realloc(this->D, D_lengthT * sizeof(double)); + D_length = D_lengthT; + for( uint32_t i = 0; i < D_length; i++){ + union { + double real; + uint64_t base; + } u_st_D; + u_st_D.base = 0; + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_D = u_st_D.real; + offset += sizeof(this->st_D); + memcpy( &(this->D[i]), &(this->st_D), sizeof(double)); + } + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_Ki; + u_Ki.base = 0; + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->K[i] = u_Ki.real; + offset += sizeof(this->K[i]); + } + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_Ri; + u_Ri.base = 0; + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->R[i] = u_Ri.real; + offset += sizeof(this->R[i]); + } + for( uint32_t i = 0; i < 12; i++){ + union { + double real; + uint64_t base; + } u_Pi; + u_Pi.base = 0; + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->P[i] = u_Pi.real; + offset += sizeof(this->P[i]); + } + this->binning_x = ((uint32_t) (*(inbuffer + offset))); + this->binning_x |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->binning_x |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->binning_x |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->binning_x); + this->binning_y = ((uint32_t) (*(inbuffer + offset))); + this->binning_y |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->binning_y |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->binning_y |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->binning_y); + offset += this->roi.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "sensor_msgs/CameraInfo"; }; + const char * getMD5(){ return "c9a58c1b0b154e0e6da7578cb991d214"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/ChannelFloat32.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/ChannelFloat32.h new file mode 100644 index 0000000000000000000000000000000000000000..c5c433d0955ee12593cbeeed9feeed55b64de93e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/ChannelFloat32.h @@ -0,0 +1,99 @@ +#ifndef _ROS_sensor_msgs_ChannelFloat32_h +#define _ROS_sensor_msgs_ChannelFloat32_h + +#include +#include +#include +#include "ros/msg.h" + +namespace sensor_msgs +{ + + class ChannelFloat32 : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + uint32_t values_length; + typedef float _values_type; + _values_type st_values; + _values_type * values; + + ChannelFloat32(): + name(""), + values_length(0), values(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + *(outbuffer + offset + 0) = (this->values_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->values_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->values_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->values_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->values_length); + for( uint32_t i = 0; i < values_length; i++){ + union { + float real; + uint32_t base; + } u_valuesi; + u_valuesi.real = this->values[i]; + *(outbuffer + offset + 0) = (u_valuesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_valuesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_valuesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_valuesi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->values[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t values_lengthT = ((uint32_t) (*(inbuffer + offset))); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->values_length); + if(values_lengthT > values_length) + this->values = (float*)realloc(this->values, values_lengthT * sizeof(float)); + values_length = values_lengthT; + for( uint32_t i = 0; i < values_length; i++){ + union { + float real; + uint32_t base; + } u_st_values; + u_st_values.base = 0; + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_values = u_st_values.real; + offset += sizeof(this->st_values); + memcpy( &(this->values[i]), &(this->st_values), sizeof(float)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/ChannelFloat32"; }; + const char * getMD5(){ return "3d40139cdd33dfedcb71ffeeeb42ae7f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/CompressedImage.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/CompressedImage.h new file mode 100644 index 0000000000000000000000000000000000000000..a11f62cb0a9f26464f20eea8d37a2e19a8bc70ed --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/CompressedImage.h @@ -0,0 +1,88 @@ +#ifndef _ROS_sensor_msgs_CompressedImage_h +#define _ROS_sensor_msgs_CompressedImage_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class CompressedImage : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _format_type; + _format_type format; + uint32_t data_length; + typedef uint8_t _data_type; + _data_type st_data; + _data_type * data; + + CompressedImage(): + header(), + format(""), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_format = strlen(this->format); + varToArr(outbuffer + offset, length_format); + offset += 4; + memcpy(outbuffer + offset, this->format, length_format); + offset += length_format; + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_format; + arrToVar(length_format, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_format; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_format-1]=0; + this->format = (char *)(inbuffer + offset-1); + offset += length_format; + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint8_t*)realloc(this->data, data_lengthT * sizeof(uint8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint8_t)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/CompressedImage"; }; + const char * getMD5(){ return "8f7a12909da2c9d3332d540a0977563f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/FluidPressure.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/FluidPressure.h new file mode 100644 index 0000000000000000000000000000000000000000..3df5165ba51be21aa37a946e1e935c3a5e3dabae --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/FluidPressure.h @@ -0,0 +1,108 @@ +#ifndef _ROS_sensor_msgs_FluidPressure_h +#define _ROS_sensor_msgs_FluidPressure_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class FluidPressure : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef double _fluid_pressure_type; + _fluid_pressure_type fluid_pressure; + typedef double _variance_type; + _variance_type variance; + + FluidPressure(): + header(), + fluid_pressure(0), + variance(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_fluid_pressure; + u_fluid_pressure.real = this->fluid_pressure; + *(outbuffer + offset + 0) = (u_fluid_pressure.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_fluid_pressure.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_fluid_pressure.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_fluid_pressure.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_fluid_pressure.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_fluid_pressure.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_fluid_pressure.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_fluid_pressure.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->fluid_pressure); + union { + double real; + uint64_t base; + } u_variance; + u_variance.real = this->variance; + *(outbuffer + offset + 0) = (u_variance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_variance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_variance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_variance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_variance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_variance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_variance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_variance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->variance); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_fluid_pressure; + u_fluid_pressure.base = 0; + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->fluid_pressure = u_fluid_pressure.real; + offset += sizeof(this->fluid_pressure); + union { + double real; + uint64_t base; + } u_variance; + u_variance.base = 0; + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->variance = u_variance.real; + offset += sizeof(this->variance); + return offset; + } + + const char * getType(){ return "sensor_msgs/FluidPressure"; }; + const char * getMD5(){ return "804dc5cea1c5306d6a2eb80b9833befe"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/Illuminance.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/Illuminance.h new file mode 100644 index 0000000000000000000000000000000000000000..d6fbb2cd1a4759faadb228357f7e00126bf5f2b4 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/Illuminance.h @@ -0,0 +1,108 @@ +#ifndef _ROS_sensor_msgs_Illuminance_h +#define _ROS_sensor_msgs_Illuminance_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class Illuminance : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef double _illuminance_type; + _illuminance_type illuminance; + typedef double _variance_type; + _variance_type variance; + + Illuminance(): + header(), + illuminance(0), + variance(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_illuminance; + u_illuminance.real = this->illuminance; + *(outbuffer + offset + 0) = (u_illuminance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_illuminance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_illuminance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_illuminance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_illuminance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_illuminance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_illuminance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_illuminance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->illuminance); + union { + double real; + uint64_t base; + } u_variance; + u_variance.real = this->variance; + *(outbuffer + offset + 0) = (u_variance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_variance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_variance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_variance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_variance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_variance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_variance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_variance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->variance); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_illuminance; + u_illuminance.base = 0; + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->illuminance = u_illuminance.real; + offset += sizeof(this->illuminance); + union { + double real; + uint64_t base; + } u_variance; + u_variance.base = 0; + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->variance = u_variance.real; + offset += sizeof(this->variance); + return offset; + } + + const char * getType(){ return "sensor_msgs/Illuminance"; }; + const char * getMD5(){ return "8cf5febb0952fca9d650c3d11a81a188"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/Image.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/Image.h new file mode 100644 index 0000000000000000000000000000000000000000..15842a3a734170d22be223a8886c8d8f605b4fb0 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/Image.h @@ -0,0 +1,134 @@ +#ifndef _ROS_sensor_msgs_Image_h +#define _ROS_sensor_msgs_Image_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class Image : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef uint32_t _height_type; + _height_type height; + typedef uint32_t _width_type; + _width_type width; + typedef const char* _encoding_type; + _encoding_type encoding; + typedef uint8_t _is_bigendian_type; + _is_bigendian_type is_bigendian; + typedef uint32_t _step_type; + _step_type step; + uint32_t data_length; + typedef uint8_t _data_type; + _data_type st_data; + _data_type * data; + + Image(): + header(), + height(0), + width(0), + encoding(""), + is_bigendian(0), + step(0), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF; + offset += sizeof(this->height); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF; + offset += sizeof(this->width); + uint32_t length_encoding = strlen(this->encoding); + varToArr(outbuffer + offset, length_encoding); + offset += 4; + memcpy(outbuffer + offset, this->encoding, length_encoding); + offset += length_encoding; + *(outbuffer + offset + 0) = (this->is_bigendian >> (8 * 0)) & 0xFF; + offset += sizeof(this->is_bigendian); + *(outbuffer + offset + 0) = (this->step >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->step >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->step >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->step >> (8 * 3)) & 0xFF; + offset += sizeof(this->step); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->height = ((uint32_t) (*(inbuffer + offset))); + this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->height); + this->width = ((uint32_t) (*(inbuffer + offset))); + this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->width); + uint32_t length_encoding; + arrToVar(length_encoding, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_encoding; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_encoding-1]=0; + this->encoding = (char *)(inbuffer + offset-1); + offset += length_encoding; + this->is_bigendian = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->is_bigendian); + this->step = ((uint32_t) (*(inbuffer + offset))); + this->step |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->step |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->step |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->step); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint8_t*)realloc(this->data, data_lengthT * sizeof(uint8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint8_t)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/Image"; }; + const char * getMD5(){ return "060021388200f6f0f447d0fcd9c64743"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/Imu.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/Imu.h new file mode 100644 index 0000000000000000000000000000000000000000..c18b5835d3a1839d633380d62ab632fc924d7138 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/Imu.h @@ -0,0 +1,166 @@ +#ifndef _ROS_sensor_msgs_Imu_h +#define _ROS_sensor_msgs_Imu_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../std_msgs/Header.h" +#include "../geometry_msgs/Quaternion.h" +#include "../geometry_msgs/Vector3.h" + +namespace sensor_msgs +{ + + class Imu : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Quaternion _orientation_type; + _orientation_type orientation; + double orientation_covariance[9]; + typedef geometry_msgs::Vector3 _angular_velocity_type; + _angular_velocity_type angular_velocity; + double angular_velocity_covariance[9]; + typedef geometry_msgs::Vector3 _linear_acceleration_type; + _linear_acceleration_type linear_acceleration; + double linear_acceleration_covariance[9]; + + Imu(): + header(), + orientation(), + orientation_covariance(), + angular_velocity(), + angular_velocity_covariance(), + linear_acceleration(), + linear_acceleration_covariance() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->orientation.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_orientation_covariancei; + u_orientation_covariancei.real = this->orientation_covariance[i]; + *(outbuffer + offset + 0) = (u_orientation_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_orientation_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_orientation_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_orientation_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_orientation_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_orientation_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_orientation_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_orientation_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->orientation_covariance[i]); + } + offset += this->angular_velocity.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_angular_velocity_covariancei; + u_angular_velocity_covariancei.real = this->angular_velocity_covariance[i]; + *(outbuffer + offset + 0) = (u_angular_velocity_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angular_velocity_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angular_velocity_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angular_velocity_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_angular_velocity_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_angular_velocity_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_angular_velocity_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_angular_velocity_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->angular_velocity_covariance[i]); + } + offset += this->linear_acceleration.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_linear_acceleration_covariancei; + u_linear_acceleration_covariancei.real = this->linear_acceleration_covariance[i]; + *(outbuffer + offset + 0) = (u_linear_acceleration_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_linear_acceleration_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_linear_acceleration_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_linear_acceleration_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_linear_acceleration_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_linear_acceleration_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_linear_acceleration_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_linear_acceleration_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->linear_acceleration_covariance[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->orientation.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_orientation_covariancei; + u_orientation_covariancei.base = 0; + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->orientation_covariance[i] = u_orientation_covariancei.real; + offset += sizeof(this->orientation_covariance[i]); + } + offset += this->angular_velocity.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_angular_velocity_covariancei; + u_angular_velocity_covariancei.base = 0; + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->angular_velocity_covariance[i] = u_angular_velocity_covariancei.real; + offset += sizeof(this->angular_velocity_covariance[i]); + } + offset += this->linear_acceleration.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_linear_acceleration_covariancei; + u_linear_acceleration_covariancei.base = 0; + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->linear_acceleration_covariance[i] = u_linear_acceleration_covariancei.real; + offset += sizeof(this->linear_acceleration_covariance[i]); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/Imu"; }; + const char * getMD5(){ return "6a62c6daae103f4ff57a132d6f95cec2"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/JointState.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/JointState.h new file mode 100644 index 0000000000000000000000000000000000000000..6195757e3b6eb2a53e0103703239eacf8e826080 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/JointState.h @@ -0,0 +1,237 @@ +#ifndef _ROS_sensor_msgs_JointState_h +#define _ROS_sensor_msgs_JointState_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../std_msgs/Header.h" + +namespace sensor_msgs +{ + + class JointState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t name_length; + typedef char* _name_type; + _name_type st_name; + _name_type * name; + uint32_t position_length; + typedef double _position_type; + _position_type st_position; + _position_type * position; + uint32_t velocity_length; + typedef double _velocity_type; + _velocity_type st_velocity; + _velocity_type * velocity; + uint32_t effort_length; + typedef double _effort_type; + _effort_type st_effort; + _effort_type * effort; + + JointState(): + header(), + name_length(0), name(NULL), + position_length(0), position(NULL), + velocity_length(0), velocity(NULL), + effort_length(0), effort(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->name_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->name_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->name_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->name_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->name_length); + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_namei = strlen(this->name[i]); + varToArr(outbuffer + offset, length_namei); + offset += 4; + memcpy(outbuffer + offset, this->name[i], length_namei); + offset += length_namei; + } + *(outbuffer + offset + 0) = (this->position_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->position_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->position_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->position_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->position_length); + for( uint32_t i = 0; i < position_length; i++){ + union { + double real; + uint64_t base; + } u_positioni; + u_positioni.real = this->position[i]; + *(outbuffer + offset + 0) = (u_positioni.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_positioni.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_positioni.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_positioni.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_positioni.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_positioni.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_positioni.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_positioni.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position[i]); + } + *(outbuffer + offset + 0) = (this->velocity_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->velocity_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->velocity_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->velocity_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->velocity_length); + for( uint32_t i = 0; i < velocity_length; i++){ + union { + double real; + uint64_t base; + } u_velocityi; + u_velocityi.real = this->velocity[i]; + *(outbuffer + offset + 0) = (u_velocityi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_velocityi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_velocityi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_velocityi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_velocityi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_velocityi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_velocityi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_velocityi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->velocity[i]); + } + *(outbuffer + offset + 0) = (this->effort_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->effort_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->effort_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->effort_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->effort_length); + for( uint32_t i = 0; i < effort_length; i++){ + union { + double real; + uint64_t base; + } u_efforti; + u_efforti.real = this->effort[i]; + *(outbuffer + offset + 0) = (u_efforti.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_efforti.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_efforti.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_efforti.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_efforti.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_efforti.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_efforti.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_efforti.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->effort[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t name_lengthT = ((uint32_t) (*(inbuffer + offset))); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->name_length); + if(name_lengthT > name_length) + this->name = (char**)realloc(this->name, name_lengthT * sizeof(char*)); + name_length = name_lengthT; + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_st_name; + arrToVar(length_st_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_name-1]=0; + this->st_name = (char *)(inbuffer + offset-1); + offset += length_st_name; + memcpy( &(this->name[i]), &(this->st_name), sizeof(char*)); + } + uint32_t position_lengthT = ((uint32_t) (*(inbuffer + offset))); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->position_length); + if(position_lengthT > position_length) + this->position = (double*)realloc(this->position, position_lengthT * sizeof(double)); + position_length = position_lengthT; + for( uint32_t i = 0; i < position_length; i++){ + union { + double real; + uint64_t base; + } u_st_position; + u_st_position.base = 0; + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_position = u_st_position.real; + offset += sizeof(this->st_position); + memcpy( &(this->position[i]), &(this->st_position), sizeof(double)); + } + uint32_t velocity_lengthT = ((uint32_t) (*(inbuffer + offset))); + velocity_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + velocity_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + velocity_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->velocity_length); + if(velocity_lengthT > velocity_length) + this->velocity = (double*)realloc(this->velocity, velocity_lengthT * sizeof(double)); + velocity_length = velocity_lengthT; + for( uint32_t i = 0; i < velocity_length; i++){ + union { + double real; + uint64_t base; + } u_st_velocity; + u_st_velocity.base = 0; + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_velocity = u_st_velocity.real; + offset += sizeof(this->st_velocity); + memcpy( &(this->velocity[i]), &(this->st_velocity), sizeof(double)); + } + uint32_t effort_lengthT = ((uint32_t) (*(inbuffer + offset))); + effort_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + effort_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + effort_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->effort_length); + if(effort_lengthT > effort_length) + this->effort = (double*)realloc(this->effort, effort_lengthT * sizeof(double)); + effort_length = effort_lengthT; + for( uint32_t i = 0; i < effort_length; i++){ + union { + double real; + uint64_t base; + } u_st_effort; + u_st_effort.base = 0; + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_effort = u_st_effort.real; + offset += sizeof(this->st_effort); + memcpy( &(this->effort[i]), &(this->st_effort), sizeof(double)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/JointState"; }; + const char * getMD5(){ return "3066dcd76a6cfaef579bd0f34173e9fd"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/Joy.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/Joy.h new file mode 100644 index 0000000000000000000000000000000000000000..bd56d41028b363cbaa6ca7a391e3d768fab45de7 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/Joy.h @@ -0,0 +1,132 @@ +#ifndef _ROS_sensor_msgs_Joy_h +#define _ROS_sensor_msgs_Joy_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class Joy : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t axes_length; + typedef float _axes_type; + _axes_type st_axes; + _axes_type * axes; + uint32_t buttons_length; + typedef int32_t _buttons_type; + _buttons_type st_buttons; + _buttons_type * buttons; + + Joy(): + header(), + axes_length(0), axes(NULL), + buttons_length(0), buttons(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->axes_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->axes_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->axes_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->axes_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->axes_length); + for( uint32_t i = 0; i < axes_length; i++){ + union { + float real; + uint32_t base; + } u_axesi; + u_axesi.real = this->axes[i]; + *(outbuffer + offset + 0) = (u_axesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_axesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_axesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_axesi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->axes[i]); + } + *(outbuffer + offset + 0) = (this->buttons_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->buttons_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->buttons_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->buttons_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->buttons_length); + for( uint32_t i = 0; i < buttons_length; i++){ + union { + int32_t real; + uint32_t base; + } u_buttonsi; + u_buttonsi.real = this->buttons[i]; + *(outbuffer + offset + 0) = (u_buttonsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_buttonsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_buttonsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_buttonsi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->buttons[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t axes_lengthT = ((uint32_t) (*(inbuffer + offset))); + axes_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + axes_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + axes_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->axes_length); + if(axes_lengthT > axes_length) + this->axes = (float*)realloc(this->axes, axes_lengthT * sizeof(float)); + axes_length = axes_lengthT; + for( uint32_t i = 0; i < axes_length; i++){ + union { + float real; + uint32_t base; + } u_st_axes; + u_st_axes.base = 0; + u_st_axes.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_axes.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_axes.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_axes.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_axes = u_st_axes.real; + offset += sizeof(this->st_axes); + memcpy( &(this->axes[i]), &(this->st_axes), sizeof(float)); + } + uint32_t buttons_lengthT = ((uint32_t) (*(inbuffer + offset))); + buttons_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + buttons_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + buttons_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->buttons_length); + if(buttons_lengthT > buttons_length) + this->buttons = (int32_t*)realloc(this->buttons, buttons_lengthT * sizeof(int32_t)); + buttons_length = buttons_lengthT; + for( uint32_t i = 0; i < buttons_length; i++){ + union { + int32_t real; + uint32_t base; + } u_st_buttons; + u_st_buttons.base = 0; + u_st_buttons.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_buttons.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_buttons.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_buttons.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_buttons = u_st_buttons.real; + offset += sizeof(this->st_buttons); + memcpy( &(this->buttons[i]), &(this->st_buttons), sizeof(int32_t)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/Joy"; }; + const char * getMD5(){ return "5a9ea5f83505693b71e785041e67a8bb"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/JoyFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/JoyFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..7a129935146da1651dfbb596810ce31ed5eb36ae --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/JoyFeedback.h @@ -0,0 +1,79 @@ +#ifndef _ROS_sensor_msgs_JoyFeedback_h +#define _ROS_sensor_msgs_JoyFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace sensor_msgs +{ + + class JoyFeedback : public ros::Msg + { + public: + typedef uint8_t _type_type; + _type_type type; + typedef uint8_t _id_type; + _id_type id; + typedef float _intensity_type; + _intensity_type intensity; + enum { TYPE_LED = 0 }; + enum { TYPE_RUMBLE = 1 }; + enum { TYPE_BUZZER = 2 }; + + JoyFeedback(): + type(0), + id(0), + intensity(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->type >> (8 * 0)) & 0xFF; + offset += sizeof(this->type); + *(outbuffer + offset + 0) = (this->id >> (8 * 0)) & 0xFF; + offset += sizeof(this->id); + union { + float real; + uint32_t base; + } u_intensity; + u_intensity.real = this->intensity; + *(outbuffer + offset + 0) = (u_intensity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_intensity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_intensity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_intensity.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->intensity); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->type); + this->id = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->id); + union { + float real; + uint32_t base; + } u_intensity; + u_intensity.base = 0; + u_intensity.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_intensity.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_intensity.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_intensity.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->intensity = u_intensity.real; + offset += sizeof(this->intensity); + return offset; + } + + const char * getType(){ return "sensor_msgs/JoyFeedback"; }; + const char * getMD5(){ return "f4dcd73460360d98f36e55ee7f2e46f1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/JoyFeedbackArray.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/JoyFeedbackArray.h new file mode 100644 index 0000000000000000000000000000000000000000..8fe80646273d4242839bc8d1da965ac83f9603cb --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/JoyFeedbackArray.h @@ -0,0 +1,64 @@ +#ifndef _ROS_sensor_msgs_JoyFeedbackArray_h +#define _ROS_sensor_msgs_JoyFeedbackArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "sensor_msgs/JoyFeedback.h" + +namespace sensor_msgs +{ + + class JoyFeedbackArray : public ros::Msg + { + public: + uint32_t array_length; + typedef sensor_msgs::JoyFeedback _array_type; + _array_type st_array; + _array_type * array; + + JoyFeedbackArray(): + array_length(0), array(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->array_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->array_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->array_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->array_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->array_length); + for( uint32_t i = 0; i < array_length; i++){ + offset += this->array[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t array_lengthT = ((uint32_t) (*(inbuffer + offset))); + array_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + array_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + array_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->array_length); + if(array_lengthT > array_length) + this->array = (sensor_msgs::JoyFeedback*)realloc(this->array, array_lengthT * sizeof(sensor_msgs::JoyFeedback)); + array_length = array_lengthT; + for( uint32_t i = 0; i < array_length; i++){ + offset += this->st_array.deserialize(inbuffer + offset); + memcpy( &(this->array[i]), &(this->st_array), sizeof(sensor_msgs::JoyFeedback)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/JoyFeedbackArray"; }; + const char * getMD5(){ return "cde5730a895b1fc4dee6f91b754b213d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/LaserEcho.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/LaserEcho.h new file mode 100644 index 0000000000000000000000000000000000000000..b8f4c49c8df3f4466c58bdec9ff5e5f90f5b79e7 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/LaserEcho.h @@ -0,0 +1,82 @@ +#ifndef _ROS_sensor_msgs_LaserEcho_h +#define _ROS_sensor_msgs_LaserEcho_h + +#include +#include +#include +#include "ros/msg.h" + +namespace sensor_msgs +{ + + class LaserEcho : public ros::Msg + { + public: + uint32_t echoes_length; + typedef float _echoes_type; + _echoes_type st_echoes; + _echoes_type * echoes; + + LaserEcho(): + echoes_length(0), echoes(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->echoes_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->echoes_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->echoes_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->echoes_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->echoes_length); + for( uint32_t i = 0; i < echoes_length; i++){ + union { + float real; + uint32_t base; + } u_echoesi; + u_echoesi.real = this->echoes[i]; + *(outbuffer + offset + 0) = (u_echoesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_echoesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_echoesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_echoesi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->echoes[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t echoes_lengthT = ((uint32_t) (*(inbuffer + offset))); + echoes_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + echoes_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + echoes_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->echoes_length); + if(echoes_lengthT > echoes_length) + this->echoes = (float*)realloc(this->echoes, echoes_lengthT * sizeof(float)); + echoes_length = echoes_lengthT; + for( uint32_t i = 0; i < echoes_length; i++){ + union { + float real; + uint32_t base; + } u_st_echoes; + u_st_echoes.base = 0; + u_st_echoes.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_echoes.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_echoes.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_echoes.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_echoes = u_st_echoes.real; + offset += sizeof(this->st_echoes); + memcpy( &(this->echoes[i]), &(this->st_echoes), sizeof(float)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/LaserEcho"; }; + const char * getMD5(){ return "8bc5ae449b200fba4d552b4225586696"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/LaserScan.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/LaserScan.h new file mode 100644 index 0000000000000000000000000000000000000000..203e73939a1d8429cfc89737b0cef8ba87c85584 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/LaserScan.h @@ -0,0 +1,300 @@ +#ifndef _ROS_sensor_msgs_LaserScan_h +#define _ROS_sensor_msgs_LaserScan_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../std_msgs/Header.h" + +namespace sensor_msgs +{ + + class LaserScan : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef float _angle_min_type; + _angle_min_type angle_min; + typedef float _angle_max_type; + _angle_max_type angle_max; + typedef float _angle_increment_type; + _angle_increment_type angle_increment; + typedef float _time_increment_type; + _time_increment_type time_increment; + typedef float _scan_time_type; + _scan_time_type scan_time; + typedef float _range_min_type; + _range_min_type range_min; + typedef float _range_max_type; + _range_max_type range_max; + uint32_t ranges_length; + typedef float _ranges_type; + _ranges_type st_ranges; + _ranges_type * ranges; + uint32_t intensities_length; + typedef float _intensities_type; + _intensities_type st_intensities; + _intensities_type * intensities; + + LaserScan(): + header(), + angle_min(0), + angle_max(0), + angle_increment(0), + time_increment(0), + scan_time(0), + range_min(0), + range_max(0), + ranges_length(0), ranges(NULL), + intensities_length(0), intensities(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_angle_min; + u_angle_min.real = this->angle_min; + *(outbuffer + offset + 0) = (u_angle_min.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angle_min.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angle_min.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angle_min.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angle_min); + union { + float real; + uint32_t base; + } u_angle_max; + u_angle_max.real = this->angle_max; + *(outbuffer + offset + 0) = (u_angle_max.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angle_max.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angle_max.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angle_max.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angle_max); + union { + float real; + uint32_t base; + } u_angle_increment; + u_angle_increment.real = this->angle_increment; + *(outbuffer + offset + 0) = (u_angle_increment.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angle_increment.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angle_increment.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angle_increment.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angle_increment); + union { + float real; + uint32_t base; + } u_time_increment; + u_time_increment.real = this->time_increment; + *(outbuffer + offset + 0) = (u_time_increment.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_time_increment.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_time_increment.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_time_increment.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_increment); + union { + float real; + uint32_t base; + } u_scan_time; + u_scan_time.real = this->scan_time; + *(outbuffer + offset + 0) = (u_scan_time.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_scan_time.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_scan_time.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_scan_time.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->scan_time); + union { + float real; + uint32_t base; + } u_range_min; + u_range_min.real = this->range_min; + *(outbuffer + offset + 0) = (u_range_min.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_range_min.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_range_min.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_range_min.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->range_min); + union { + float real; + uint32_t base; + } u_range_max; + u_range_max.real = this->range_max; + *(outbuffer + offset + 0) = (u_range_max.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_range_max.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_range_max.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_range_max.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->range_max); + *(outbuffer + offset + 0) = (this->ranges_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->ranges_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->ranges_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->ranges_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->ranges_length); + for( uint32_t i = 0; i < ranges_length; i++){ + union { + float real; + uint32_t base; + } u_rangesi; + u_rangesi.real = this->ranges[i]; + *(outbuffer + offset + 0) = (u_rangesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_rangesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_rangesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_rangesi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->ranges[i]); + } + *(outbuffer + offset + 0) = (this->intensities_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->intensities_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->intensities_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->intensities_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->intensities_length); + for( uint32_t i = 0; i < intensities_length; i++){ + union { + float real; + uint32_t base; + } u_intensitiesi; + u_intensitiesi.real = this->intensities[i]; + *(outbuffer + offset + 0) = (u_intensitiesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_intensitiesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_intensitiesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_intensitiesi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->intensities[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_angle_min; + u_angle_min.base = 0; + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angle_min = u_angle_min.real; + offset += sizeof(this->angle_min); + union { + float real; + uint32_t base; + } u_angle_max; + u_angle_max.base = 0; + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angle_max = u_angle_max.real; + offset += sizeof(this->angle_max); + union { + float real; + uint32_t base; + } u_angle_increment; + u_angle_increment.base = 0; + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angle_increment = u_angle_increment.real; + offset += sizeof(this->angle_increment); + union { + float real; + uint32_t base; + } u_time_increment; + u_time_increment.base = 0; + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->time_increment = u_time_increment.real; + offset += sizeof(this->time_increment); + union { + float real; + uint32_t base; + } u_scan_time; + u_scan_time.base = 0; + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->scan_time = u_scan_time.real; + offset += sizeof(this->scan_time); + union { + float real; + uint32_t base; + } u_range_min; + u_range_min.base = 0; + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->range_min = u_range_min.real; + offset += sizeof(this->range_min); + union { + float real; + uint32_t base; + } u_range_max; + u_range_max.base = 0; + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->range_max = u_range_max.real; + offset += sizeof(this->range_max); + uint32_t ranges_lengthT = ((uint32_t) (*(inbuffer + offset))); + ranges_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + ranges_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + ranges_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->ranges_length); + if(ranges_lengthT > ranges_length) + this->ranges = (float*)realloc(this->ranges, ranges_lengthT * sizeof(float)); + ranges_length = ranges_lengthT; + for( uint32_t i = 0; i < ranges_length; i++){ + union { + float real; + uint32_t base; + } u_st_ranges; + u_st_ranges.base = 0; + u_st_ranges.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_ranges.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_ranges.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_ranges.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_ranges = u_st_ranges.real; + offset += sizeof(this->st_ranges); + memcpy( &(this->ranges[i]), &(this->st_ranges), sizeof(float)); + } + uint32_t intensities_lengthT = ((uint32_t) (*(inbuffer + offset))); + intensities_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + intensities_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + intensities_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->intensities_length); + if(intensities_lengthT > intensities_length) + this->intensities = (float*)realloc(this->intensities, intensities_lengthT * sizeof(float)); + intensities_length = intensities_lengthT; + for( uint32_t i = 0; i < intensities_length; i++){ + union { + float real; + uint32_t base; + } u_st_intensities; + u_st_intensities.base = 0; + u_st_intensities.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_intensities.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_intensities.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_intensities.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_intensities = u_st_intensities.real; + offset += sizeof(this->st_intensities); + memcpy( &(this->intensities[i]), &(this->st_intensities), sizeof(float)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/LaserScan"; }; + const char * getMD5(){ return "90c7ef2dc6895d81024acba2ac42f369"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/MagneticField.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/MagneticField.h new file mode 100644 index 0000000000000000000000000000000000000000..69a73444bc60614a4b2cc3da6cf92400e603442e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/MagneticField.h @@ -0,0 +1,85 @@ +#ifndef _ROS_sensor_msgs_MagneticField_h +#define _ROS_sensor_msgs_MagneticField_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Vector3.h" + +namespace sensor_msgs +{ + + class MagneticField : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Vector3 _magnetic_field_type; + _magnetic_field_type magnetic_field; + double magnetic_field_covariance[9]; + + MagneticField(): + header(), + magnetic_field(), + magnetic_field_covariance() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->magnetic_field.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_magnetic_field_covariancei; + u_magnetic_field_covariancei.real = this->magnetic_field_covariance[i]; + *(outbuffer + offset + 0) = (u_magnetic_field_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_magnetic_field_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_magnetic_field_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_magnetic_field_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_magnetic_field_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_magnetic_field_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_magnetic_field_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_magnetic_field_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->magnetic_field_covariance[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->magnetic_field.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_magnetic_field_covariancei; + u_magnetic_field_covariancei.base = 0; + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->magnetic_field_covariance[i] = u_magnetic_field_covariancei.real; + offset += sizeof(this->magnetic_field_covariance[i]); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/MagneticField"; }; + const char * getMD5(){ return "2f3b0b43eed0c9501de0fa3ff89a45aa"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/MultiDOFJointState.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/MultiDOFJointState.h new file mode 100644 index 0000000000000000000000000000000000000000..ed0779776f4c98fe26d8c4bbc58bc6f891ebad0d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/MultiDOFJointState.h @@ -0,0 +1,159 @@ +#ifndef _ROS_sensor_msgs_MultiDOFJointState_h +#define _ROS_sensor_msgs_MultiDOFJointState_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Transform.h" +#include "geometry_msgs/Twist.h" +#include "geometry_msgs/Wrench.h" + +namespace sensor_msgs +{ + + class MultiDOFJointState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t joint_names_length; + typedef char* _joint_names_type; + _joint_names_type st_joint_names; + _joint_names_type * joint_names; + uint32_t transforms_length; + typedef geometry_msgs::Transform _transforms_type; + _transforms_type st_transforms; + _transforms_type * transforms; + uint32_t twist_length; + typedef geometry_msgs::Twist _twist_type; + _twist_type st_twist; + _twist_type * twist; + uint32_t wrench_length; + typedef geometry_msgs::Wrench _wrench_type; + _wrench_type st_wrench; + _wrench_type * wrench; + + MultiDOFJointState(): + header(), + joint_names_length(0), joint_names(NULL), + transforms_length(0), transforms(NULL), + twist_length(0), twist(NULL), + wrench_length(0), wrench(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_names_length); + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_joint_namesi = strlen(this->joint_names[i]); + varToArr(outbuffer + offset, length_joint_namesi); + offset += 4; + memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); + offset += length_joint_namesi; + } + *(outbuffer + offset + 0) = (this->transforms_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->transforms_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->transforms_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->transforms_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->transforms_length); + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->transforms[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->twist_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->twist_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->twist_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->twist_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->twist_length); + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->twist[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->wrench_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->wrench_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->wrench_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->wrench_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->wrench_length); + for( uint32_t i = 0; i < wrench_length; i++){ + offset += this->wrench[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_names_length); + if(joint_names_lengthT > joint_names_length) + this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); + joint_names_length = joint_names_lengthT; + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_st_joint_names; + arrToVar(length_st_joint_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_joint_names-1]=0; + this->st_joint_names = (char *)(inbuffer + offset-1); + offset += length_st_joint_names; + memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); + } + uint32_t transforms_lengthT = ((uint32_t) (*(inbuffer + offset))); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->transforms_length); + if(transforms_lengthT > transforms_length) + this->transforms = (geometry_msgs::Transform*)realloc(this->transforms, transforms_lengthT * sizeof(geometry_msgs::Transform)); + transforms_length = transforms_lengthT; + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->st_transforms.deserialize(inbuffer + offset); + memcpy( &(this->transforms[i]), &(this->st_transforms), sizeof(geometry_msgs::Transform)); + } + uint32_t twist_lengthT = ((uint32_t) (*(inbuffer + offset))); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->twist_length); + if(twist_lengthT > twist_length) + this->twist = (geometry_msgs::Twist*)realloc(this->twist, twist_lengthT * sizeof(geometry_msgs::Twist)); + twist_length = twist_lengthT; + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->st_twist.deserialize(inbuffer + offset); + memcpy( &(this->twist[i]), &(this->st_twist), sizeof(geometry_msgs::Twist)); + } + uint32_t wrench_lengthT = ((uint32_t) (*(inbuffer + offset))); + wrench_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + wrench_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + wrench_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->wrench_length); + if(wrench_lengthT > wrench_length) + this->wrench = (geometry_msgs::Wrench*)realloc(this->wrench, wrench_lengthT * sizeof(geometry_msgs::Wrench)); + wrench_length = wrench_lengthT; + for( uint32_t i = 0; i < wrench_length; i++){ + offset += this->st_wrench.deserialize(inbuffer + offset); + memcpy( &(this->wrench[i]), &(this->st_wrench), sizeof(geometry_msgs::Wrench)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/MultiDOFJointState"; }; + const char * getMD5(){ return "690f272f0640d2631c305eeb8301e59d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/MultiEchoLaserScan.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/MultiEchoLaserScan.h new file mode 100644 index 0000000000000000000000000000000000000000..35af2b2126eef449ac05513a68ec9f3aa6587038 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/MultiEchoLaserScan.h @@ -0,0 +1,263 @@ +#ifndef _ROS_sensor_msgs_MultiEchoLaserScan_h +#define _ROS_sensor_msgs_MultiEchoLaserScan_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/LaserEcho.h" + +namespace sensor_msgs +{ + + class MultiEchoLaserScan : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef float _angle_min_type; + _angle_min_type angle_min; + typedef float _angle_max_type; + _angle_max_type angle_max; + typedef float _angle_increment_type; + _angle_increment_type angle_increment; + typedef float _time_increment_type; + _time_increment_type time_increment; + typedef float _scan_time_type; + _scan_time_type scan_time; + typedef float _range_min_type; + _range_min_type range_min; + typedef float _range_max_type; + _range_max_type range_max; + uint32_t ranges_length; + typedef sensor_msgs::LaserEcho _ranges_type; + _ranges_type st_ranges; + _ranges_type * ranges; + uint32_t intensities_length; + typedef sensor_msgs::LaserEcho _intensities_type; + _intensities_type st_intensities; + _intensities_type * intensities; + + MultiEchoLaserScan(): + header(), + angle_min(0), + angle_max(0), + angle_increment(0), + time_increment(0), + scan_time(0), + range_min(0), + range_max(0), + ranges_length(0), ranges(NULL), + intensities_length(0), intensities(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_angle_min; + u_angle_min.real = this->angle_min; + *(outbuffer + offset + 0) = (u_angle_min.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angle_min.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angle_min.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angle_min.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angle_min); + union { + float real; + uint32_t base; + } u_angle_max; + u_angle_max.real = this->angle_max; + *(outbuffer + offset + 0) = (u_angle_max.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angle_max.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angle_max.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angle_max.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angle_max); + union { + float real; + uint32_t base; + } u_angle_increment; + u_angle_increment.real = this->angle_increment; + *(outbuffer + offset + 0) = (u_angle_increment.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angle_increment.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angle_increment.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angle_increment.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angle_increment); + union { + float real; + uint32_t base; + } u_time_increment; + u_time_increment.real = this->time_increment; + *(outbuffer + offset + 0) = (u_time_increment.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_time_increment.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_time_increment.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_time_increment.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_increment); + union { + float real; + uint32_t base; + } u_scan_time; + u_scan_time.real = this->scan_time; + *(outbuffer + offset + 0) = (u_scan_time.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_scan_time.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_scan_time.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_scan_time.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->scan_time); + union { + float real; + uint32_t base; + } u_range_min; + u_range_min.real = this->range_min; + *(outbuffer + offset + 0) = (u_range_min.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_range_min.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_range_min.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_range_min.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->range_min); + union { + float real; + uint32_t base; + } u_range_max; + u_range_max.real = this->range_max; + *(outbuffer + offset + 0) = (u_range_max.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_range_max.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_range_max.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_range_max.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->range_max); + *(outbuffer + offset + 0) = (this->ranges_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->ranges_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->ranges_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->ranges_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->ranges_length); + for( uint32_t i = 0; i < ranges_length; i++){ + offset += this->ranges[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->intensities_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->intensities_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->intensities_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->intensities_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->intensities_length); + for( uint32_t i = 0; i < intensities_length; i++){ + offset += this->intensities[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_angle_min; + u_angle_min.base = 0; + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angle_min = u_angle_min.real; + offset += sizeof(this->angle_min); + union { + float real; + uint32_t base; + } u_angle_max; + u_angle_max.base = 0; + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angle_max = u_angle_max.real; + offset += sizeof(this->angle_max); + union { + float real; + uint32_t base; + } u_angle_increment; + u_angle_increment.base = 0; + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angle_increment = u_angle_increment.real; + offset += sizeof(this->angle_increment); + union { + float real; + uint32_t base; + } u_time_increment; + u_time_increment.base = 0; + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->time_increment = u_time_increment.real; + offset += sizeof(this->time_increment); + union { + float real; + uint32_t base; + } u_scan_time; + u_scan_time.base = 0; + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->scan_time = u_scan_time.real; + offset += sizeof(this->scan_time); + union { + float real; + uint32_t base; + } u_range_min; + u_range_min.base = 0; + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->range_min = u_range_min.real; + offset += sizeof(this->range_min); + union { + float real; + uint32_t base; + } u_range_max; + u_range_max.base = 0; + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->range_max = u_range_max.real; + offset += sizeof(this->range_max); + uint32_t ranges_lengthT = ((uint32_t) (*(inbuffer + offset))); + ranges_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + ranges_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + ranges_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->ranges_length); + if(ranges_lengthT > ranges_length) + this->ranges = (sensor_msgs::LaserEcho*)realloc(this->ranges, ranges_lengthT * sizeof(sensor_msgs::LaserEcho)); + ranges_length = ranges_lengthT; + for( uint32_t i = 0; i < ranges_length; i++){ + offset += this->st_ranges.deserialize(inbuffer + offset); + memcpy( &(this->ranges[i]), &(this->st_ranges), sizeof(sensor_msgs::LaserEcho)); + } + uint32_t intensities_lengthT = ((uint32_t) (*(inbuffer + offset))); + intensities_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + intensities_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + intensities_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->intensities_length); + if(intensities_lengthT > intensities_length) + this->intensities = (sensor_msgs::LaserEcho*)realloc(this->intensities, intensities_lengthT * sizeof(sensor_msgs::LaserEcho)); + intensities_length = intensities_lengthT; + for( uint32_t i = 0; i < intensities_length; i++){ + offset += this->st_intensities.deserialize(inbuffer + offset); + memcpy( &(this->intensities[i]), &(this->st_intensities), sizeof(sensor_msgs::LaserEcho)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/MultiEchoLaserScan"; }; + const char * getMD5(){ return "6fefb0c6da89d7c8abe4b339f5c2f8fb"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/NavSatFix.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/NavSatFix.h new file mode 100644 index 0000000000000000000000000000000000000000..9edc7c13b8dd723d2ad518253c21db5d6618ea26 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/NavSatFix.h @@ -0,0 +1,192 @@ +#ifndef _ROS_sensor_msgs_NavSatFix_h +#define _ROS_sensor_msgs_NavSatFix_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/NavSatStatus.h" + +namespace sensor_msgs +{ + + class NavSatFix : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef sensor_msgs::NavSatStatus _status_type; + _status_type status; + typedef double _latitude_type; + _latitude_type latitude; + typedef double _longitude_type; + _longitude_type longitude; + typedef double _altitude_type; + _altitude_type altitude; + double position_covariance[9]; + typedef uint8_t _position_covariance_type_type; + _position_covariance_type_type position_covariance_type; + enum { COVARIANCE_TYPE_UNKNOWN = 0 }; + enum { COVARIANCE_TYPE_APPROXIMATED = 1 }; + enum { COVARIANCE_TYPE_DIAGONAL_KNOWN = 2 }; + enum { COVARIANCE_TYPE_KNOWN = 3 }; + + NavSatFix(): + header(), + status(), + latitude(0), + longitude(0), + altitude(0), + position_covariance(), + position_covariance_type(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_latitude; + u_latitude.real = this->latitude; + *(outbuffer + offset + 0) = (u_latitude.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_latitude.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_latitude.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_latitude.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_latitude.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_latitude.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_latitude.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_latitude.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->latitude); + union { + double real; + uint64_t base; + } u_longitude; + u_longitude.real = this->longitude; + *(outbuffer + offset + 0) = (u_longitude.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_longitude.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_longitude.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_longitude.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_longitude.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_longitude.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_longitude.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_longitude.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->longitude); + union { + double real; + uint64_t base; + } u_altitude; + u_altitude.real = this->altitude; + *(outbuffer + offset + 0) = (u_altitude.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_altitude.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_altitude.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_altitude.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_altitude.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_altitude.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_altitude.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_altitude.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->altitude); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_position_covariancei; + u_position_covariancei.real = this->position_covariance[i]; + *(outbuffer + offset + 0) = (u_position_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_position_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_position_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_position_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_position_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_position_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_position_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_position_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position_covariance[i]); + } + *(outbuffer + offset + 0) = (this->position_covariance_type >> (8 * 0)) & 0xFF; + offset += sizeof(this->position_covariance_type); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_latitude; + u_latitude.base = 0; + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->latitude = u_latitude.real; + offset += sizeof(this->latitude); + union { + double real; + uint64_t base; + } u_longitude; + u_longitude.base = 0; + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->longitude = u_longitude.real; + offset += sizeof(this->longitude); + union { + double real; + uint64_t base; + } u_altitude; + u_altitude.base = 0; + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->altitude = u_altitude.real; + offset += sizeof(this->altitude); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_position_covariancei; + u_position_covariancei.base = 0; + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->position_covariance[i] = u_position_covariancei.real; + offset += sizeof(this->position_covariance[i]); + } + this->position_covariance_type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->position_covariance_type); + return offset; + } + + const char * getType(){ return "sensor_msgs/NavSatFix"; }; + const char * getMD5(){ return "2d3a8cd499b9b4a0249fb98fd05cfa48"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/NavSatStatus.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/NavSatStatus.h new file mode 100644 index 0000000000000000000000000000000000000000..79d8abd95fb4f306810d678c72da7c9e28660ba6 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/NavSatStatus.h @@ -0,0 +1,73 @@ +#ifndef _ROS_sensor_msgs_NavSatStatus_h +#define _ROS_sensor_msgs_NavSatStatus_h + +#include +#include +#include +#include "ros/msg.h" + +namespace sensor_msgs +{ + + class NavSatStatus : public ros::Msg + { + public: + typedef int8_t _status_type; + _status_type status; + typedef uint16_t _service_type; + _service_type service; + enum { STATUS_NO_FIX = -1 }; + enum { STATUS_FIX = 0 }; + enum { STATUS_SBAS_FIX = 1 }; + enum { STATUS_GBAS_FIX = 2 }; + enum { SERVICE_GPS = 1 }; + enum { SERVICE_GLONASS = 2 }; + enum { SERVICE_COMPASS = 4 }; + enum { SERVICE_GALILEO = 8 }; + + NavSatStatus(): + status(0), + service(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_status; + u_status.real = this->status; + *(outbuffer + offset + 0) = (u_status.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->status); + *(outbuffer + offset + 0) = (this->service >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->service >> (8 * 1)) & 0xFF; + offset += sizeof(this->service); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_status; + u_status.base = 0; + u_status.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->status = u_status.real; + offset += sizeof(this->status); + this->service = ((uint16_t) (*(inbuffer + offset))); + this->service |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->service); + return offset; + } + + const char * getType(){ return "sensor_msgs/NavSatStatus"; }; + const char * getMD5(){ return "331cdbddfa4bc96ffc3b9ad98900a54c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/PointCloud.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/PointCloud.h new file mode 100644 index 0000000000000000000000000000000000000000..f56e8d773b65a4d7c95126da78ae03fd75fb7772 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/PointCloud.h @@ -0,0 +1,96 @@ +#ifndef _ROS_sensor_msgs_PointCloud_h +#define _ROS_sensor_msgs_PointCloud_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Point32.h" +#include "sensor_msgs/ChannelFloat32.h" + +namespace sensor_msgs +{ + + class PointCloud : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t points_length; + typedef geometry_msgs::Point32 _points_type; + _points_type st_points; + _points_type * points; + uint32_t channels_length; + typedef sensor_msgs::ChannelFloat32 _channels_type; + _channels_type st_channels; + _channels_type * channels; + + PointCloud(): + header(), + points_length(0), points(NULL), + channels_length(0), channels(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->points_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->points_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->points_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->points_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->points_length); + for( uint32_t i = 0; i < points_length; i++){ + offset += this->points[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->channels_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->channels_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->channels_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->channels_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->channels_length); + for( uint32_t i = 0; i < channels_length; i++){ + offset += this->channels[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t points_lengthT = ((uint32_t) (*(inbuffer + offset))); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->points_length); + if(points_lengthT > points_length) + this->points = (geometry_msgs::Point32*)realloc(this->points, points_lengthT * sizeof(geometry_msgs::Point32)); + points_length = points_lengthT; + for( uint32_t i = 0; i < points_length; i++){ + offset += this->st_points.deserialize(inbuffer + offset); + memcpy( &(this->points[i]), &(this->st_points), sizeof(geometry_msgs::Point32)); + } + uint32_t channels_lengthT = ((uint32_t) (*(inbuffer + offset))); + channels_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + channels_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + channels_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->channels_length); + if(channels_lengthT > channels_length) + this->channels = (sensor_msgs::ChannelFloat32*)realloc(this->channels, channels_lengthT * sizeof(sensor_msgs::ChannelFloat32)); + channels_length = channels_lengthT; + for( uint32_t i = 0; i < channels_length; i++){ + offset += this->st_channels.deserialize(inbuffer + offset); + memcpy( &(this->channels[i]), &(this->st_channels), sizeof(sensor_msgs::ChannelFloat32)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/PointCloud"; }; + const char * getMD5(){ return "d8e9c3f5afbdd8a130fd1d2763945fca"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/PointCloud2.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/PointCloud2.h new file mode 100644 index 0000000000000000000000000000000000000000..c545de19a4424befaa46f22fd217fb8e63d105b7 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/PointCloud2.h @@ -0,0 +1,185 @@ +#ifndef _ROS_sensor_msgs_PointCloud2_h +#define _ROS_sensor_msgs_PointCloud2_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/PointField.h" + +namespace sensor_msgs +{ + + class PointCloud2 : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef uint32_t _height_type; + _height_type height; + typedef uint32_t _width_type; + _width_type width; + uint32_t fields_length; + typedef sensor_msgs::PointField _fields_type; + _fields_type st_fields; + _fields_type * fields; + typedef bool _is_bigendian_type; + _is_bigendian_type is_bigendian; + typedef uint32_t _point_step_type; + _point_step_type point_step; + typedef uint32_t _row_step_type; + _row_step_type row_step; + uint32_t data_length; + typedef uint8_t _data_type; + _data_type st_data; + _data_type * data; + typedef bool _is_dense_type; + _is_dense_type is_dense; + + PointCloud2(): + header(), + height(0), + width(0), + fields_length(0), fields(NULL), + is_bigendian(0), + point_step(0), + row_step(0), + data_length(0), data(NULL), + is_dense(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF; + offset += sizeof(this->height); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF; + offset += sizeof(this->width); + *(outbuffer + offset + 0) = (this->fields_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->fields_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->fields_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->fields_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->fields_length); + for( uint32_t i = 0; i < fields_length; i++){ + offset += this->fields[i].serialize(outbuffer + offset); + } + union { + bool real; + uint8_t base; + } u_is_bigendian; + u_is_bigendian.real = this->is_bigendian; + *(outbuffer + offset + 0) = (u_is_bigendian.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->is_bigendian); + *(outbuffer + offset + 0) = (this->point_step >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->point_step >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->point_step >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->point_step >> (8 * 3)) & 0xFF; + offset += sizeof(this->point_step); + *(outbuffer + offset + 0) = (this->row_step >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->row_step >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->row_step >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->row_step >> (8 * 3)) & 0xFF; + offset += sizeof(this->row_step); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + union { + bool real; + uint8_t base; + } u_is_dense; + u_is_dense.real = this->is_dense; + *(outbuffer + offset + 0) = (u_is_dense.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->is_dense); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->height = ((uint32_t) (*(inbuffer + offset))); + this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->height); + this->width = ((uint32_t) (*(inbuffer + offset))); + this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->width); + uint32_t fields_lengthT = ((uint32_t) (*(inbuffer + offset))); + fields_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + fields_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + fields_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->fields_length); + if(fields_lengthT > fields_length) + this->fields = (sensor_msgs::PointField*)realloc(this->fields, fields_lengthT * sizeof(sensor_msgs::PointField)); + fields_length = fields_lengthT; + for( uint32_t i = 0; i < fields_length; i++){ + offset += this->st_fields.deserialize(inbuffer + offset); + memcpy( &(this->fields[i]), &(this->st_fields), sizeof(sensor_msgs::PointField)); + } + union { + bool real; + uint8_t base; + } u_is_bigendian; + u_is_bigendian.base = 0; + u_is_bigendian.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->is_bigendian = u_is_bigendian.real; + offset += sizeof(this->is_bigendian); + this->point_step = ((uint32_t) (*(inbuffer + offset))); + this->point_step |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->point_step |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->point_step |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->point_step); + this->row_step = ((uint32_t) (*(inbuffer + offset))); + this->row_step |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->row_step |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->row_step |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->row_step); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint8_t*)realloc(this->data, data_lengthT * sizeof(uint8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint8_t)); + } + union { + bool real; + uint8_t base; + } u_is_dense; + u_is_dense.base = 0; + u_is_dense.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->is_dense = u_is_dense.real; + offset += sizeof(this->is_dense); + return offset; + } + + const char * getType(){ return "sensor_msgs/PointCloud2"; }; + const char * getMD5(){ return "1158d486dd51d683ce2f1be655c3c181"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/PointField.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/PointField.h new file mode 100644 index 0000000000000000000000000000000000000000..7ad0cc451ef562f5c3f4fe12877e15f931039e88 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/PointField.h @@ -0,0 +1,96 @@ +#ifndef _ROS_sensor_msgs_PointField_h +#define _ROS_sensor_msgs_PointField_h + +#include +#include +#include +#include "ros/msg.h" + +namespace sensor_msgs +{ + + class PointField : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef uint32_t _offset_type; + _offset_type offset; + typedef uint8_t _datatype_type; + _datatype_type datatype; + typedef uint32_t _count_type; + _count_type count; + enum { INT8 = 1 }; + enum { UINT8 = 2 }; + enum { INT16 = 3 }; + enum { UINT16 = 4 }; + enum { INT32 = 5 }; + enum { UINT32 = 6 }; + enum { FLOAT32 = 7 }; + enum { FLOAT64 = 8 }; + + PointField(): + name(""), + offset(0), + datatype(0), + count(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + *(outbuffer + offset + 0) = (this->offset >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->offset >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->offset >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->offset >> (8 * 3)) & 0xFF; + offset += sizeof(this->offset); + *(outbuffer + offset + 0) = (this->datatype >> (8 * 0)) & 0xFF; + offset += sizeof(this->datatype); + *(outbuffer + offset + 0) = (this->count >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->count >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->count >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->count >> (8 * 3)) & 0xFF; + offset += sizeof(this->count); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + this->offset = ((uint32_t) (*(inbuffer + offset))); + this->offset |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->offset |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->offset |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->offset); + this->datatype = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->datatype); + this->count = ((uint32_t) (*(inbuffer + offset))); + this->count |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->count |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->count |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->count); + return offset; + } + + const char * getType(){ return "sensor_msgs/PointField"; }; + const char * getMD5(){ return "268eacb2962780ceac86cbd17e328150"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/Range.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/Range.h new file mode 100644 index 0000000000000000000000000000000000000000..bfa827e19bf54cddc332c2ff56d70e6ce606f902 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/Range.h @@ -0,0 +1,149 @@ +#ifndef _ROS_sensor_msgs_Range_h +#define _ROS_sensor_msgs_Range_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class Range : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef uint8_t _radiation_type_type; + _radiation_type_type radiation_type; + typedef float _field_of_view_type; + _field_of_view_type field_of_view; + typedef float _min_range_type; + _min_range_type min_range; + typedef float _max_range_type; + _max_range_type max_range; + typedef float _range_type; + _range_type range; + enum { ULTRASOUND = 0 }; + enum { INFRARED = 1 }; + + Range(): + header(), + radiation_type(0), + field_of_view(0), + min_range(0), + max_range(0), + range(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->radiation_type >> (8 * 0)) & 0xFF; + offset += sizeof(this->radiation_type); + union { + float real; + uint32_t base; + } u_field_of_view; + u_field_of_view.real = this->field_of_view; + *(outbuffer + offset + 0) = (u_field_of_view.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_field_of_view.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_field_of_view.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_field_of_view.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->field_of_view); + union { + float real; + uint32_t base; + } u_min_range; + u_min_range.real = this->min_range; + *(outbuffer + offset + 0) = (u_min_range.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_min_range.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_min_range.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_min_range.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->min_range); + union { + float real; + uint32_t base; + } u_max_range; + u_max_range.real = this->max_range; + *(outbuffer + offset + 0) = (u_max_range.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_range.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_range.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_range.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->max_range); + union { + float real; + uint32_t base; + } u_range; + u_range.real = this->range; + *(outbuffer + offset + 0) = (u_range.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_range.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_range.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_range.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->range); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->radiation_type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->radiation_type); + union { + float real; + uint32_t base; + } u_field_of_view; + u_field_of_view.base = 0; + u_field_of_view.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_field_of_view.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_field_of_view.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_field_of_view.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->field_of_view = u_field_of_view.real; + offset += sizeof(this->field_of_view); + union { + float real; + uint32_t base; + } u_min_range; + u_min_range.base = 0; + u_min_range.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_min_range.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_min_range.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_min_range.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->min_range = u_min_range.real; + offset += sizeof(this->min_range); + union { + float real; + uint32_t base; + } u_max_range; + u_max_range.base = 0; + u_max_range.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_range.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_range.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_range.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->max_range = u_max_range.real; + offset += sizeof(this->max_range); + union { + float real; + uint32_t base; + } u_range; + u_range.base = 0; + u_range.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_range.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_range.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_range.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->range = u_range.real; + offset += sizeof(this->range); + return offset; + } + + const char * getType(){ return "sensor_msgs/Range"; }; + const char * getMD5(){ return "c005c34273dc426c67a020a87bc24148"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/RegionOfInterest.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/RegionOfInterest.h new file mode 100644 index 0000000000000000000000000000000000000000..ea0c6634181da37be766c5f26549df5d904197ba --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/RegionOfInterest.h @@ -0,0 +1,108 @@ +#ifndef _ROS_sensor_msgs_RegionOfInterest_h +#define _ROS_sensor_msgs_RegionOfInterest_h + +#include +#include +#include +#include "ros/msg.h" + +namespace sensor_msgs +{ + + class RegionOfInterest : public ros::Msg + { + public: + typedef uint32_t _x_offset_type; + _x_offset_type x_offset; + typedef uint32_t _y_offset_type; + _y_offset_type y_offset; + typedef uint32_t _height_type; + _height_type height; + typedef uint32_t _width_type; + _width_type width; + typedef bool _do_rectify_type; + _do_rectify_type do_rectify; + + RegionOfInterest(): + x_offset(0), + y_offset(0), + height(0), + width(0), + do_rectify(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->x_offset >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->x_offset >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->x_offset >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->x_offset >> (8 * 3)) & 0xFF; + offset += sizeof(this->x_offset); + *(outbuffer + offset + 0) = (this->y_offset >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->y_offset >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->y_offset >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->y_offset >> (8 * 3)) & 0xFF; + offset += sizeof(this->y_offset); + *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF; + offset += sizeof(this->height); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF; + offset += sizeof(this->width); + union { + bool real; + uint8_t base; + } u_do_rectify; + u_do_rectify.real = this->do_rectify; + *(outbuffer + offset + 0) = (u_do_rectify.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->do_rectify); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->x_offset = ((uint32_t) (*(inbuffer + offset))); + this->x_offset |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->x_offset |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->x_offset |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->x_offset); + this->y_offset = ((uint32_t) (*(inbuffer + offset))); + this->y_offset |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->y_offset |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->y_offset |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->y_offset); + this->height = ((uint32_t) (*(inbuffer + offset))); + this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->height); + this->width = ((uint32_t) (*(inbuffer + offset))); + this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->width); + union { + bool real; + uint8_t base; + } u_do_rectify; + u_do_rectify.base = 0; + u_do_rectify.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->do_rectify = u_do_rectify.real; + offset += sizeof(this->do_rectify); + return offset; + } + + const char * getType(){ return "sensor_msgs/RegionOfInterest"; }; + const char * getMD5(){ return "bdb633039d588fcccb441a4d43ccfe09"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/RelativeHumidity.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/RelativeHumidity.h new file mode 100644 index 0000000000000000000000000000000000000000..a596f884a285e9b8c8f42355ab968a28b0cec6b0 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/RelativeHumidity.h @@ -0,0 +1,108 @@ +#ifndef _ROS_sensor_msgs_RelativeHumidity_h +#define _ROS_sensor_msgs_RelativeHumidity_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class RelativeHumidity : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef double _relative_humidity_type; + _relative_humidity_type relative_humidity; + typedef double _variance_type; + _variance_type variance; + + RelativeHumidity(): + header(), + relative_humidity(0), + variance(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_relative_humidity; + u_relative_humidity.real = this->relative_humidity; + *(outbuffer + offset + 0) = (u_relative_humidity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_relative_humidity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_relative_humidity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_relative_humidity.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_relative_humidity.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_relative_humidity.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_relative_humidity.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_relative_humidity.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->relative_humidity); + union { + double real; + uint64_t base; + } u_variance; + u_variance.real = this->variance; + *(outbuffer + offset + 0) = (u_variance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_variance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_variance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_variance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_variance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_variance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_variance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_variance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->variance); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_relative_humidity; + u_relative_humidity.base = 0; + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->relative_humidity = u_relative_humidity.real; + offset += sizeof(this->relative_humidity); + union { + double real; + uint64_t base; + } u_variance; + u_variance.base = 0; + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->variance = u_variance.real; + offset += sizeof(this->variance); + return offset; + } + + const char * getType(){ return "sensor_msgs/RelativeHumidity"; }; + const char * getMD5(){ return "8730015b05955b7e992ce29a2678d90f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/SetCameraInfo.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/SetCameraInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..3f838fb82dbca169853ac970436cf1953759cb49 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/SetCameraInfo.h @@ -0,0 +1,111 @@ +#ifndef _ROS_SERVICE_SetCameraInfo_h +#define _ROS_SERVICE_SetCameraInfo_h +#include +#include +#include +#include "ros/msg.h" +#include "sensor_msgs/CameraInfo.h" + +namespace sensor_msgs +{ + +static const char SETCAMERAINFO[] = "sensor_msgs/SetCameraInfo"; + + class SetCameraInfoRequest : public ros::Msg + { + public: + typedef sensor_msgs::CameraInfo _camera_info_type; + _camera_info_type camera_info; + + SetCameraInfoRequest(): + camera_info() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->camera_info.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->camera_info.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return SETCAMERAINFO; }; + const char * getMD5(){ return "ee34be01fdeee563d0d99cd594d5581d"; }; + + }; + + class SetCameraInfoResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetCameraInfoResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETCAMERAINFO; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetCameraInfo { + public: + typedef SetCameraInfoRequest Request; + typedef SetCameraInfoResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/Temperature.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/Temperature.h new file mode 100644 index 0000000000000000000000000000000000000000..4308487a2c2e2da02fce0f5a7a7981ab137f5b18 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/Temperature.h @@ -0,0 +1,108 @@ +#ifndef _ROS_sensor_msgs_Temperature_h +#define _ROS_sensor_msgs_Temperature_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class Temperature : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef double _temperature_type; + _temperature_type temperature; + typedef double _variance_type; + _variance_type variance; + + Temperature(): + header(), + temperature(0), + variance(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_temperature; + u_temperature.real = this->temperature; + *(outbuffer + offset + 0) = (u_temperature.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_temperature.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_temperature.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_temperature.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_temperature.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_temperature.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_temperature.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_temperature.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->temperature); + union { + double real; + uint64_t base; + } u_variance; + u_variance.real = this->variance; + *(outbuffer + offset + 0) = (u_variance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_variance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_variance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_variance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_variance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_variance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_variance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_variance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->variance); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_temperature; + u_temperature.base = 0; + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->temperature = u_temperature.real; + offset += sizeof(this->temperature); + union { + double real; + uint64_t base; + } u_variance; + u_variance.base = 0; + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->variance = u_variance.real; + offset += sizeof(this->variance); + return offset; + } + + const char * getType(){ return "sensor_msgs/Temperature"; }; + const char * getMD5(){ return "ff71b307acdbe7c871a5a6d7ed359100"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/TimeReference.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/TimeReference.h new file mode 100644 index 0000000000000000000000000000000000000000..ed81b28fb9689b11ed76c7e0bbad543780a072cd --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/sensor_msgs/TimeReference.h @@ -0,0 +1,85 @@ +#ifndef _ROS_sensor_msgs_TimeReference_h +#define _ROS_sensor_msgs_TimeReference_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "ros/time.h" + +namespace sensor_msgs +{ + + class TimeReference : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef ros::Time _time_ref_type; + _time_ref_type time_ref; + typedef const char* _source_type; + _source_type source; + + TimeReference(): + header(), + time_ref(), + source("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->time_ref.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_ref.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_ref.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_ref.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_ref.sec); + *(outbuffer + offset + 0) = (this->time_ref.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_ref.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_ref.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_ref.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_ref.nsec); + uint32_t length_source = strlen(this->source); + varToArr(outbuffer + offset, length_source); + offset += 4; + memcpy(outbuffer + offset, this->source, length_source); + offset += length_source; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->time_ref.sec = ((uint32_t) (*(inbuffer + offset))); + this->time_ref.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_ref.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_ref.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_ref.sec); + this->time_ref.nsec = ((uint32_t) (*(inbuffer + offset))); + this->time_ref.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_ref.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_ref.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_ref.nsec); + uint32_t length_source; + arrToVar(length_source, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_source; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_source-1]=0; + this->source = (char *)(inbuffer + offset-1); + offset += length_source; + return offset; + } + + const char * getType(){ return "sensor_msgs/TimeReference"; }; + const char * getMD5(){ return "fded64a0265108ba86c3d38fb11c0c16"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/shape_msgs/Mesh.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/shape_msgs/Mesh.h new file mode 100644 index 0000000000000000000000000000000000000000..3599765c53b8c76bbd121094f50e6c9da924a4dc --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/shape_msgs/Mesh.h @@ -0,0 +1,90 @@ +#ifndef _ROS_shape_msgs_Mesh_h +#define _ROS_shape_msgs_Mesh_h + +#include +#include +#include +#include "ros/msg.h" +#include "shape_msgs/MeshTriangle.h" +#include "geometry_msgs/Point.h" + +namespace shape_msgs +{ + + class Mesh : public ros::Msg + { + public: + uint32_t triangles_length; + typedef shape_msgs::MeshTriangle _triangles_type; + _triangles_type st_triangles; + _triangles_type * triangles; + uint32_t vertices_length; + typedef geometry_msgs::Point _vertices_type; + _vertices_type st_vertices; + _vertices_type * vertices; + + Mesh(): + triangles_length(0), triangles(NULL), + vertices_length(0), vertices(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->triangles_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->triangles_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->triangles_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->triangles_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->triangles_length); + for( uint32_t i = 0; i < triangles_length; i++){ + offset += this->triangles[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->vertices_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->vertices_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->vertices_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->vertices_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->vertices_length); + for( uint32_t i = 0; i < vertices_length; i++){ + offset += this->vertices[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t triangles_lengthT = ((uint32_t) (*(inbuffer + offset))); + triangles_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + triangles_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + triangles_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->triangles_length); + if(triangles_lengthT > triangles_length) + this->triangles = (shape_msgs::MeshTriangle*)realloc(this->triangles, triangles_lengthT * sizeof(shape_msgs::MeshTriangle)); + triangles_length = triangles_lengthT; + for( uint32_t i = 0; i < triangles_length; i++){ + offset += this->st_triangles.deserialize(inbuffer + offset); + memcpy( &(this->triangles[i]), &(this->st_triangles), sizeof(shape_msgs::MeshTriangle)); + } + uint32_t vertices_lengthT = ((uint32_t) (*(inbuffer + offset))); + vertices_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + vertices_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + vertices_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->vertices_length); + if(vertices_lengthT > vertices_length) + this->vertices = (geometry_msgs::Point*)realloc(this->vertices, vertices_lengthT * sizeof(geometry_msgs::Point)); + vertices_length = vertices_lengthT; + for( uint32_t i = 0; i < vertices_length; i++){ + offset += this->st_vertices.deserialize(inbuffer + offset); + memcpy( &(this->vertices[i]), &(this->st_vertices), sizeof(geometry_msgs::Point)); + } + return offset; + } + + const char * getType(){ return "shape_msgs/Mesh"; }; + const char * getMD5(){ return "1ffdae9486cd3316a121c578b47a85cc"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/shape_msgs/MeshTriangle.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/shape_msgs/MeshTriangle.h new file mode 100644 index 0000000000000000000000000000000000000000..b4aad1785a51ca8858aa1fc3eb13702faa51f6c4 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/shape_msgs/MeshTriangle.h @@ -0,0 +1,54 @@ +#ifndef _ROS_shape_msgs_MeshTriangle_h +#define _ROS_shape_msgs_MeshTriangle_h + +#include +#include +#include +#include "ros/msg.h" + +namespace shape_msgs +{ + + class MeshTriangle : public ros::Msg + { + public: + uint32_t vertex_indices[3]; + + MeshTriangle(): + vertex_indices() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + for( uint32_t i = 0; i < 3; i++){ + *(outbuffer + offset + 0) = (this->vertex_indices[i] >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->vertex_indices[i] >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->vertex_indices[i] >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->vertex_indices[i] >> (8 * 3)) & 0xFF; + offset += sizeof(this->vertex_indices[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + for( uint32_t i = 0; i < 3; i++){ + this->vertex_indices[i] = ((uint32_t) (*(inbuffer + offset))); + this->vertex_indices[i] |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->vertex_indices[i] |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->vertex_indices[i] |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->vertex_indices[i]); + } + return offset; + } + + const char * getType(){ return "shape_msgs/MeshTriangle"; }; + const char * getMD5(){ return "23688b2e6d2de3d32fe8af104a903253"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/shape_msgs/Plane.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/shape_msgs/Plane.h new file mode 100644 index 0000000000000000000000000000000000000000..6f4c33283e6f1b560b5d141b989510495f3d13c2 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/shape_msgs/Plane.h @@ -0,0 +1,73 @@ +#ifndef _ROS_shape_msgs_Plane_h +#define _ROS_shape_msgs_Plane_h + +#include +#include +#include +#include "ros/msg.h" + +namespace shape_msgs +{ + + class Plane : public ros::Msg + { + public: + double coef[4]; + + Plane(): + coef() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + for( uint32_t i = 0; i < 4; i++){ + union { + double real; + uint64_t base; + } u_coefi; + u_coefi.real = this->coef[i]; + *(outbuffer + offset + 0) = (u_coefi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_coefi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_coefi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_coefi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_coefi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_coefi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_coefi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_coefi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->coef[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + for( uint32_t i = 0; i < 4; i++){ + union { + double real; + uint64_t base; + } u_coefi; + u_coefi.base = 0; + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->coef[i] = u_coefi.real; + offset += sizeof(this->coef[i]); + } + return offset; + } + + const char * getType(){ return "shape_msgs/Plane"; }; + const char * getMD5(){ return "2c1b92ed8f31492f8e73f6a4a44ca796"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/shape_msgs/SolidPrimitive.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/shape_msgs/SolidPrimitive.h new file mode 100644 index 0000000000000000000000000000000000000000..4751ad84b802ce46a5370c604dcd42b2e32a561e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/shape_msgs/SolidPrimitive.h @@ -0,0 +1,109 @@ +#ifndef _ROS_shape_msgs_SolidPrimitive_h +#define _ROS_shape_msgs_SolidPrimitive_h + +#include +#include +#include +#include "ros/msg.h" + +namespace shape_msgs +{ + + class SolidPrimitive : public ros::Msg + { + public: + typedef uint8_t _type_type; + _type_type type; + uint32_t dimensions_length; + typedef double _dimensions_type; + _dimensions_type st_dimensions; + _dimensions_type * dimensions; + enum { BOX = 1 }; + enum { SPHERE = 2 }; + enum { CYLINDER = 3 }; + enum { CONE = 4 }; + enum { BOX_X = 0 }; + enum { BOX_Y = 1 }; + enum { BOX_Z = 2 }; + enum { SPHERE_RADIUS = 0 }; + enum { CYLINDER_HEIGHT = 0 }; + enum { CYLINDER_RADIUS = 1 }; + enum { CONE_HEIGHT = 0 }; + enum { CONE_RADIUS = 1 }; + + SolidPrimitive(): + type(0), + dimensions_length(0), dimensions(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->type >> (8 * 0)) & 0xFF; + offset += sizeof(this->type); + *(outbuffer + offset + 0) = (this->dimensions_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->dimensions_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->dimensions_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->dimensions_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->dimensions_length); + for( uint32_t i = 0; i < dimensions_length; i++){ + union { + double real; + uint64_t base; + } u_dimensionsi; + u_dimensionsi.real = this->dimensions[i]; + *(outbuffer + offset + 0) = (u_dimensionsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_dimensionsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_dimensionsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_dimensionsi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_dimensionsi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_dimensionsi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_dimensionsi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_dimensionsi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->dimensions[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->type); + uint32_t dimensions_lengthT = ((uint32_t) (*(inbuffer + offset))); + dimensions_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + dimensions_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + dimensions_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->dimensions_length); + if(dimensions_lengthT > dimensions_length) + this->dimensions = (double*)realloc(this->dimensions, dimensions_lengthT * sizeof(double)); + dimensions_length = dimensions_lengthT; + for( uint32_t i = 0; i < dimensions_length; i++){ + union { + double real; + uint64_t base; + } u_st_dimensions; + u_st_dimensions.base = 0; + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_dimensions = u_st_dimensions.real; + offset += sizeof(this->st_dimensions); + memcpy( &(this->dimensions[i]), &(this->st_dimensions), sizeof(double)); + } + return offset; + } + + const char * getType(){ return "shape_msgs/SolidPrimitive"; }; + const char * getMD5(){ return "d8f8cbc74c5ff283fca29569ccefb45d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/smach_msgs/SmachContainerInitialStatusCmd.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/smach_msgs/SmachContainerInitialStatusCmd.h new file mode 100644 index 0000000000000000000000000000000000000000..bd1e131c81d15d730c69b379c3c40d39cfaec5aa --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/smach_msgs/SmachContainerInitialStatusCmd.h @@ -0,0 +1,109 @@ +#ifndef _ROS_smach_msgs_SmachContainerInitialStatusCmd_h +#define _ROS_smach_msgs_SmachContainerInitialStatusCmd_h + +#include +#include +#include +#include "ros/msg.h" + +namespace smach_msgs +{ + + class SmachContainerInitialStatusCmd : public ros::Msg + { + public: + typedef const char* _path_type; + _path_type path; + uint32_t initial_states_length; + typedef char* _initial_states_type; + _initial_states_type st_initial_states; + _initial_states_type * initial_states; + typedef const char* _local_data_type; + _local_data_type local_data; + + SmachContainerInitialStatusCmd(): + path(""), + initial_states_length(0), initial_states(NULL), + local_data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_path = strlen(this->path); + varToArr(outbuffer + offset, length_path); + offset += 4; + memcpy(outbuffer + offset, this->path, length_path); + offset += length_path; + *(outbuffer + offset + 0) = (this->initial_states_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->initial_states_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->initial_states_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->initial_states_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->initial_states_length); + for( uint32_t i = 0; i < initial_states_length; i++){ + uint32_t length_initial_statesi = strlen(this->initial_states[i]); + varToArr(outbuffer + offset, length_initial_statesi); + offset += 4; + memcpy(outbuffer + offset, this->initial_states[i], length_initial_statesi); + offset += length_initial_statesi; + } + uint32_t length_local_data = strlen(this->local_data); + varToArr(outbuffer + offset, length_local_data); + offset += 4; + memcpy(outbuffer + offset, this->local_data, length_local_data); + offset += length_local_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_path; + arrToVar(length_path, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_path; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_path-1]=0; + this->path = (char *)(inbuffer + offset-1); + offset += length_path; + uint32_t initial_states_lengthT = ((uint32_t) (*(inbuffer + offset))); + initial_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + initial_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + initial_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->initial_states_length); + if(initial_states_lengthT > initial_states_length) + this->initial_states = (char**)realloc(this->initial_states, initial_states_lengthT * sizeof(char*)); + initial_states_length = initial_states_lengthT; + for( uint32_t i = 0; i < initial_states_length; i++){ + uint32_t length_st_initial_states; + arrToVar(length_st_initial_states, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_initial_states; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_initial_states-1]=0; + this->st_initial_states = (char *)(inbuffer + offset-1); + offset += length_st_initial_states; + memcpy( &(this->initial_states[i]), &(this->st_initial_states), sizeof(char*)); + } + uint32_t length_local_data; + arrToVar(length_local_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_local_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_local_data-1]=0; + this->local_data = (char *)(inbuffer + offset-1); + offset += length_local_data; + return offset; + } + + const char * getType(){ return "smach_msgs/SmachContainerInitialStatusCmd"; }; + const char * getMD5(){ return "45f8cf31fc29b829db77f23001f788d6"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/smach_msgs/SmachContainerStatus.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/smach_msgs/SmachContainerStatus.h new file mode 100644 index 0000000000000000000000000000000000000000..8c54da30d8ca7008710692b3dbaab85883c03771 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/smach_msgs/SmachContainerStatus.h @@ -0,0 +1,169 @@ +#ifndef _ROS_smach_msgs_SmachContainerStatus_h +#define _ROS_smach_msgs_SmachContainerStatus_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace smach_msgs +{ + + class SmachContainerStatus : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _path_type; + _path_type path; + uint32_t initial_states_length; + typedef char* _initial_states_type; + _initial_states_type st_initial_states; + _initial_states_type * initial_states; + uint32_t active_states_length; + typedef char* _active_states_type; + _active_states_type st_active_states; + _active_states_type * active_states; + typedef const char* _local_data_type; + _local_data_type local_data; + typedef const char* _info_type; + _info_type info; + + SmachContainerStatus(): + header(), + path(""), + initial_states_length(0), initial_states(NULL), + active_states_length(0), active_states(NULL), + local_data(""), + info("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_path = strlen(this->path); + varToArr(outbuffer + offset, length_path); + offset += 4; + memcpy(outbuffer + offset, this->path, length_path); + offset += length_path; + *(outbuffer + offset + 0) = (this->initial_states_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->initial_states_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->initial_states_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->initial_states_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->initial_states_length); + for( uint32_t i = 0; i < initial_states_length; i++){ + uint32_t length_initial_statesi = strlen(this->initial_states[i]); + varToArr(outbuffer + offset, length_initial_statesi); + offset += 4; + memcpy(outbuffer + offset, this->initial_states[i], length_initial_statesi); + offset += length_initial_statesi; + } + *(outbuffer + offset + 0) = (this->active_states_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->active_states_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->active_states_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->active_states_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->active_states_length); + for( uint32_t i = 0; i < active_states_length; i++){ + uint32_t length_active_statesi = strlen(this->active_states[i]); + varToArr(outbuffer + offset, length_active_statesi); + offset += 4; + memcpy(outbuffer + offset, this->active_states[i], length_active_statesi); + offset += length_active_statesi; + } + uint32_t length_local_data = strlen(this->local_data); + varToArr(outbuffer + offset, length_local_data); + offset += 4; + memcpy(outbuffer + offset, this->local_data, length_local_data); + offset += length_local_data; + uint32_t length_info = strlen(this->info); + varToArr(outbuffer + offset, length_info); + offset += 4; + memcpy(outbuffer + offset, this->info, length_info); + offset += length_info; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_path; + arrToVar(length_path, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_path; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_path-1]=0; + this->path = (char *)(inbuffer + offset-1); + offset += length_path; + uint32_t initial_states_lengthT = ((uint32_t) (*(inbuffer + offset))); + initial_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + initial_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + initial_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->initial_states_length); + if(initial_states_lengthT > initial_states_length) + this->initial_states = (char**)realloc(this->initial_states, initial_states_lengthT * sizeof(char*)); + initial_states_length = initial_states_lengthT; + for( uint32_t i = 0; i < initial_states_length; i++){ + uint32_t length_st_initial_states; + arrToVar(length_st_initial_states, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_initial_states; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_initial_states-1]=0; + this->st_initial_states = (char *)(inbuffer + offset-1); + offset += length_st_initial_states; + memcpy( &(this->initial_states[i]), &(this->st_initial_states), sizeof(char*)); + } + uint32_t active_states_lengthT = ((uint32_t) (*(inbuffer + offset))); + active_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + active_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + active_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->active_states_length); + if(active_states_lengthT > active_states_length) + this->active_states = (char**)realloc(this->active_states, active_states_lengthT * sizeof(char*)); + active_states_length = active_states_lengthT; + for( uint32_t i = 0; i < active_states_length; i++){ + uint32_t length_st_active_states; + arrToVar(length_st_active_states, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_active_states; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_active_states-1]=0; + this->st_active_states = (char *)(inbuffer + offset-1); + offset += length_st_active_states; + memcpy( &(this->active_states[i]), &(this->st_active_states), sizeof(char*)); + } + uint32_t length_local_data; + arrToVar(length_local_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_local_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_local_data-1]=0; + this->local_data = (char *)(inbuffer + offset-1); + offset += length_local_data; + uint32_t length_info; + arrToVar(length_info, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_info; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_info-1]=0; + this->info = (char *)(inbuffer + offset-1); + offset += length_info; + return offset; + } + + const char * getType(){ return "smach_msgs/SmachContainerStatus"; }; + const char * getMD5(){ return "5ba2bb79ac19e3842d562a191f2a675b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/smach_msgs/SmachContainerStructure.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/smach_msgs/SmachContainerStructure.h new file mode 100644 index 0000000000000000000000000000000000000000..935b7e1e264beee67f9af8bae95f7d1d7a492ce2 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/smach_msgs/SmachContainerStructure.h @@ -0,0 +1,246 @@ +#ifndef _ROS_smach_msgs_SmachContainerStructure_h +#define _ROS_smach_msgs_SmachContainerStructure_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace smach_msgs +{ + + class SmachContainerStructure : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _path_type; + _path_type path; + uint32_t children_length; + typedef char* _children_type; + _children_type st_children; + _children_type * children; + uint32_t internal_outcomes_length; + typedef char* _internal_outcomes_type; + _internal_outcomes_type st_internal_outcomes; + _internal_outcomes_type * internal_outcomes; + uint32_t outcomes_from_length; + typedef char* _outcomes_from_type; + _outcomes_from_type st_outcomes_from; + _outcomes_from_type * outcomes_from; + uint32_t outcomes_to_length; + typedef char* _outcomes_to_type; + _outcomes_to_type st_outcomes_to; + _outcomes_to_type * outcomes_to; + uint32_t container_outcomes_length; + typedef char* _container_outcomes_type; + _container_outcomes_type st_container_outcomes; + _container_outcomes_type * container_outcomes; + + SmachContainerStructure(): + header(), + path(""), + children_length(0), children(NULL), + internal_outcomes_length(0), internal_outcomes(NULL), + outcomes_from_length(0), outcomes_from(NULL), + outcomes_to_length(0), outcomes_to(NULL), + container_outcomes_length(0), container_outcomes(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_path = strlen(this->path); + varToArr(outbuffer + offset, length_path); + offset += 4; + memcpy(outbuffer + offset, this->path, length_path); + offset += length_path; + *(outbuffer + offset + 0) = (this->children_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->children_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->children_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->children_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->children_length); + for( uint32_t i = 0; i < children_length; i++){ + uint32_t length_childreni = strlen(this->children[i]); + varToArr(outbuffer + offset, length_childreni); + offset += 4; + memcpy(outbuffer + offset, this->children[i], length_childreni); + offset += length_childreni; + } + *(outbuffer + offset + 0) = (this->internal_outcomes_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->internal_outcomes_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->internal_outcomes_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->internal_outcomes_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->internal_outcomes_length); + for( uint32_t i = 0; i < internal_outcomes_length; i++){ + uint32_t length_internal_outcomesi = strlen(this->internal_outcomes[i]); + varToArr(outbuffer + offset, length_internal_outcomesi); + offset += 4; + memcpy(outbuffer + offset, this->internal_outcomes[i], length_internal_outcomesi); + offset += length_internal_outcomesi; + } + *(outbuffer + offset + 0) = (this->outcomes_from_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->outcomes_from_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->outcomes_from_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->outcomes_from_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->outcomes_from_length); + for( uint32_t i = 0; i < outcomes_from_length; i++){ + uint32_t length_outcomes_fromi = strlen(this->outcomes_from[i]); + varToArr(outbuffer + offset, length_outcomes_fromi); + offset += 4; + memcpy(outbuffer + offset, this->outcomes_from[i], length_outcomes_fromi); + offset += length_outcomes_fromi; + } + *(outbuffer + offset + 0) = (this->outcomes_to_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->outcomes_to_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->outcomes_to_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->outcomes_to_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->outcomes_to_length); + for( uint32_t i = 0; i < outcomes_to_length; i++){ + uint32_t length_outcomes_toi = strlen(this->outcomes_to[i]); + varToArr(outbuffer + offset, length_outcomes_toi); + offset += 4; + memcpy(outbuffer + offset, this->outcomes_to[i], length_outcomes_toi); + offset += length_outcomes_toi; + } + *(outbuffer + offset + 0) = (this->container_outcomes_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->container_outcomes_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->container_outcomes_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->container_outcomes_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->container_outcomes_length); + for( uint32_t i = 0; i < container_outcomes_length; i++){ + uint32_t length_container_outcomesi = strlen(this->container_outcomes[i]); + varToArr(outbuffer + offset, length_container_outcomesi); + offset += 4; + memcpy(outbuffer + offset, this->container_outcomes[i], length_container_outcomesi); + offset += length_container_outcomesi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_path; + arrToVar(length_path, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_path; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_path-1]=0; + this->path = (char *)(inbuffer + offset-1); + offset += length_path; + uint32_t children_lengthT = ((uint32_t) (*(inbuffer + offset))); + children_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + children_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + children_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->children_length); + if(children_lengthT > children_length) + this->children = (char**)realloc(this->children, children_lengthT * sizeof(char*)); + children_length = children_lengthT; + for( uint32_t i = 0; i < children_length; i++){ + uint32_t length_st_children; + arrToVar(length_st_children, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_children; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_children-1]=0; + this->st_children = (char *)(inbuffer + offset-1); + offset += length_st_children; + memcpy( &(this->children[i]), &(this->st_children), sizeof(char*)); + } + uint32_t internal_outcomes_lengthT = ((uint32_t) (*(inbuffer + offset))); + internal_outcomes_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + internal_outcomes_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + internal_outcomes_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->internal_outcomes_length); + if(internal_outcomes_lengthT > internal_outcomes_length) + this->internal_outcomes = (char**)realloc(this->internal_outcomes, internal_outcomes_lengthT * sizeof(char*)); + internal_outcomes_length = internal_outcomes_lengthT; + for( uint32_t i = 0; i < internal_outcomes_length; i++){ + uint32_t length_st_internal_outcomes; + arrToVar(length_st_internal_outcomes, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_internal_outcomes; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_internal_outcomes-1]=0; + this->st_internal_outcomes = (char *)(inbuffer + offset-1); + offset += length_st_internal_outcomes; + memcpy( &(this->internal_outcomes[i]), &(this->st_internal_outcomes), sizeof(char*)); + } + uint32_t outcomes_from_lengthT = ((uint32_t) (*(inbuffer + offset))); + outcomes_from_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + outcomes_from_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + outcomes_from_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->outcomes_from_length); + if(outcomes_from_lengthT > outcomes_from_length) + this->outcomes_from = (char**)realloc(this->outcomes_from, outcomes_from_lengthT * sizeof(char*)); + outcomes_from_length = outcomes_from_lengthT; + for( uint32_t i = 0; i < outcomes_from_length; i++){ + uint32_t length_st_outcomes_from; + arrToVar(length_st_outcomes_from, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_outcomes_from; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_outcomes_from-1]=0; + this->st_outcomes_from = (char *)(inbuffer + offset-1); + offset += length_st_outcomes_from; + memcpy( &(this->outcomes_from[i]), &(this->st_outcomes_from), sizeof(char*)); + } + uint32_t outcomes_to_lengthT = ((uint32_t) (*(inbuffer + offset))); + outcomes_to_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + outcomes_to_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + outcomes_to_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->outcomes_to_length); + if(outcomes_to_lengthT > outcomes_to_length) + this->outcomes_to = (char**)realloc(this->outcomes_to, outcomes_to_lengthT * sizeof(char*)); + outcomes_to_length = outcomes_to_lengthT; + for( uint32_t i = 0; i < outcomes_to_length; i++){ + uint32_t length_st_outcomes_to; + arrToVar(length_st_outcomes_to, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_outcomes_to; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_outcomes_to-1]=0; + this->st_outcomes_to = (char *)(inbuffer + offset-1); + offset += length_st_outcomes_to; + memcpy( &(this->outcomes_to[i]), &(this->st_outcomes_to), sizeof(char*)); + } + uint32_t container_outcomes_lengthT = ((uint32_t) (*(inbuffer + offset))); + container_outcomes_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + container_outcomes_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + container_outcomes_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->container_outcomes_length); + if(container_outcomes_lengthT > container_outcomes_length) + this->container_outcomes = (char**)realloc(this->container_outcomes, container_outcomes_lengthT * sizeof(char*)); + container_outcomes_length = container_outcomes_lengthT; + for( uint32_t i = 0; i < container_outcomes_length; i++){ + uint32_t length_st_container_outcomes; + arrToVar(length_st_container_outcomes, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_container_outcomes; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_container_outcomes-1]=0; + this->st_container_outcomes = (char *)(inbuffer + offset-1); + offset += length_st_container_outcomes; + memcpy( &(this->container_outcomes[i]), &(this->st_container_outcomes), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return "smach_msgs/SmachContainerStructure"; }; + const char * getMD5(){ return "3d3d1e0d0f99779ee9e58101a5dcf7ea"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/statistics_msgs/Stats1D.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/statistics_msgs/Stats1D.h new file mode 100644 index 0000000000000000000000000000000000000000..9b3b256159b78f6fdf7b7aa1440cd25ec0afa4fb --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/statistics_msgs/Stats1D.h @@ -0,0 +1,198 @@ +#ifndef _ROS_statistics_msgs_Stats1D_h +#define _ROS_statistics_msgs_Stats1D_h + +#include +#include +#include +#include "ros/msg.h" + +namespace statistics_msgs +{ + + class Stats1D : public ros::Msg + { + public: + typedef double _min_type; + _min_type min; + typedef double _max_type; + _max_type max; + typedef double _mean_type; + _mean_type mean; + typedef double _variance_type; + _variance_type variance; + typedef int64_t _N_type; + _N_type N; + + Stats1D(): + min(0), + max(0), + mean(0), + variance(0), + N(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_min; + u_min.real = this->min; + *(outbuffer + offset + 0) = (u_min.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_min.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_min.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_min.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_min.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_min.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_min.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_min.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->min); + union { + double real; + uint64_t base; + } u_max; + u_max.real = this->max; + *(outbuffer + offset + 0) = (u_max.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max); + union { + double real; + uint64_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; + *(outbuffer + offset + 4) = (u_mean.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_mean.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_mean.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_mean.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->mean); + union { + double real; + uint64_t base; + } u_variance; + u_variance.real = this->variance; + *(outbuffer + offset + 0) = (u_variance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_variance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_variance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_variance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_variance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_variance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_variance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_variance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->variance); + union { + int64_t real; + uint64_t base; + } u_N; + u_N.real = this->N; + *(outbuffer + offset + 0) = (u_N.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_N.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_N.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_N.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_N.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_N.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_N.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_N.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->N); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_min; + u_min.base = 0; + u_min.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_min.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_min.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_min.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_min.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_min.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_min.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_min.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->min = u_min.real; + offset += sizeof(this->min); + union { + double real; + uint64_t base; + } u_max; + u_max.base = 0; + u_max.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max = u_max.real; + offset += sizeof(this->max); + union { + double real; + uint64_t base; + } u_mean; + u_mean.base = 0; + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->mean = u_mean.real; + offset += sizeof(this->mean); + union { + double real; + uint64_t base; + } u_variance; + u_variance.base = 0; + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->variance = u_variance.real; + offset += sizeof(this->variance); + union { + int64_t real; + uint64_t base; + } u_N; + u_N.base = 0; + u_N.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_N.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_N.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_N.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_N.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_N.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_N.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_N.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->N = u_N.real; + offset += sizeof(this->N); + return offset; + } + + const char * getType(){ return "statistics_msgs/Stats1D"; }; + const char * getMD5(){ return "5e29efbcd70d63a82b5ddfac24a5bc4b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Bool.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Bool.h new file mode 100644 index 0000000000000000000000000000000000000000..6641dd0f52728abf0aa03c70c7fc97ab3f4ec3f5 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Bool.h @@ -0,0 +1,56 @@ +#ifndef _ROS_std_msgs_Bool_h +#define _ROS_std_msgs_Bool_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Bool : public ros::Msg + { + public: + typedef bool _data_type; + _data_type data; + + Bool(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_data; + u_data.real = this->data; + *(outbuffer + offset + 0) = (u_data.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_data; + u_data.base = 0; + u_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->data = u_data.real; + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/Bool"; }; + const char * getMD5(){ return "8b94c1b53db61fb6aed406028ad6332a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Byte.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Byte.h new file mode 100644 index 0000000000000000000000000000000000000000..bf81f6fad3e5fb9f2c1dadda9d891eb72a5f971d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Byte.h @@ -0,0 +1,56 @@ +#ifndef _ROS_std_msgs_Byte_h +#define _ROS_std_msgs_Byte_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Byte : public ros::Msg + { + public: + typedef int8_t _data_type; + _data_type data; + + Byte(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_data; + u_data.real = this->data; + *(outbuffer + offset + 0) = (u_data.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_data; + u_data.base = 0; + u_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->data = u_data.real; + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/Byte"; }; + const char * getMD5(){ return "ad736a2e8818154c487bb80fe42ce43b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/ByteMultiArray.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/ByteMultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..bf3f8b4909eb9167591bfad8bb094834b549d250 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/ByteMultiArray.h @@ -0,0 +1,82 @@ +#ifndef _ROS_std_msgs_ByteMultiArray_h +#define _ROS_std_msgs_ByteMultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class ByteMultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef int8_t _data_type; + _data_type st_data; + _data_type * data; + + ByteMultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (int8_t*)realloc(this->data, data_lengthT * sizeof(int8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(int8_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/ByteMultiArray"; }; + const char * getMD5(){ return "70ea476cbcfd65ac2f68f3cda1e891fe"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Char.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Char.h new file mode 100644 index 0000000000000000000000000000000000000000..ab3340fb9ace6666af471271003096d3915d1c36 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Char.h @@ -0,0 +1,45 @@ +#ifndef _ROS_std_msgs_Char_h +#define _ROS_std_msgs_Char_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Char : public ros::Msg + { + public: + typedef uint8_t _data_type; + _data_type data; + + Char(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->data >> (8 * 0)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/Char"; }; + const char * getMD5(){ return "1bf77f25acecdedba0e224b162199717"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/ColorRGBA.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/ColorRGBA.h new file mode 100644 index 0000000000000000000000000000000000000000..e782d2fd0ee1e1d82601d6d4afae55ab330dc071 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/ColorRGBA.h @@ -0,0 +1,134 @@ +#ifndef _ROS_std_msgs_ColorRGBA_h +#define _ROS_std_msgs_ColorRGBA_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class ColorRGBA : public ros::Msg + { + public: + typedef float _r_type; + _r_type r; + typedef float _g_type; + _g_type g; + typedef float _b_type; + _b_type b; + typedef float _a_type; + _a_type a; + + ColorRGBA(): + r(0), + g(0), + b(0), + a(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_r; + u_r.real = this->r; + *(outbuffer + offset + 0) = (u_r.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_r.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_r.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_r.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->r); + union { + float real; + uint32_t base; + } u_g; + u_g.real = this->g; + *(outbuffer + offset + 0) = (u_g.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_g.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_g.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_g.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->g); + union { + float real; + uint32_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; + offset += sizeof(this->b); + union { + float real; + uint32_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; + offset += sizeof(this->a); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_r; + u_r.base = 0; + u_r.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_r.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_r.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_r.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->r = u_r.real; + offset += sizeof(this->r); + union { + float real; + uint32_t base; + } u_g; + u_g.base = 0; + u_g.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_g.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_g.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_g.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->g = u_g.real; + offset += sizeof(this->g); + union { + float real; + uint32_t base; + } u_b; + u_b.base = 0; + u_b.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_b.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_b.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_b.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->b = u_b.real; + offset += sizeof(this->b); + union { + float real; + uint32_t base; + } u_a; + u_a.base = 0; + u_a.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_a.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_a.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_a.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->a = u_a.real; + offset += sizeof(this->a); + return offset; + } + + const char * getType(){ return "std_msgs/ColorRGBA"; }; + const char * getMD5(){ return "a29a96539573343b1310c73607334b00"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Duration.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Duration.h new file mode 100644 index 0000000000000000000000000000000000000000..9373f3569e0b9eece42305e3e592d81cb2e2f15b --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Duration.h @@ -0,0 +1,62 @@ +#ifndef _ROS_std_msgs_Duration_h +#define _ROS_std_msgs_Duration_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/duration.h" + +namespace std_msgs +{ + + class Duration : public ros::Msg + { + public: + typedef ros::Duration _data_type; + _data_type data; + + Duration(): + data() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->data.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->data.sec); + *(outbuffer + offset + 0) = (this->data.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->data.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->data.sec = ((uint32_t) (*(inbuffer + offset))); + this->data.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->data.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->data.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data.sec); + this->data.nsec = ((uint32_t) (*(inbuffer + offset))); + this->data.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->data.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->data.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data.nsec); + return offset; + } + + const char * getType(){ return "std_msgs/Duration"; }; + const char * getMD5(){ return "3e286caf4241d664e55f3ad380e2ae46"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Empty.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Empty.h new file mode 100644 index 0000000000000000000000000000000000000000..440e5edc4bab6237b1d90e82e59fa46140bd02db --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Empty.h @@ -0,0 +1,38 @@ +#ifndef _ROS_std_msgs_Empty_h +#define _ROS_std_msgs_Empty_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Empty : public ros::Msg + { + public: + + Empty() + { + } + + 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 "std_msgs/Empty"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Float32.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Float32.h new file mode 100644 index 0000000000000000000000000000000000000000..07fc43525ae393efae8f1f1c0ef0dd27c0961d83 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Float32.h @@ -0,0 +1,62 @@ +#ifndef _ROS_std_msgs_Float32_h +#define _ROS_std_msgs_Float32_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Float32 : public ros::Msg + { + public: + typedef float _data_type; + _data_type data; + + Float32(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + 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); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + 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); + return offset; + } + + const char * getType(){ return "std_msgs/Float32"; }; + const char * getMD5(){ return "73fcbf46b49191e672908e50842a83d4"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Float32MultiArray.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Float32MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..08800d06623b38a7f350ef62b97b822cb7d11cad --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Float32MultiArray.h @@ -0,0 +1,88 @@ +#ifndef _ROS_std_msgs_Float32MultiArray_h +#define _ROS_std_msgs_Float32MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class Float32MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef float _data_type; + _data_type st_data; + _data_type * data; + + Float32MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + float real; + uint32_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_datai.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_datai.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_datai.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (float*)realloc(this->data, data_lengthT * sizeof(float)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + float real; + uint32_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(float)); + } + return offset; + } + + const char * getType(){ return "std_msgs/Float32MultiArray"; }; + const char * getMD5(){ return "6a40e0ffa6a17a503ac3f8616991b1f6"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Float64.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Float64.h new file mode 100644 index 0000000000000000000000000000000000000000..b566cb64b3de0c033e4e299b75cf6d44a48e2472 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Float64.h @@ -0,0 +1,70 @@ +#ifndef _ROS_std_msgs_Float64_h +#define _ROS_std_msgs_Float64_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Float64 : public ros::Msg + { + public: + typedef double _data_type; + _data_type data; + + Float64(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_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; + *(outbuffer + offset + 4) = (u_data.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_data.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_data.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_data.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_data; + u_data.base = 0; + u_data.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->data = u_data.real; + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/Float64"; }; + const char * getMD5(){ return "fdb28210bfa9d7c91146260178d9a584"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Float64MultiArray.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Float64MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..219abe6b20ef3648b8309367c488f32dd2a1e8d4 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Float64MultiArray.h @@ -0,0 +1,96 @@ +#ifndef _ROS_std_msgs_Float64MultiArray_h +#define _ROS_std_msgs_Float64MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class Float64MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef double _data_type; + _data_type st_data; + _data_type * data; + + Float64MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + double real; + uint64_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_datai.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_datai.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_datai.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_datai.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_datai.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_datai.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_datai.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (double*)realloc(this->data, data_lengthT * sizeof(double)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + double real; + uint64_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(double)); + } + return offset; + } + + const char * getType(){ return "std_msgs/Float64MultiArray"; }; + const char * getMD5(){ return "4b7d974086d4060e7db4613a7e6c3ba4"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Header.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Header.h new file mode 100644 index 0000000000000000000000000000000000000000..658bd8434f8f93964a8cccff93dc9f7604640734 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Header.h @@ -0,0 +1,92 @@ +#ifndef _ROS_std_msgs_Header_h +#define _ROS_std_msgs_Header_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../ros/time.h" + +namespace std_msgs +{ + + class Header : public ros::Msg + { + public: + typedef uint32_t _seq_type; + _seq_type seq; + typedef ros::Time _stamp_type; + _stamp_type stamp; + typedef const char* _frame_id_type; + _frame_id_type frame_id; + + Header(): + seq(0), + stamp(), + frame_id("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->seq >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->seq >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->seq >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->seq >> (8 * 3)) & 0xFF; + offset += sizeof(this->seq); + *(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_frame_id = strlen(this->frame_id); + varToArr(outbuffer + offset, length_frame_id); + offset += 4; + memcpy(outbuffer + offset, this->frame_id, length_frame_id); + offset += length_frame_id; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->seq = ((uint32_t) (*(inbuffer + offset))); + this->seq |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->seq |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->seq |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->seq); + 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_frame_id; + arrToVar(length_frame_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_frame_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_frame_id-1]=0; + this->frame_id = (char *)(inbuffer + offset-1); + offset += length_frame_id; + return offset; + } + + const char * getType(){ return "std_msgs/Header"; }; + const char * getMD5(){ return "2176decaecbce78abc3b96ef049fabed"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int16.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int16.h new file mode 100644 index 0000000000000000000000000000000000000000..8699431c0ef3f2fdb38d8fd0855abb60b70e5233 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int16.h @@ -0,0 +1,58 @@ +#ifndef _ROS_std_msgs_Int16_h +#define _ROS_std_msgs_Int16_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Int16 : public ros::Msg + { + public: + typedef int16_t _data_type; + _data_type data; + + Int16(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int16_t real; + uint16_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; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int16_t real; + uint16_t base; + } u_data; + u_data.base = 0; + u_data.base |= ((uint16_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_data.base |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->data = u_data.real; + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/Int16"; }; + const char * getMD5(){ return "8524586e34fbd7cb1c08c5f5f1ca0e57"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int16MultiArray.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int16MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..09a685a7713378d2e8fab337778d410665d77218 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int16MultiArray.h @@ -0,0 +1,84 @@ +#ifndef _ROS_std_msgs_Int16MultiArray_h +#define _ROS_std_msgs_Int16MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class Int16MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef int16_t _data_type; + _data_type st_data; + _data_type * data; + + Int16MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + int16_t real; + uint16_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_datai.base >> (8 * 1)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (int16_t*)realloc(this->data, data_lengthT * sizeof(int16_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + int16_t real; + uint16_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint16_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_data.base |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(int16_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/Int16MultiArray"; }; + const char * getMD5(){ return "d9338d7f523fcb692fae9d0a0e9f067c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int32.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int32.h new file mode 100644 index 0000000000000000000000000000000000000000..1f33bbd7b7970a9041d5aee3b7a91c02c7aec373 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int32.h @@ -0,0 +1,62 @@ +#ifndef _ROS_std_msgs_Int32_h +#define _ROS_std_msgs_Int32_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Int32 : public ros::Msg + { + public: + typedef int32_t _data_type; + _data_type data; + + Int32(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int32_t 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); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int32_t 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); + return offset; + } + + const char * getType(){ return "std_msgs/Int32"; }; + const char * getMD5(){ return "da5909fbe378aeaf85e547e830cc1bb7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int32MultiArray.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int32MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..9dc349dddca047ef9cb3b7a88264fa95024b20b5 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int32MultiArray.h @@ -0,0 +1,88 @@ +#ifndef _ROS_std_msgs_Int32MultiArray_h +#define _ROS_std_msgs_Int32MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class Int32MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef int32_t _data_type; + _data_type st_data; + _data_type * data; + + Int32MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + int32_t real; + uint32_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_datai.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_datai.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_datai.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (int32_t*)realloc(this->data, data_lengthT * sizeof(int32_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + int32_t real; + uint32_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(int32_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/Int32MultiArray"; }; + const char * getMD5(){ return "1d99f79f8b325b44fee908053e9c945b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int64.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int64.h new file mode 100644 index 0000000000000000000000000000000000000000..9edec3b1675050fe1707ae48c4334a70754b7bc5 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int64.h @@ -0,0 +1,70 @@ +#ifndef _ROS_std_msgs_Int64_h +#define _ROS_std_msgs_Int64_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Int64 : public ros::Msg + { + public: + typedef int64_t _data_type; + _data_type data; + + Int64(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int64_t real; + uint64_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; + *(outbuffer + offset + 4) = (u_data.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_data.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_data.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_data.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int64_t real; + uint64_t base; + } u_data; + u_data.base = 0; + u_data.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->data = u_data.real; + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/Int64"; }; + const char * getMD5(){ return "34add168574510e6e17f5d23ecc077ef"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int64MultiArray.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int64MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..78157568ca5718f5872b2bbfe10d33b844ccf951 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int64MultiArray.h @@ -0,0 +1,96 @@ +#ifndef _ROS_std_msgs_Int64MultiArray_h +#define _ROS_std_msgs_Int64MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class Int64MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef int64_t _data_type; + _data_type st_data; + _data_type * data; + + Int64MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + int64_t real; + uint64_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_datai.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_datai.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_datai.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_datai.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_datai.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_datai.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_datai.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (int64_t*)realloc(this->data, data_lengthT * sizeof(int64_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + int64_t real; + uint64_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(int64_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/Int64MultiArray"; }; + const char * getMD5(){ return "54865aa6c65be0448113a2afc6a49270"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int8.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int8.h new file mode 100644 index 0000000000000000000000000000000000000000..9509136e8945d06cee88db19972e01d603b6ae5d --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int8.h @@ -0,0 +1,56 @@ +#ifndef _ROS_std_msgs_Int8_h +#define _ROS_std_msgs_Int8_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Int8 : public ros::Msg + { + public: + typedef int8_t _data_type; + _data_type data; + + Int8(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_data; + u_data.real = this->data; + *(outbuffer + offset + 0) = (u_data.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_data; + u_data.base = 0; + u_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->data = u_data.real; + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/Int8"; }; + const char * getMD5(){ return "27ffa0c9c4b8fb8492252bcad9e5c57b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int8MultiArray.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int8MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..38921a955e2e7ea7baaea1a4bee3a71e3be12bc1 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Int8MultiArray.h @@ -0,0 +1,82 @@ +#ifndef _ROS_std_msgs_Int8MultiArray_h +#define _ROS_std_msgs_Int8MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class Int8MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef int8_t _data_type; + _data_type st_data; + _data_type * data; + + Int8MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (int8_t*)realloc(this->data, data_lengthT * sizeof(int8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(int8_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/Int8MultiArray"; }; + const char * getMD5(){ return "d7c1af35a1b4781bbe79e03dd94b7c13"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/MultiArrayDimension.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/MultiArrayDimension.h new file mode 100644 index 0000000000000000000000000000000000000000..72cb41645270f1df1f9a39f28abd392eedd82460 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/MultiArrayDimension.h @@ -0,0 +1,81 @@ +#ifndef _ROS_std_msgs_MultiArrayDimension_h +#define _ROS_std_msgs_MultiArrayDimension_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class MultiArrayDimension : public ros::Msg + { + public: + typedef const char* _label_type; + _label_type label; + typedef uint32_t _size_type; + _size_type size; + typedef uint32_t _stride_type; + _stride_type stride; + + MultiArrayDimension(): + label(""), + size(0), + stride(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_label = strlen(this->label); + varToArr(outbuffer + offset, length_label); + offset += 4; + memcpy(outbuffer + offset, this->label, length_label); + offset += length_label; + *(outbuffer + offset + 0) = (this->size >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->size >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->size >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->size >> (8 * 3)) & 0xFF; + offset += sizeof(this->size); + *(outbuffer + offset + 0) = (this->stride >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stride >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stride >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stride >> (8 * 3)) & 0xFF; + offset += sizeof(this->stride); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_label; + arrToVar(length_label, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_label; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_label-1]=0; + this->label = (char *)(inbuffer + offset-1); + offset += length_label; + this->size = ((uint32_t) (*(inbuffer + offset))); + this->size |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->size |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->size |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->size); + this->stride = ((uint32_t) (*(inbuffer + offset))); + this->stride |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stride |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stride |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stride); + return offset; + } + + const char * getType(){ return "std_msgs/MultiArrayDimension"; }; + const char * getMD5(){ return "4cd0c83a8683deae40ecdac60e53bfa8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/MultiArrayLayout.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/MultiArrayLayout.h new file mode 100644 index 0000000000000000000000000000000000000000..3cf3cfbade7c2676aa6f86813ff00991e953fe8c --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/MultiArrayLayout.h @@ -0,0 +1,77 @@ +#ifndef _ROS_std_msgs_MultiArrayLayout_h +#define _ROS_std_msgs_MultiArrayLayout_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayDimension.h" + +namespace std_msgs +{ + + class MultiArrayLayout : public ros::Msg + { + public: + uint32_t dim_length; + typedef std_msgs::MultiArrayDimension _dim_type; + _dim_type st_dim; + _dim_type * dim; + typedef uint32_t _data_offset_type; + _data_offset_type data_offset; + + MultiArrayLayout(): + dim_length(0), dim(NULL), + data_offset(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->dim_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->dim_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->dim_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->dim_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->dim_length); + for( uint32_t i = 0; i < dim_length; i++){ + offset += this->dim[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->data_offset >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_offset >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_offset >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_offset >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t dim_lengthT = ((uint32_t) (*(inbuffer + offset))); + dim_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + dim_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + dim_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->dim_length); + if(dim_lengthT > dim_length) + this->dim = (std_msgs::MultiArrayDimension*)realloc(this->dim, dim_lengthT * sizeof(std_msgs::MultiArrayDimension)); + dim_length = dim_lengthT; + for( uint32_t i = 0; i < dim_length; i++){ + offset += this->st_dim.deserialize(inbuffer + offset); + memcpy( &(this->dim[i]), &(this->st_dim), sizeof(std_msgs::MultiArrayDimension)); + } + this->data_offset = ((uint32_t) (*(inbuffer + offset))); + this->data_offset |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->data_offset |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->data_offset |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_offset); + return offset; + } + + const char * getType(){ return "std_msgs/MultiArrayLayout"; }; + const char * getMD5(){ return "0fed2a11c13e11c5571b4e2a995a91a3"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/String.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/String.h new file mode 100644 index 0000000000000000000000000000000000000000..de0bfa02cfb0f5af3bea1b892aafb8cd202162fd --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/String.h @@ -0,0 +1,55 @@ +#ifndef _ROS_std_msgs_String_h +#define _ROS_std_msgs_String_h + +#include +#include +#include +#include "../ros/msg.h" + +namespace std_msgs +{ + + class String : public ros::Msg + { + public: + typedef const char* _data_type; + _data_type data; + + String(): + data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_data = strlen(this->data); + varToArr(outbuffer + offset, length_data); + offset += 4; + memcpy(outbuffer + offset, this->data, length_data); + offset += length_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_data; + arrToVar(length_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data-1]=0; + this->data = (char *)(inbuffer + offset-1); + offset += length_data; + return offset; + } + + const char * getType(){ return "std_msgs/String"; }; + const char * getMD5(){ return "992ce8a1687cec8c8bd883ec73ca41d1"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Time.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Time.h new file mode 100644 index 0000000000000000000000000000000000000000..2a6dd260a5734cd9ee4335d4177fbe96b31c6e39 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/Time.h @@ -0,0 +1,62 @@ +#ifndef _ROS_std_msgs_Time_h +#define _ROS_std_msgs_Time_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../ros/time.h" + +namespace std_msgs +{ + + class Time : public ros::Msg + { + public: + typedef ros::Time _data_type; + _data_type data; + + Time(): + data() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->data.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->data.sec); + *(outbuffer + offset + 0) = (this->data.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->data.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->data.sec = ((uint32_t) (*(inbuffer + offset))); + this->data.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->data.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->data.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data.sec); + this->data.nsec = ((uint32_t) (*(inbuffer + offset))); + this->data.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->data.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->data.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data.nsec); + return offset; + } + + const char * getType(){ return "std_msgs/Time"; }; + const char * getMD5(){ return "cd7166c74c552c311fbcc2fe5a7bc289"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt16.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt16.h new file mode 100644 index 0000000000000000000000000000000000000000..4da6884762ab2c6b573ec5adc7f226277eb95a48 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt16.h @@ -0,0 +1,47 @@ +#ifndef _ROS_std_msgs_UInt16_h +#define _ROS_std_msgs_UInt16_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class UInt16 : public ros::Msg + { + public: + typedef uint16_t _data_type; + _data_type data; + + UInt16(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->data >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data >> (8 * 1)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->data = ((uint16_t) (*(inbuffer + offset))); + this->data |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/UInt16"; }; + const char * getMD5(){ return "1df79edf208b629fe6b81923a544552d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt16MultiArray.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt16MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..26c0e8fed59987079d2d44e44cfaf696a0489caa --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt16MultiArray.h @@ -0,0 +1,73 @@ +#ifndef _ROS_std_msgs_UInt16MultiArray_h +#define _ROS_std_msgs_UInt16MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class UInt16MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef uint16_t _data_type; + _data_type st_data; + _data_type * data; + + UInt16MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data[i] >> (8 * 1)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint16_t*)realloc(this->data, data_lengthT * sizeof(uint16_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint16_t) (*(inbuffer + offset))); + this->st_data |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint16_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/UInt16MultiArray"; }; + const char * getMD5(){ return "52f264f1c973c4b73790d384c6cb4484"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt32.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt32.h new file mode 100644 index 0000000000000000000000000000000000000000..30ae02b445636dad4d7903743d8024ef98cab7eb --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt32.h @@ -0,0 +1,51 @@ +#ifndef _ROS_std_msgs_UInt32_h +#define _ROS_std_msgs_UInt32_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class UInt32 : public ros::Msg + { + public: + typedef uint32_t _data_type; + _data_type data; + + UInt32(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->data >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data >> (8 * 3)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->data = ((uint32_t) (*(inbuffer + offset))); + this->data |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->data |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->data |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/UInt32"; }; + const char * getMD5(){ return "304a39449588c7f8ce2df6e8001c5fce"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt32MultiArray.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt32MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..af46e7954e9ed5fd63e935d495d6ca72b3042954 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt32MultiArray.h @@ -0,0 +1,77 @@ +#ifndef _ROS_std_msgs_UInt32MultiArray_h +#define _ROS_std_msgs_UInt32MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class UInt32MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef uint32_t _data_type; + _data_type st_data; + _data_type * data; + + UInt32MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data[i] >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data[i] >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data[i] >> (8 * 3)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint32_t*)realloc(this->data, data_lengthT * sizeof(uint32_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint32_t) (*(inbuffer + offset))); + this->st_data |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->st_data |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->st_data |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint32_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/UInt32MultiArray"; }; + const char * getMD5(){ return "4d6a180abc9be191b96a7eda6c8a233d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt64.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt64.h new file mode 100644 index 0000000000000000000000000000000000000000..b7ab02dd2b61eead046cabe9e767954d6e376071 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt64.h @@ -0,0 +1,62 @@ +#ifndef _ROS_std_msgs_UInt64_h +#define _ROS_std_msgs_UInt64_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class UInt64 : public ros::Msg + { + public: + typedef uint64_t _data_type; + _data_type data; + + UInt64(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + uint64_t 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); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + uint64_t 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); + return offset; + } + + const char * getType(){ return "std_msgs/UInt64"; }; + const char * getMD5(){ return "1b2a79973e8bf53d7b53acb71299cb57"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt64MultiArray.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt64MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..4401271222df8f77e9814561859813e9f581e9d2 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt64MultiArray.h @@ -0,0 +1,88 @@ +#ifndef _ROS_std_msgs_UInt64MultiArray_h +#define _ROS_std_msgs_UInt64MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class UInt64MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef uint64_t _data_type; + _data_type st_data; + _data_type * data; + + UInt64MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + uint64_t real; + uint32_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_datai.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_datai.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_datai.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint64_t*)realloc(this->data, data_lengthT * sizeof(uint64_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + uint64_t real; + uint32_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint64_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/UInt64MultiArray"; }; + const char * getMD5(){ return "6088f127afb1d6c72927aa1247e945af"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt8.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt8.h new file mode 100644 index 0000000000000000000000000000000000000000..e41b04be21be8ee6f20fb9105da9b06042f22ca7 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt8.h @@ -0,0 +1,45 @@ +#ifndef _ROS_std_msgs_UInt8_h +#define _ROS_std_msgs_UInt8_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class UInt8 : public ros::Msg + { + public: + typedef uint8_t _data_type; + _data_type data; + + UInt8(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->data >> (8 * 0)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/UInt8"; }; + const char * getMD5(){ return "7c8164229e7d2c17eb95e9231617fdee"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt8MultiArray.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt8MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..9ca2ac2e9bed363ba9a625d813e185eae4ac783e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_msgs/UInt8MultiArray.h @@ -0,0 +1,71 @@ +#ifndef _ROS_std_msgs_UInt8MultiArray_h +#define _ROS_std_msgs_UInt8MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class UInt8MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef uint8_t _data_type; + _data_type st_data; + _data_type * data; + + UInt8MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint8_t*)realloc(this->data, data_lengthT * sizeof(uint8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint8_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/UInt8MultiArray"; }; + const char * getMD5(){ return "82373f1612381bb6ee473b5cd6f5d89c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_srvs/Empty.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_srvs/Empty.h new file mode 100644 index 0000000000000000000000000000000000000000..b040dd2e233bddb00f68b71f4e9a2f5dad3e1ddb --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_srvs/Empty.h @@ -0,0 +1,70 @@ +#ifndef _ROS_SERVICE_Empty_h +#define _ROS_SERVICE_Empty_h +#include +#include +#include +#include "ros/msg.h" + +namespace std_srvs +{ + +static const char EMPTY[] = "std_srvs/Empty"; + + class EmptyRequest : public ros::Msg + { + public: + + EmptyRequest() + { + } + + 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 EMPTY; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class EmptyResponse : public ros::Msg + { + public: + + EmptyResponse() + { + } + + 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 EMPTY; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class Empty { + public: + typedef EmptyRequest Request; + typedef EmptyResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_srvs/SetBool.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_srvs/SetBool.h new file mode 100644 index 0000000000000000000000000000000000000000..1feb34e2974a7ed2febe462bc34b4df4e91178e7 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_srvs/SetBool.h @@ -0,0 +1,123 @@ +#ifndef _ROS_SERVICE_SetBool_h +#define _ROS_SERVICE_SetBool_h +#include +#include +#include +#include "ros/msg.h" + +namespace std_srvs +{ + +static const char SETBOOL[] = "std_srvs/SetBool"; + + class SetBoolRequest : public ros::Msg + { + public: + typedef bool _data_type; + _data_type data; + + SetBoolRequest(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_data; + u_data.real = this->data; + *(outbuffer + offset + 0) = (u_data.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_data; + u_data.base = 0; + u_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->data = u_data.real; + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return SETBOOL; }; + const char * getMD5(){ return "8b94c1b53db61fb6aed406028ad6332a"; }; + + }; + + class SetBoolResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _message_type; + _message_type message; + + SetBoolResponse(): + success(0), + message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_message = strlen(this->message); + varToArr(outbuffer + offset, length_message); + offset += 4; + memcpy(outbuffer + offset, this->message, length_message); + offset += length_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_message; + arrToVar(length_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message-1]=0; + this->message = (char *)(inbuffer + offset-1); + offset += length_message; + return offset; + } + + const char * getType(){ return SETBOOL; }; + const char * getMD5(){ return "937c9679a518e3a18d831e57125ea522"; }; + + }; + + class SetBool { + public: + typedef SetBoolRequest Request; + typedef SetBoolResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_srvs/Trigger.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_srvs/Trigger.h new file mode 100644 index 0000000000000000000000000000000000000000..34d1e48f7b57ba24b1e5888090a1369b2dedac85 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/std_srvs/Trigger.h @@ -0,0 +1,105 @@ +#ifndef _ROS_SERVICE_Trigger_h +#define _ROS_SERVICE_Trigger_h +#include +#include +#include +#include "ros/msg.h" + +namespace std_srvs +{ + +static const char TRIGGER[] = "std_srvs/Trigger"; + + class TriggerRequest : public ros::Msg + { + public: + + TriggerRequest() + { + } + + 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 TRIGGER; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class TriggerResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _message_type; + _message_type message; + + TriggerResponse(): + success(0), + message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_message = strlen(this->message); + varToArr(outbuffer + offset, length_message); + offset += 4; + memcpy(outbuffer + offset, this->message, length_message); + offset += length_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_message; + arrToVar(length_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message-1]=0; + this->message = (char *)(inbuffer + offset-1); + offset += length_message; + return offset; + } + + const char * getType(){ return TRIGGER; }; + const char * getMD5(){ return "937c9679a518e3a18d831e57125ea522"; }; + + }; + + class Trigger { + public: + typedef TriggerRequest Request; + typedef TriggerResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/stereo_msgs/DisparityImage.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/stereo_msgs/DisparityImage.h new file mode 100644 index 0000000000000000000000000000000000000000..90b3f28673e9d90c8515a93d8a92bdfed911db77 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/stereo_msgs/DisparityImage.h @@ -0,0 +1,176 @@ +#ifndef _ROS_stereo_msgs_DisparityImage_h +#define _ROS_stereo_msgs_DisparityImage_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/Image.h" +#include "sensor_msgs/RegionOfInterest.h" + +namespace stereo_msgs +{ + + class DisparityImage : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef sensor_msgs::Image _image_type; + _image_type image; + typedef float _f_type; + _f_type f; + typedef float _T_type; + _T_type T; + typedef sensor_msgs::RegionOfInterest _valid_window_type; + _valid_window_type valid_window; + typedef float _min_disparity_type; + _min_disparity_type min_disparity; + typedef float _max_disparity_type; + _max_disparity_type max_disparity; + typedef float _delta_d_type; + _delta_d_type delta_d; + + DisparityImage(): + header(), + image(), + f(0), + T(0), + valid_window(), + min_disparity(0), + max_disparity(0), + delta_d(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->image.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_f; + u_f.real = this->f; + *(outbuffer + offset + 0) = (u_f.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_f.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_f.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_f.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->f); + union { + float real; + uint32_t base; + } u_T; + u_T.real = this->T; + *(outbuffer + offset + 0) = (u_T.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_T.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_T.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_T.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->T); + offset += this->valid_window.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_min_disparity; + u_min_disparity.real = this->min_disparity; + *(outbuffer + offset + 0) = (u_min_disparity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_min_disparity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_min_disparity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_min_disparity.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->min_disparity); + union { + float real; + uint32_t base; + } u_max_disparity; + u_max_disparity.real = this->max_disparity; + *(outbuffer + offset + 0) = (u_max_disparity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_disparity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_disparity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_disparity.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->max_disparity); + union { + float real; + uint32_t base; + } u_delta_d; + u_delta_d.real = this->delta_d; + *(outbuffer + offset + 0) = (u_delta_d.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_delta_d.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_delta_d.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_delta_d.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->delta_d); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->image.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_f; + u_f.base = 0; + u_f.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_f.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_f.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_f.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->f = u_f.real; + offset += sizeof(this->f); + union { + float real; + uint32_t base; + } u_T; + u_T.base = 0; + u_T.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_T.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_T.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_T.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->T = u_T.real; + offset += sizeof(this->T); + offset += this->valid_window.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_min_disparity; + u_min_disparity.base = 0; + u_min_disparity.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_min_disparity.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_min_disparity.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_min_disparity.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->min_disparity = u_min_disparity.real; + offset += sizeof(this->min_disparity); + union { + float real; + uint32_t base; + } u_max_disparity; + u_max_disparity.base = 0; + u_max_disparity.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_disparity.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_disparity.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_disparity.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->max_disparity = u_max_disparity.real; + offset += sizeof(this->max_disparity); + union { + float real; + uint32_t base; + } u_delta_d; + u_delta_d.base = 0; + u_delta_d.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_delta_d.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_delta_d.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_delta_d.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->delta_d = u_delta_d.real; + offset += sizeof(this->delta_d); + return offset; + } + + const char * getType(){ return "stereo_msgs/DisparityImage"; }; + const char * getMD5(){ return "04a177815f75271039fa21f16acad8c9"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf/FrameGraph.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf/FrameGraph.h new file mode 100644 index 0000000000000000000000000000000000000000..e95a945708916458c0e6dd4710b24edd2953176a --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf/FrameGraph.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_FrameGraph_h +#define _ROS_SERVICE_FrameGraph_h +#include +#include +#include +#include "ros/msg.h" + +namespace tf +{ + +static const char FRAMEGRAPH[] = "tf/FrameGraph"; + + class FrameGraphRequest : public ros::Msg + { + public: + + FrameGraphRequest() + { + } + + 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 FRAMEGRAPH; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class FrameGraphResponse : public ros::Msg + { + public: + typedef const char* _dot_graph_type; + _dot_graph_type dot_graph; + + FrameGraphResponse(): + dot_graph("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_dot_graph = strlen(this->dot_graph); + varToArr(outbuffer + offset, length_dot_graph); + offset += 4; + memcpy(outbuffer + offset, this->dot_graph, length_dot_graph); + offset += length_dot_graph; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_dot_graph; + arrToVar(length_dot_graph, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_dot_graph; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_dot_graph-1]=0; + this->dot_graph = (char *)(inbuffer + offset-1); + offset += length_dot_graph; + return offset; + } + + const char * getType(){ return FRAMEGRAPH; }; + const char * getMD5(){ return "c4af9ac907e58e906eb0b6e3c58478c0"; }; + + }; + + class FrameGraph { + public: + typedef FrameGraphRequest Request; + typedef FrameGraphResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf/tf.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf/tf.h new file mode 100644 index 0000000000000000000000000000000000000000..97858fe2e3cc32a8725a9b9d08e98c85f5c97ad5 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf/tf.h @@ -0,0 +1,56 @@ +/* + * 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_TF_H_ +#define ROS_TF_H_ + +#include "geometry_msgs/TransformStamped.h" + +namespace tf +{ + +static inline geometry_msgs::Quaternion createQuaternionFromYaw(double yaw) +{ + geometry_msgs::Quaternion q; + q.x = 0; + q.y = 0; + q.z = sin(yaw * 0.5); + q.w = cos(yaw * 0.5); + return q; +} + +} + +#endif + diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf/tfMessage.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf/tfMessage.h new file mode 100644 index 0000000000000000000000000000000000000000..1f370d041a4e4b088cb1166da9e421e9f9bb63c5 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf/tfMessage.h @@ -0,0 +1,64 @@ +#ifndef _ROS_tf_tfMessage_h +#define _ROS_tf_tfMessage_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../geometry_msgs/TransformStamped.h" + +namespace tf +{ + + class tfMessage : public ros::Msg + { + public: + uint32_t transforms_length; + typedef geometry_msgs::TransformStamped _transforms_type; + _transforms_type st_transforms; + _transforms_type * transforms; + + tfMessage(): + transforms_length(0), transforms(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->transforms_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->transforms_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->transforms_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->transforms_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->transforms_length); + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->transforms[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t transforms_lengthT = ((uint32_t) (*(inbuffer + offset))); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->transforms_length); + if(transforms_lengthT > transforms_length) + this->transforms = (geometry_msgs::TransformStamped*)realloc(this->transforms, transforms_lengthT * sizeof(geometry_msgs::TransformStamped)); + transforms_length = transforms_lengthT; + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->st_transforms.deserialize(inbuffer + offset); + memcpy( &(this->transforms[i]), &(this->st_transforms), sizeof(geometry_msgs::TransformStamped)); + } + return offset; + } + + const char * getType(){ return "tf/tfMessage"; }; + const char * getMD5(){ return "94810edda583a504dfda3829e70d7eec"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf/transform_broadcaster.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf/transform_broadcaster.h new file mode 100644 index 0000000000000000000000000000000000000000..6c4e5fee719cdd0fd2bfe6eb26638999444d20de --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf/transform_broadcaster.h @@ -0,0 +1,69 @@ +/* + * 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_TRANSFORM_BROADCASTER_H_ +#define ROS_TRANSFORM_BROADCASTER_H_ + +#include "ros.h" +#include "tfMessage.h" + +namespace tf +{ + +class TransformBroadcaster +{ +public: + TransformBroadcaster() : publisher_("/tf", &internal_msg) {} + + void init(ros::NodeHandle &nh) + { + nh.advertise(publisher_); + } + + void sendTransform(geometry_msgs::TransformStamped &transform) + { + internal_msg.transforms_length = 1; + internal_msg.transforms = &transform; + publisher_.publish(&internal_msg); + } + +private: + tf::tfMessage internal_msg; + ros::Publisher publisher_; +}; + +} + +#endif + diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/FrameGraph.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/FrameGraph.h new file mode 100644 index 0000000000000000000000000000000000000000..91456394569ab1f14bb94c4f2f9bfb5a4c76156b --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/FrameGraph.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_FrameGraph_h +#define _ROS_SERVICE_FrameGraph_h +#include +#include +#include +#include "ros/msg.h" + +namespace tf2_msgs +{ + +static const char FRAMEGRAPH[] = "tf2_msgs/FrameGraph"; + + class FrameGraphRequest : public ros::Msg + { + public: + + FrameGraphRequest() + { + } + + 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 FRAMEGRAPH; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class FrameGraphResponse : public ros::Msg + { + public: + typedef const char* _frame_yaml_type; + _frame_yaml_type frame_yaml; + + FrameGraphResponse(): + frame_yaml("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_frame_yaml = strlen(this->frame_yaml); + varToArr(outbuffer + offset, length_frame_yaml); + offset += 4; + memcpy(outbuffer + offset, this->frame_yaml, length_frame_yaml); + offset += length_frame_yaml; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_frame_yaml; + arrToVar(length_frame_yaml, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_frame_yaml; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_frame_yaml-1]=0; + this->frame_yaml = (char *)(inbuffer + offset-1); + offset += length_frame_yaml; + return offset; + } + + const char * getType(){ return FRAMEGRAPH; }; + const char * getMD5(){ return "437ea58e9463815a0d511c7326b686b0"; }; + + }; + + class FrameGraph { + public: + typedef FrameGraphRequest Request; + typedef FrameGraphResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformAction.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformAction.h new file mode 100644 index 0000000000000000000000000000000000000000..733d095dd1538c949996a22b19d513fe0ee43e41 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_tf2_msgs_LookupTransformAction_h +#define _ROS_tf2_msgs_LookupTransformAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "tf2_msgs/LookupTransformActionGoal.h" +#include "tf2_msgs/LookupTransformActionResult.h" +#include "tf2_msgs/LookupTransformActionFeedback.h" + +namespace tf2_msgs +{ + + class LookupTransformAction : public ros::Msg + { + public: + typedef tf2_msgs::LookupTransformActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef tf2_msgs::LookupTransformActionResult _action_result_type; + _action_result_type action_result; + typedef tf2_msgs::LookupTransformActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + LookupTransformAction(): + 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 "tf2_msgs/LookupTransformAction"; }; + const char * getMD5(){ return "7ee01ba91a56c2245c610992dbaa3c37"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformActionFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..39bd3b4e0560edfaa1f15ad79d1852855bc7b058 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_tf2_msgs_LookupTransformActionFeedback_h +#define _ROS_tf2_msgs_LookupTransformActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "tf2_msgs/LookupTransformFeedback.h" + +namespace tf2_msgs +{ + + class LookupTransformActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef tf2_msgs::LookupTransformFeedback _feedback_type; + _feedback_type feedback; + + LookupTransformActionFeedback(): + 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 "tf2_msgs/LookupTransformActionFeedback"; }; + const char * getMD5(){ return "aae20e09065c3809e8a8e87c4c8953fd"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformActionGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..92bc163039dcf4e3882a686065ed1f5584b29840 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_tf2_msgs_LookupTransformActionGoal_h +#define _ROS_tf2_msgs_LookupTransformActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "tf2_msgs/LookupTransformGoal.h" + +namespace tf2_msgs +{ + + class LookupTransformActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef tf2_msgs::LookupTransformGoal _goal_type; + _goal_type goal; + + LookupTransformActionGoal(): + 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 "tf2_msgs/LookupTransformActionGoal"; }; + const char * getMD5(){ return "f2e7bcdb75c847978d0351a13e699da5"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformActionResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..38a98bdf2abf62c27c97be3a14fc83f2d08f9906 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_tf2_msgs_LookupTransformActionResult_h +#define _ROS_tf2_msgs_LookupTransformActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "tf2_msgs/LookupTransformResult.h" + +namespace tf2_msgs +{ + + class LookupTransformActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef tf2_msgs::LookupTransformResult _result_type; + _result_type result; + + LookupTransformActionResult(): + 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 "tf2_msgs/LookupTransformActionResult"; }; + const char * getMD5(){ return "ac26ce75a41384fa8bb4dc10f491ab90"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..6be0748603229045e4d3a79e397858f4f6115c8a --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformFeedback.h @@ -0,0 +1,38 @@ +#ifndef _ROS_tf2_msgs_LookupTransformFeedback_h +#define _ROS_tf2_msgs_LookupTransformFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace tf2_msgs +{ + + class LookupTransformFeedback : public ros::Msg + { + public: + + LookupTransformFeedback() + { + } + + 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 "tf2_msgs/LookupTransformFeedback"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..87a79ee055604a9ba6d3db9383e62c17b4f5ab7b --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformGoal.h @@ -0,0 +1,178 @@ +#ifndef _ROS_tf2_msgs_LookupTransformGoal_h +#define _ROS_tf2_msgs_LookupTransformGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" +#include "ros/duration.h" + +namespace tf2_msgs +{ + + class LookupTransformGoal : public ros::Msg + { + public: + typedef const char* _target_frame_type; + _target_frame_type target_frame; + typedef const char* _source_frame_type; + _source_frame_type source_frame; + typedef ros::Time _source_time_type; + _source_time_type source_time; + typedef ros::Duration _timeout_type; + _timeout_type timeout; + typedef ros::Time _target_time_type; + _target_time_type target_time; + typedef const char* _fixed_frame_type; + _fixed_frame_type fixed_frame; + typedef bool _advanced_type; + _advanced_type advanced; + + LookupTransformGoal(): + target_frame(""), + source_frame(""), + source_time(), + timeout(), + target_time(), + fixed_frame(""), + advanced(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_target_frame = strlen(this->target_frame); + varToArr(outbuffer + offset, length_target_frame); + offset += 4; + memcpy(outbuffer + offset, this->target_frame, length_target_frame); + offset += length_target_frame; + uint32_t length_source_frame = strlen(this->source_frame); + varToArr(outbuffer + offset, length_source_frame); + offset += 4; + memcpy(outbuffer + offset, this->source_frame, length_source_frame); + offset += length_source_frame; + *(outbuffer + offset + 0) = (this->source_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->source_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->source_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->source_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->source_time.sec); + *(outbuffer + offset + 0) = (this->source_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->source_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->source_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->source_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->source_time.nsec); + *(outbuffer + offset + 0) = (this->timeout.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timeout.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timeout.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timeout.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timeout.sec); + *(outbuffer + offset + 0) = (this->timeout.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timeout.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timeout.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timeout.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timeout.nsec); + *(outbuffer + offset + 0) = (this->target_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->target_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->target_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->target_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->target_time.sec); + *(outbuffer + offset + 0) = (this->target_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->target_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->target_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->target_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->target_time.nsec); + uint32_t length_fixed_frame = strlen(this->fixed_frame); + varToArr(outbuffer + offset, length_fixed_frame); + offset += 4; + memcpy(outbuffer + offset, this->fixed_frame, length_fixed_frame); + offset += length_fixed_frame; + union { + bool real; + uint8_t base; + } u_advanced; + u_advanced.real = this->advanced; + *(outbuffer + offset + 0) = (u_advanced.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->advanced); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_target_frame; + arrToVar(length_target_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_target_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_target_frame-1]=0; + this->target_frame = (char *)(inbuffer + offset-1); + offset += length_target_frame; + uint32_t length_source_frame; + arrToVar(length_source_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_source_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_source_frame-1]=0; + this->source_frame = (char *)(inbuffer + offset-1); + offset += length_source_frame; + this->source_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->source_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->source_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->source_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->source_time.sec); + this->source_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->source_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->source_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->source_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->source_time.nsec); + this->timeout.sec = ((uint32_t) (*(inbuffer + offset))); + this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timeout.sec); + this->timeout.nsec = ((uint32_t) (*(inbuffer + offset))); + this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timeout.nsec); + this->target_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->target_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->target_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->target_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->target_time.sec); + this->target_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->target_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->target_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->target_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->target_time.nsec); + uint32_t length_fixed_frame; + arrToVar(length_fixed_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_fixed_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_fixed_frame-1]=0; + this->fixed_frame = (char *)(inbuffer + offset-1); + offset += length_fixed_frame; + union { + bool real; + uint8_t base; + } u_advanced; + u_advanced.base = 0; + u_advanced.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->advanced = u_advanced.real; + offset += sizeof(this->advanced); + return offset; + } + + const char * getType(){ return "tf2_msgs/LookupTransformGoal"; }; + const char * getMD5(){ return "35e3720468131d675a18bb6f3e5f22f8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformResult.h new file mode 100644 index 0000000000000000000000000000000000000000..5422d7e7fc6dbb7f6010a6a0c21a5fc652f2699b --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformResult.h @@ -0,0 +1,50 @@ +#ifndef _ROS_tf2_msgs_LookupTransformResult_h +#define _ROS_tf2_msgs_LookupTransformResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/TransformStamped.h" +#include "tf2_msgs/TF2Error.h" + +namespace tf2_msgs +{ + + class LookupTransformResult : public ros::Msg + { + public: + typedef geometry_msgs::TransformStamped _transform_type; + _transform_type transform; + typedef tf2_msgs::TF2Error _error_type; + _error_type error; + + LookupTransformResult(): + transform(), + error() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->transform.serialize(outbuffer + offset); + offset += this->error.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->transform.deserialize(inbuffer + offset); + offset += this->error.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "tf2_msgs/LookupTransformResult"; }; + const char * getMD5(){ return "3fe5db6a19ca9cfb675418c5ad875c36"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/TF2Error.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/TF2Error.h new file mode 100644 index 0000000000000000000000000000000000000000..e6efdce2e3d8f0da5c06e91704a34ac2fa924119 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/TF2Error.h @@ -0,0 +1,69 @@ +#ifndef _ROS_tf2_msgs_TF2Error_h +#define _ROS_tf2_msgs_TF2Error_h + +#include +#include +#include +#include "ros/msg.h" + +namespace tf2_msgs +{ + + class TF2Error : public ros::Msg + { + public: + typedef uint8_t _error_type; + _error_type error; + typedef const char* _error_string_type; + _error_string_type error_string; + enum { NO_ERROR = 0 }; + enum { LOOKUP_ERROR = 1 }; + enum { CONNECTIVITY_ERROR = 2 }; + enum { EXTRAPOLATION_ERROR = 3 }; + enum { INVALID_ARGUMENT_ERROR = 4 }; + enum { TIMEOUT_ERROR = 5 }; + enum { TRANSFORM_ERROR = 6 }; + + TF2Error(): + error(0), + error_string("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->error >> (8 * 0)) & 0xFF; + offset += sizeof(this->error); + uint32_t length_error_string = strlen(this->error_string); + varToArr(outbuffer + offset, length_error_string); + offset += 4; + memcpy(outbuffer + offset, this->error_string, length_error_string); + offset += length_error_string; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->error = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->error); + uint32_t length_error_string; + arrToVar(length_error_string, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_error_string; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_error_string-1]=0; + this->error_string = (char *)(inbuffer + offset-1); + offset += length_error_string; + return offset; + } + + const char * getType(){ return "tf2_msgs/TF2Error"; }; + const char * getMD5(){ return "bc6848fd6fd750c92e38575618a4917d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/TFMessage.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/TFMessage.h new file mode 100644 index 0000000000000000000000000000000000000000..fd8ff10d8eba2b8c8125fa1365bc099c4b0c4807 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/tf2_msgs/TFMessage.h @@ -0,0 +1,64 @@ +#ifndef _ROS_tf2_msgs_TFMessage_h +#define _ROS_tf2_msgs_TFMessage_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/TransformStamped.h" + +namespace tf2_msgs +{ + + class TFMessage : public ros::Msg + { + public: + uint32_t transforms_length; + typedef geometry_msgs::TransformStamped _transforms_type; + _transforms_type st_transforms; + _transforms_type * transforms; + + TFMessage(): + transforms_length(0), transforms(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->transforms_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->transforms_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->transforms_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->transforms_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->transforms_length); + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->transforms[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t transforms_lengthT = ((uint32_t) (*(inbuffer + offset))); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->transforms_length); + if(transforms_lengthT > transforms_length) + this->transforms = (geometry_msgs::TransformStamped*)realloc(this->transforms, transforms_lengthT * sizeof(geometry_msgs::TransformStamped)); + transforms_length = transforms_lengthT; + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->st_transforms.deserialize(inbuffer + offset); + memcpy( &(this->transforms[i]), &(this->st_transforms), sizeof(geometry_msgs::TransformStamped)); + } + return offset; + } + + const char * getType(){ return "tf2_msgs/TFMessage"; }; + const char * getMD5(){ return "94810edda583a504dfda3829e70d7eec"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/theora_image_transport/Packet.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/theora_image_transport/Packet.h new file mode 100644 index 0000000000000000000000000000000000000000..b35e696a540f772581534be0d29d49e976eab98b --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/theora_image_transport/Packet.h @@ -0,0 +1,183 @@ +#ifndef _ROS_theora_image_transport_Packet_h +#define _ROS_theora_image_transport_Packet_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace theora_image_transport +{ + + class Packet : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t data_length; + typedef uint8_t _data_type; + _data_type st_data; + _data_type * data; + typedef int32_t _b_o_s_type; + _b_o_s_type b_o_s; + typedef int32_t _e_o_s_type; + _e_o_s_type e_o_s; + typedef int64_t _granulepos_type; + _granulepos_type granulepos; + typedef int64_t _packetno_type; + _packetno_type packetno; + + Packet(): + header(), + data_length(0), data(NULL), + b_o_s(0), + e_o_s(0), + granulepos(0), + packetno(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + union { + int32_t real; + uint32_t base; + } u_b_o_s; + u_b_o_s.real = this->b_o_s; + *(outbuffer + offset + 0) = (u_b_o_s.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_b_o_s.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_b_o_s.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_b_o_s.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->b_o_s); + union { + int32_t real; + uint32_t base; + } u_e_o_s; + u_e_o_s.real = this->e_o_s; + *(outbuffer + offset + 0) = (u_e_o_s.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_e_o_s.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_e_o_s.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_e_o_s.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->e_o_s); + union { + int64_t real; + uint64_t base; + } u_granulepos; + u_granulepos.real = this->granulepos; + *(outbuffer + offset + 0) = (u_granulepos.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_granulepos.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_granulepos.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_granulepos.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_granulepos.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_granulepos.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_granulepos.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_granulepos.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->granulepos); + union { + int64_t real; + uint64_t base; + } u_packetno; + u_packetno.real = this->packetno; + *(outbuffer + offset + 0) = (u_packetno.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_packetno.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_packetno.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_packetno.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_packetno.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_packetno.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_packetno.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_packetno.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->packetno); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint8_t*)realloc(this->data, data_lengthT * sizeof(uint8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint8_t)); + } + union { + int32_t real; + uint32_t base; + } u_b_o_s; + u_b_o_s.base = 0; + u_b_o_s.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_b_o_s.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_b_o_s.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_b_o_s.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->b_o_s = u_b_o_s.real; + offset += sizeof(this->b_o_s); + union { + int32_t real; + uint32_t base; + } u_e_o_s; + u_e_o_s.base = 0; + u_e_o_s.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_e_o_s.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_e_o_s.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_e_o_s.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->e_o_s = u_e_o_s.real; + offset += sizeof(this->e_o_s); + union { + int64_t real; + uint64_t base; + } u_granulepos; + u_granulepos.base = 0; + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->granulepos = u_granulepos.real; + offset += sizeof(this->granulepos); + union { + int64_t real; + uint64_t base; + } u_packetno; + u_packetno.base = 0; + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->packetno = u_packetno.real; + offset += sizeof(this->packetno); + return offset; + } + + const char * getType(){ return "theora_image_transport/Packet"; }; + const char * getMD5(){ return "33ac4e14a7cff32e7e0d65f18bb410f3"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/time.cpp b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/time.cpp new file mode 100644 index 0000000000000000000000000000000000000000..86221f9465940f7acb3131657a39aed293814869 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/time.cpp @@ -0,0 +1,70 @@ +/* + * 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. + */ + +#include "ros/time.h" + +namespace ros +{ +void normalizeSecNSec(uint32_t& sec, uint32_t& nsec) +{ + uint32_t nsec_part = nsec % 1000000000UL; + uint32_t sec_part = nsec / 1000000000UL; + sec += sec_part; + nsec = nsec_part; +} + +Time& Time::fromNSec(int32_t t) +{ + sec = t / 1000000000; + nsec = t % 1000000000; + normalizeSecNSec(sec, nsec); + return *this; +} + +Time& Time::operator +=(const Duration &rhs) +{ + sec += rhs.sec; + nsec += rhs.nsec; + normalizeSecNSec(sec, nsec); + return *this; +} + +Time& Time::operator -=(const Duration &rhs) +{ + sec += -rhs.sec; + nsec += -rhs.nsec; + normalizeSecNSec(sec, nsec); + return *this; +} +} diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/DemuxAdd.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/DemuxAdd.h new file mode 100644 index 0000000000000000000000000000000000000000..d8016c6b3be2ce47b0964355fb2ae14108fcae5e --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/DemuxAdd.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_DemuxAdd_h +#define _ROS_SERVICE_DemuxAdd_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char DEMUXADD[] = "topic_tools/DemuxAdd"; + + class DemuxAddRequest : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + + DemuxAddRequest(): + topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + return offset; + } + + const char * getType(){ return DEMUXADD; }; + const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; }; + + }; + + class DemuxAddResponse : public ros::Msg + { + public: + + DemuxAddResponse() + { + } + + 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 DEMUXADD; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class DemuxAdd { + public: + typedef DemuxAddRequest Request; + typedef DemuxAddResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/DemuxDelete.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/DemuxDelete.h new file mode 100644 index 0000000000000000000000000000000000000000..3f030aae4b640a778866bc9c21c0b2fb080c28e9 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/DemuxDelete.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_DemuxDelete_h +#define _ROS_SERVICE_DemuxDelete_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char DEMUXDELETE[] = "topic_tools/DemuxDelete"; + + class DemuxDeleteRequest : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + + DemuxDeleteRequest(): + topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + return offset; + } + + const char * getType(){ return DEMUXDELETE; }; + const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; }; + + }; + + class DemuxDeleteResponse : public ros::Msg + { + public: + + DemuxDeleteResponse() + { + } + + 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 DEMUXDELETE; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class DemuxDelete { + public: + typedef DemuxDeleteRequest Request; + typedef DemuxDeleteResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/DemuxList.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/DemuxList.h new file mode 100644 index 0000000000000000000000000000000000000000..05533298fa43da3e375c1dfdbdc22a2c375972e3 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/DemuxList.h @@ -0,0 +1,107 @@ +#ifndef _ROS_SERVICE_DemuxList_h +#define _ROS_SERVICE_DemuxList_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char DEMUXLIST[] = "topic_tools/DemuxList"; + + class DemuxListRequest : public ros::Msg + { + public: + + DemuxListRequest() + { + } + + 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 DEMUXLIST; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class DemuxListResponse : public ros::Msg + { + public: + uint32_t topics_length; + typedef char* _topics_type; + _topics_type st_topics; + _topics_type * topics; + + DemuxListResponse(): + topics_length(0), topics(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->topics_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->topics_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->topics_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->topics_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->topics_length); + for( uint32_t i = 0; i < topics_length; i++){ + uint32_t length_topicsi = strlen(this->topics[i]); + varToArr(outbuffer + offset, length_topicsi); + offset += 4; + memcpy(outbuffer + offset, this->topics[i], length_topicsi); + offset += length_topicsi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t topics_lengthT = ((uint32_t) (*(inbuffer + offset))); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->topics_length); + if(topics_lengthT > topics_length) + this->topics = (char**)realloc(this->topics, topics_lengthT * sizeof(char*)); + topics_length = topics_lengthT; + for( uint32_t i = 0; i < topics_length; i++){ + uint32_t length_st_topics; + arrToVar(length_st_topics, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_topics; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_topics-1]=0; + this->st_topics = (char *)(inbuffer + offset-1); + offset += length_st_topics; + memcpy( &(this->topics[i]), &(this->st_topics), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return DEMUXLIST; }; + const char * getMD5(){ return "b0eef9a05d4e829092fc2f2c3c2aad3d"; }; + + }; + + class DemuxList { + public: + typedef DemuxListRequest Request; + typedef DemuxListResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/DemuxSelect.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/DemuxSelect.h new file mode 100644 index 0000000000000000000000000000000000000000..17a6d9b2ceae2dc7f165ac1cd30ab38fc9c6d01f --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/DemuxSelect.h @@ -0,0 +1,104 @@ +#ifndef _ROS_SERVICE_DemuxSelect_h +#define _ROS_SERVICE_DemuxSelect_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char DEMUXSELECT[] = "topic_tools/DemuxSelect"; + + class DemuxSelectRequest : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + + DemuxSelectRequest(): + topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + return offset; + } + + const char * getType(){ return DEMUXSELECT; }; + const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; }; + + }; + + class DemuxSelectResponse : public ros::Msg + { + public: + typedef const char* _prev_topic_type; + _prev_topic_type prev_topic; + + DemuxSelectResponse(): + prev_topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_prev_topic = strlen(this->prev_topic); + varToArr(outbuffer + offset, length_prev_topic); + offset += 4; + memcpy(outbuffer + offset, this->prev_topic, length_prev_topic); + offset += length_prev_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_prev_topic; + arrToVar(length_prev_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_prev_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_prev_topic-1]=0; + this->prev_topic = (char *)(inbuffer + offset-1); + offset += length_prev_topic; + return offset; + } + + const char * getType(){ return DEMUXSELECT; }; + const char * getMD5(){ return "3db0a473debdbafea387c9e49358c320"; }; + + }; + + class DemuxSelect { + public: + typedef DemuxSelectRequest Request; + typedef DemuxSelectResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/MuxAdd.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/MuxAdd.h new file mode 100644 index 0000000000000000000000000000000000000000..25a649ad8fa1fe6b54d06df66ea5ad367d1546fa --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/MuxAdd.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_MuxAdd_h +#define _ROS_SERVICE_MuxAdd_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char MUXADD[] = "topic_tools/MuxAdd"; + + class MuxAddRequest : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + + MuxAddRequest(): + topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + return offset; + } + + const char * getType(){ return MUXADD; }; + const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; }; + + }; + + class MuxAddResponse : public ros::Msg + { + public: + + MuxAddResponse() + { + } + + 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 MUXADD; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class MuxAdd { + public: + typedef MuxAddRequest Request; + typedef MuxAddResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/MuxDelete.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/MuxDelete.h new file mode 100644 index 0000000000000000000000000000000000000000..3672ad57d2fab86d9d4d0d308f018d110271000c --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/MuxDelete.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_MuxDelete_h +#define _ROS_SERVICE_MuxDelete_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char MUXDELETE[] = "topic_tools/MuxDelete"; + + class MuxDeleteRequest : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + + MuxDeleteRequest(): + topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + return offset; + } + + const char * getType(){ return MUXDELETE; }; + const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; }; + + }; + + class MuxDeleteResponse : public ros::Msg + { + public: + + MuxDeleteResponse() + { + } + + 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 MUXDELETE; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class MuxDelete { + public: + typedef MuxDeleteRequest Request; + typedef MuxDeleteResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/MuxList.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/MuxList.h new file mode 100644 index 0000000000000000000000000000000000000000..5d7936d8501a1ef462133d8accc95d56296633fc --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/MuxList.h @@ -0,0 +1,107 @@ +#ifndef _ROS_SERVICE_MuxList_h +#define _ROS_SERVICE_MuxList_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char MUXLIST[] = "topic_tools/MuxList"; + + class MuxListRequest : public ros::Msg + { + public: + + MuxListRequest() + { + } + + 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 MUXLIST; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class MuxListResponse : public ros::Msg + { + public: + uint32_t topics_length; + typedef char* _topics_type; + _topics_type st_topics; + _topics_type * topics; + + MuxListResponse(): + topics_length(0), topics(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->topics_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->topics_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->topics_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->topics_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->topics_length); + for( uint32_t i = 0; i < topics_length; i++){ + uint32_t length_topicsi = strlen(this->topics[i]); + varToArr(outbuffer + offset, length_topicsi); + offset += 4; + memcpy(outbuffer + offset, this->topics[i], length_topicsi); + offset += length_topicsi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t topics_lengthT = ((uint32_t) (*(inbuffer + offset))); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->topics_length); + if(topics_lengthT > topics_length) + this->topics = (char**)realloc(this->topics, topics_lengthT * sizeof(char*)); + topics_length = topics_lengthT; + for( uint32_t i = 0; i < topics_length; i++){ + uint32_t length_st_topics; + arrToVar(length_st_topics, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_topics; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_topics-1]=0; + this->st_topics = (char *)(inbuffer + offset-1); + offset += length_st_topics; + memcpy( &(this->topics[i]), &(this->st_topics), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return MUXLIST; }; + const char * getMD5(){ return "b0eef9a05d4e829092fc2f2c3c2aad3d"; }; + + }; + + class MuxList { + public: + typedef MuxListRequest Request; + typedef MuxListResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/MuxSelect.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/MuxSelect.h new file mode 100644 index 0000000000000000000000000000000000000000..67324a85aafb78f8e22fdfe934a60e4a96729d94 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/topic_tools/MuxSelect.h @@ -0,0 +1,104 @@ +#ifndef _ROS_SERVICE_MuxSelect_h +#define _ROS_SERVICE_MuxSelect_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char MUXSELECT[] = "topic_tools/MuxSelect"; + + class MuxSelectRequest : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + + MuxSelectRequest(): + topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + return offset; + } + + const char * getType(){ return MUXSELECT; }; + const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; }; + + }; + + class MuxSelectResponse : public ros::Msg + { + public: + typedef const char* _prev_topic_type; + _prev_topic_type prev_topic; + + MuxSelectResponse(): + prev_topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_prev_topic = strlen(this->prev_topic); + varToArr(outbuffer + offset, length_prev_topic); + offset += 4; + memcpy(outbuffer + offset, this->prev_topic, length_prev_topic); + offset += length_prev_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_prev_topic; + arrToVar(length_prev_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_prev_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_prev_topic-1]=0; + this->prev_topic = (char *)(inbuffer + offset-1); + offset += length_prev_topic; + return offset; + } + + const char * getType(){ return MUXSELECT; }; + const char * getMD5(){ return "3db0a473debdbafea387c9e49358c320"; }; + + }; + + class MuxSelect { + public: + typedef MuxSelectRequest Request; + typedef MuxSelectResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/trajectory_msgs/JointTrajectory.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/trajectory_msgs/JointTrajectory.h new file mode 100644 index 0000000000000000000000000000000000000000..f03d5373eec7a5d022c683801114590bbfde5498 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/trajectory_msgs/JointTrajectory.h @@ -0,0 +1,107 @@ +#ifndef _ROS_trajectory_msgs_JointTrajectory_h +#define _ROS_trajectory_msgs_JointTrajectory_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "trajectory_msgs/JointTrajectoryPoint.h" + +namespace trajectory_msgs +{ + + class JointTrajectory : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t joint_names_length; + typedef char* _joint_names_type; + _joint_names_type st_joint_names; + _joint_names_type * joint_names; + uint32_t points_length; + typedef trajectory_msgs::JointTrajectoryPoint _points_type; + _points_type st_points; + _points_type * points; + + JointTrajectory(): + header(), + joint_names_length(0), joint_names(NULL), + points_length(0), points(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_names_length); + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_joint_namesi = strlen(this->joint_names[i]); + varToArr(outbuffer + offset, length_joint_namesi); + offset += 4; + memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); + offset += length_joint_namesi; + } + *(outbuffer + offset + 0) = (this->points_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->points_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->points_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->points_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->points_length); + for( uint32_t i = 0; i < points_length; i++){ + offset += this->points[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_names_length); + if(joint_names_lengthT > joint_names_length) + this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); + joint_names_length = joint_names_lengthT; + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_st_joint_names; + arrToVar(length_st_joint_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_joint_names-1]=0; + this->st_joint_names = (char *)(inbuffer + offset-1); + offset += length_st_joint_names; + memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); + } + uint32_t points_lengthT = ((uint32_t) (*(inbuffer + offset))); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->points_length); + if(points_lengthT > points_length) + this->points = (trajectory_msgs::JointTrajectoryPoint*)realloc(this->points, points_lengthT * sizeof(trajectory_msgs::JointTrajectoryPoint)); + points_length = points_lengthT; + for( uint32_t i = 0; i < points_length; i++){ + offset += this->st_points.deserialize(inbuffer + offset); + memcpy( &(this->points[i]), &(this->st_points), sizeof(trajectory_msgs::JointTrajectoryPoint)); + } + return offset; + } + + const char * getType(){ return "trajectory_msgs/JointTrajectory"; }; + const char * getMD5(){ return "65b4f94a94d1ed67169da35a02f33d3f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/trajectory_msgs/JointTrajectoryPoint.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/trajectory_msgs/JointTrajectoryPoint.h new file mode 100644 index 0000000000000000000000000000000000000000..dac669be42d38cbfbb7fd56c76bd2902de76b88f --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/trajectory_msgs/JointTrajectoryPoint.h @@ -0,0 +1,270 @@ +#ifndef _ROS_trajectory_msgs_JointTrajectoryPoint_h +#define _ROS_trajectory_msgs_JointTrajectoryPoint_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/duration.h" + +namespace trajectory_msgs +{ + + class JointTrajectoryPoint : public ros::Msg + { + public: + uint32_t positions_length; + typedef double _positions_type; + _positions_type st_positions; + _positions_type * positions; + uint32_t velocities_length; + typedef double _velocities_type; + _velocities_type st_velocities; + _velocities_type * velocities; + uint32_t accelerations_length; + typedef double _accelerations_type; + _accelerations_type st_accelerations; + _accelerations_type * accelerations; + uint32_t effort_length; + typedef double _effort_type; + _effort_type st_effort; + _effort_type * effort; + typedef ros::Duration _time_from_start_type; + _time_from_start_type time_from_start; + + JointTrajectoryPoint(): + positions_length(0), positions(NULL), + velocities_length(0), velocities(NULL), + accelerations_length(0), accelerations(NULL), + effort_length(0), effort(NULL), + time_from_start() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->positions_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->positions_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->positions_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->positions_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->positions_length); + for( uint32_t i = 0; i < positions_length; i++){ + union { + double real; + uint64_t base; + } u_positionsi; + u_positionsi.real = this->positions[i]; + *(outbuffer + offset + 0) = (u_positionsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_positionsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_positionsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_positionsi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_positionsi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_positionsi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_positionsi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_positionsi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->positions[i]); + } + *(outbuffer + offset + 0) = (this->velocities_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->velocities_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->velocities_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->velocities_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->velocities_length); + for( uint32_t i = 0; i < velocities_length; i++){ + union { + double real; + uint64_t base; + } u_velocitiesi; + u_velocitiesi.real = this->velocities[i]; + *(outbuffer + offset + 0) = (u_velocitiesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_velocitiesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_velocitiesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_velocitiesi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_velocitiesi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_velocitiesi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_velocitiesi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_velocitiesi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->velocities[i]); + } + *(outbuffer + offset + 0) = (this->accelerations_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->accelerations_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->accelerations_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->accelerations_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->accelerations_length); + for( uint32_t i = 0; i < accelerations_length; i++){ + union { + double real; + uint64_t base; + } u_accelerationsi; + u_accelerationsi.real = this->accelerations[i]; + *(outbuffer + offset + 0) = (u_accelerationsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_accelerationsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_accelerationsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_accelerationsi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_accelerationsi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_accelerationsi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_accelerationsi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_accelerationsi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->accelerations[i]); + } + *(outbuffer + offset + 0) = (this->effort_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->effort_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->effort_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->effort_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->effort_length); + for( uint32_t i = 0; i < effort_length; i++){ + union { + double real; + uint64_t base; + } u_efforti; + u_efforti.real = this->effort[i]; + *(outbuffer + offset + 0) = (u_efforti.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_efforti.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_efforti.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_efforti.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_efforti.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_efforti.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_efforti.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_efforti.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->effort[i]); + } + *(outbuffer + offset + 0) = (this->time_from_start.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_from_start.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_from_start.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_from_start.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_from_start.sec); + *(outbuffer + offset + 0) = (this->time_from_start.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_from_start.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_from_start.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_from_start.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_from_start.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t positions_lengthT = ((uint32_t) (*(inbuffer + offset))); + positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->positions_length); + if(positions_lengthT > positions_length) + this->positions = (double*)realloc(this->positions, positions_lengthT * sizeof(double)); + positions_length = positions_lengthT; + for( uint32_t i = 0; i < positions_length; i++){ + union { + double real; + uint64_t base; + } u_st_positions; + u_st_positions.base = 0; + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_positions = u_st_positions.real; + offset += sizeof(this->st_positions); + memcpy( &(this->positions[i]), &(this->st_positions), sizeof(double)); + } + uint32_t velocities_lengthT = ((uint32_t) (*(inbuffer + offset))); + velocities_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + velocities_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + velocities_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->velocities_length); + if(velocities_lengthT > velocities_length) + this->velocities = (double*)realloc(this->velocities, velocities_lengthT * sizeof(double)); + velocities_length = velocities_lengthT; + for( uint32_t i = 0; i < velocities_length; i++){ + union { + double real; + uint64_t base; + } u_st_velocities; + u_st_velocities.base = 0; + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_velocities = u_st_velocities.real; + offset += sizeof(this->st_velocities); + memcpy( &(this->velocities[i]), &(this->st_velocities), sizeof(double)); + } + uint32_t accelerations_lengthT = ((uint32_t) (*(inbuffer + offset))); + accelerations_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + accelerations_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + accelerations_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->accelerations_length); + if(accelerations_lengthT > accelerations_length) + this->accelerations = (double*)realloc(this->accelerations, accelerations_lengthT * sizeof(double)); + accelerations_length = accelerations_lengthT; + for( uint32_t i = 0; i < accelerations_length; i++){ + union { + double real; + uint64_t base; + } u_st_accelerations; + u_st_accelerations.base = 0; + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_accelerations = u_st_accelerations.real; + offset += sizeof(this->st_accelerations); + memcpy( &(this->accelerations[i]), &(this->st_accelerations), sizeof(double)); + } + uint32_t effort_lengthT = ((uint32_t) (*(inbuffer + offset))); + effort_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + effort_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + effort_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->effort_length); + if(effort_lengthT > effort_length) + this->effort = (double*)realloc(this->effort, effort_lengthT * sizeof(double)); + effort_length = effort_lengthT; + for( uint32_t i = 0; i < effort_length; i++){ + union { + double real; + uint64_t base; + } u_st_effort; + u_st_effort.base = 0; + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_effort = u_st_effort.real; + offset += sizeof(this->st_effort); + memcpy( &(this->effort[i]), &(this->st_effort), sizeof(double)); + } + this->time_from_start.sec = ((uint32_t) (*(inbuffer + offset))); + this->time_from_start.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_from_start.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_from_start.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_from_start.sec); + this->time_from_start.nsec = ((uint32_t) (*(inbuffer + offset))); + this->time_from_start.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_from_start.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_from_start.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_from_start.nsec); + return offset; + } + + const char * getType(){ return "trajectory_msgs/JointTrajectoryPoint"; }; + const char * getMD5(){ return "f3cd1e1c4d320c79d6985c904ae5dcd3"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/trajectory_msgs/MultiDOFJointTrajectory.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/trajectory_msgs/MultiDOFJointTrajectory.h new file mode 100644 index 0000000000000000000000000000000000000000..2ab653c72856477147a03c7419198ddad4a72920 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/trajectory_msgs/MultiDOFJointTrajectory.h @@ -0,0 +1,107 @@ +#ifndef _ROS_trajectory_msgs_MultiDOFJointTrajectory_h +#define _ROS_trajectory_msgs_MultiDOFJointTrajectory_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "trajectory_msgs/MultiDOFJointTrajectoryPoint.h" + +namespace trajectory_msgs +{ + + class MultiDOFJointTrajectory : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t joint_names_length; + typedef char* _joint_names_type; + _joint_names_type st_joint_names; + _joint_names_type * joint_names; + uint32_t points_length; + typedef trajectory_msgs::MultiDOFJointTrajectoryPoint _points_type; + _points_type st_points; + _points_type * points; + + MultiDOFJointTrajectory(): + header(), + joint_names_length(0), joint_names(NULL), + points_length(0), points(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_names_length); + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_joint_namesi = strlen(this->joint_names[i]); + varToArr(outbuffer + offset, length_joint_namesi); + offset += 4; + memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); + offset += length_joint_namesi; + } + *(outbuffer + offset + 0) = (this->points_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->points_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->points_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->points_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->points_length); + for( uint32_t i = 0; i < points_length; i++){ + offset += this->points[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_names_length); + if(joint_names_lengthT > joint_names_length) + this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); + joint_names_length = joint_names_lengthT; + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_st_joint_names; + arrToVar(length_st_joint_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_joint_names-1]=0; + this->st_joint_names = (char *)(inbuffer + offset-1); + offset += length_st_joint_names; + memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); + } + uint32_t points_lengthT = ((uint32_t) (*(inbuffer + offset))); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->points_length); + if(points_lengthT > points_length) + this->points = (trajectory_msgs::MultiDOFJointTrajectoryPoint*)realloc(this->points, points_lengthT * sizeof(trajectory_msgs::MultiDOFJointTrajectoryPoint)); + points_length = points_lengthT; + for( uint32_t i = 0; i < points_length; i++){ + offset += this->st_points.deserialize(inbuffer + offset); + memcpy( &(this->points[i]), &(this->st_points), sizeof(trajectory_msgs::MultiDOFJointTrajectoryPoint)); + } + return offset; + } + + const char * getType(){ return "trajectory_msgs/MultiDOFJointTrajectory"; }; + const char * getMD5(){ return "ef145a45a5f47b77b7f5cdde4b16c942"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/trajectory_msgs/MultiDOFJointTrajectoryPoint.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/trajectory_msgs/MultiDOFJointTrajectoryPoint.h new file mode 100644 index 0000000000000000000000000000000000000000..88b4564e28d54b46c78d25c13ef46c57fae43c8b --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/trajectory_msgs/MultiDOFJointTrajectoryPoint.h @@ -0,0 +1,139 @@ +#ifndef _ROS_trajectory_msgs_MultiDOFJointTrajectoryPoint_h +#define _ROS_trajectory_msgs_MultiDOFJointTrajectoryPoint_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Transform.h" +#include "geometry_msgs/Twist.h" +#include "ros/duration.h" + +namespace trajectory_msgs +{ + + class MultiDOFJointTrajectoryPoint : public ros::Msg + { + public: + uint32_t transforms_length; + typedef geometry_msgs::Transform _transforms_type; + _transforms_type st_transforms; + _transforms_type * transforms; + uint32_t velocities_length; + typedef geometry_msgs::Twist _velocities_type; + _velocities_type st_velocities; + _velocities_type * velocities; + uint32_t accelerations_length; + typedef geometry_msgs::Twist _accelerations_type; + _accelerations_type st_accelerations; + _accelerations_type * accelerations; + typedef ros::Duration _time_from_start_type; + _time_from_start_type time_from_start; + + MultiDOFJointTrajectoryPoint(): + transforms_length(0), transforms(NULL), + velocities_length(0), velocities(NULL), + accelerations_length(0), accelerations(NULL), + time_from_start() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->transforms_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->transforms_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->transforms_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->transforms_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->transforms_length); + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->transforms[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->velocities_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->velocities_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->velocities_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->velocities_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->velocities_length); + for( uint32_t i = 0; i < velocities_length; i++){ + offset += this->velocities[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->accelerations_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->accelerations_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->accelerations_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->accelerations_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->accelerations_length); + for( uint32_t i = 0; i < accelerations_length; i++){ + offset += this->accelerations[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->time_from_start.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_from_start.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_from_start.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_from_start.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_from_start.sec); + *(outbuffer + offset + 0) = (this->time_from_start.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_from_start.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_from_start.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_from_start.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_from_start.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t transforms_lengthT = ((uint32_t) (*(inbuffer + offset))); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->transforms_length); + if(transforms_lengthT > transforms_length) + this->transforms = (geometry_msgs::Transform*)realloc(this->transforms, transforms_lengthT * sizeof(geometry_msgs::Transform)); + transforms_length = transforms_lengthT; + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->st_transforms.deserialize(inbuffer + offset); + memcpy( &(this->transforms[i]), &(this->st_transforms), sizeof(geometry_msgs::Transform)); + } + uint32_t velocities_lengthT = ((uint32_t) (*(inbuffer + offset))); + velocities_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + velocities_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + velocities_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->velocities_length); + if(velocities_lengthT > velocities_length) + this->velocities = (geometry_msgs::Twist*)realloc(this->velocities, velocities_lengthT * sizeof(geometry_msgs::Twist)); + velocities_length = velocities_lengthT; + for( uint32_t i = 0; i < velocities_length; i++){ + offset += this->st_velocities.deserialize(inbuffer + offset); + memcpy( &(this->velocities[i]), &(this->st_velocities), sizeof(geometry_msgs::Twist)); + } + uint32_t accelerations_lengthT = ((uint32_t) (*(inbuffer + offset))); + accelerations_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + accelerations_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + accelerations_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->accelerations_length); + if(accelerations_lengthT > accelerations_length) + this->accelerations = (geometry_msgs::Twist*)realloc(this->accelerations, accelerations_lengthT * sizeof(geometry_msgs::Twist)); + accelerations_length = accelerations_lengthT; + for( uint32_t i = 0; i < accelerations_length; i++){ + offset += this->st_accelerations.deserialize(inbuffer + offset); + memcpy( &(this->accelerations[i]), &(this->st_accelerations), sizeof(geometry_msgs::Twist)); + } + this->time_from_start.sec = ((uint32_t) (*(inbuffer + offset))); + this->time_from_start.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_from_start.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_from_start.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_from_start.sec); + this->time_from_start.nsec = ((uint32_t) (*(inbuffer + offset))); + this->time_from_start.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_from_start.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_from_start.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_from_start.nsec); + return offset; + } + + const char * getType(){ return "trajectory_msgs/MultiDOFJointTrajectoryPoint"; }; + const char * getMD5(){ return "3ebe08d1abd5b65862d50e09430db776"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeAction.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeAction.h new file mode 100644 index 0000000000000000000000000000000000000000..f100e9ae652ac1761b33bf184c1db44a3c2e23a7 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_turtle_actionlib_ShapeAction_h +#define _ROS_turtle_actionlib_ShapeAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "turtle_actionlib/ShapeActionGoal.h" +#include "turtle_actionlib/ShapeActionResult.h" +#include "turtle_actionlib/ShapeActionFeedback.h" + +namespace turtle_actionlib +{ + + class ShapeAction : public ros::Msg + { + public: + typedef turtle_actionlib::ShapeActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef turtle_actionlib::ShapeActionResult _action_result_type; + _action_result_type action_result; + typedef turtle_actionlib::ShapeActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + ShapeAction(): + 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 "turtle_actionlib/ShapeAction"; }; + const char * getMD5(){ return "d73b17d6237a925511f5d7727a1dc903"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeActionFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..b57b28c3569bb7686288e96de331520af7b7b0d1 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_turtle_actionlib_ShapeActionFeedback_h +#define _ROS_turtle_actionlib_ShapeActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "turtle_actionlib/ShapeFeedback.h" + +namespace turtle_actionlib +{ + + class ShapeActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef turtle_actionlib::ShapeFeedback _feedback_type; + _feedback_type feedback; + + ShapeActionFeedback(): + 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 "turtle_actionlib/ShapeActionFeedback"; }; + const char * getMD5(){ return "aae20e09065c3809e8a8e87c4c8953fd"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeActionGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..732215e4f56c463a32bfcde4d0485511d2bf4893 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_turtle_actionlib_ShapeActionGoal_h +#define _ROS_turtle_actionlib_ShapeActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "turtle_actionlib/ShapeGoal.h" + +namespace turtle_actionlib +{ + + class ShapeActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef turtle_actionlib::ShapeGoal _goal_type; + _goal_type goal; + + ShapeActionGoal(): + 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 "turtle_actionlib/ShapeActionGoal"; }; + const char * getMD5(){ return "dbfccd187f2ec9c593916447ffd6cc77"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeActionResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..b4e4213d00a713411d6a7ac52ff101ae362521a1 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_turtle_actionlib_ShapeActionResult_h +#define _ROS_turtle_actionlib_ShapeActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "turtle_actionlib/ShapeResult.h" + +namespace turtle_actionlib +{ + + class ShapeActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef turtle_actionlib::ShapeResult _result_type; + _result_type result; + + ShapeActionResult(): + 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 "turtle_actionlib/ShapeActionResult"; }; + const char * getMD5(){ return "c8d13d5d140f1047a2e4d3bf5c045822"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..6c00c073a29dbc79e2ac4684b25cce7e593811e6 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeFeedback.h @@ -0,0 +1,38 @@ +#ifndef _ROS_turtle_actionlib_ShapeFeedback_h +#define _ROS_turtle_actionlib_ShapeFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtle_actionlib +{ + + class ShapeFeedback : public ros::Msg + { + public: + + ShapeFeedback() + { + } + + 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 "turtle_actionlib/ShapeFeedback"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeGoal.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..bb72d11ed8a1890563a2d5418f99bdb7cb52cce5 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeGoal.h @@ -0,0 +1,86 @@ +#ifndef _ROS_turtle_actionlib_ShapeGoal_h +#define _ROS_turtle_actionlib_ShapeGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtle_actionlib +{ + + class ShapeGoal : public ros::Msg + { + public: + typedef int32_t _edges_type; + _edges_type edges; + typedef float _radius_type; + _radius_type radius; + + ShapeGoal(): + edges(0), + radius(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int32_t real; + uint32_t base; + } u_edges; + u_edges.real = this->edges; + *(outbuffer + offset + 0) = (u_edges.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_edges.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_edges.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_edges.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->edges); + union { + float real; + uint32_t base; + } u_radius; + u_radius.real = this->radius; + *(outbuffer + offset + 0) = (u_radius.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_radius.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_radius.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_radius.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->radius); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int32_t real; + uint32_t base; + } u_edges; + u_edges.base = 0; + u_edges.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_edges.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_edges.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_edges.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->edges = u_edges.real; + offset += sizeof(this->edges); + union { + float real; + uint32_t base; + } u_radius; + u_radius.base = 0; + u_radius.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_radius.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_radius.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_radius.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->radius = u_radius.real; + offset += sizeof(this->radius); + return offset; + } + + const char * getType(){ return "turtle_actionlib/ShapeGoal"; }; + const char * getMD5(){ return "3b9202ab7292cebe5a95ab2bf6b9c091"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeResult.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeResult.h new file mode 100644 index 0000000000000000000000000000000000000000..2a9127d8804c634ee2e0c93c319388b3f7299cd0 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeResult.h @@ -0,0 +1,86 @@ +#ifndef _ROS_turtle_actionlib_ShapeResult_h +#define _ROS_turtle_actionlib_ShapeResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtle_actionlib +{ + + class ShapeResult : public ros::Msg + { + public: + typedef float _interior_angle_type; + _interior_angle_type interior_angle; + typedef float _apothem_type; + _apothem_type apothem; + + ShapeResult(): + interior_angle(0), + apothem(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_interior_angle; + u_interior_angle.real = this->interior_angle; + *(outbuffer + offset + 0) = (u_interior_angle.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_interior_angle.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_interior_angle.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_interior_angle.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->interior_angle); + union { + float real; + uint32_t base; + } u_apothem; + u_apothem.real = this->apothem; + *(outbuffer + offset + 0) = (u_apothem.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_apothem.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_apothem.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_apothem.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->apothem); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_interior_angle; + u_interior_angle.base = 0; + u_interior_angle.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_interior_angle.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_interior_angle.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_interior_angle.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->interior_angle = u_interior_angle.real; + offset += sizeof(this->interior_angle); + union { + float real; + uint32_t base; + } u_apothem; + u_apothem.base = 0; + u_apothem.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_apothem.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_apothem.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_apothem.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->apothem = u_apothem.real; + offset += sizeof(this->apothem); + return offset; + } + + const char * getType(){ return "turtle_actionlib/ShapeResult"; }; + const char * getMD5(){ return "b06c6e2225f820dbc644270387cd1a7c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/Velocity.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/Velocity.h new file mode 100644 index 0000000000000000000000000000000000000000..ab7141effc3f2c8815f22d1fb540bf6b8db17b71 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtle_actionlib/Velocity.h @@ -0,0 +1,86 @@ +#ifndef _ROS_turtle_actionlib_Velocity_h +#define _ROS_turtle_actionlib_Velocity_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtle_actionlib +{ + + class Velocity : public ros::Msg + { + public: + typedef float _linear_type; + _linear_type linear; + typedef float _angular_type; + _angular_type angular; + + Velocity(): + linear(0), + angular(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_linear; + u_linear.real = this->linear; + *(outbuffer + offset + 0) = (u_linear.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_linear.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_linear.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_linear.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->linear); + union { + float real; + uint32_t base; + } u_angular; + u_angular.real = this->angular; + *(outbuffer + offset + 0) = (u_angular.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angular.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angular.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angular.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angular); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_linear; + u_linear.base = 0; + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->linear = u_linear.real; + offset += sizeof(this->linear); + union { + float real; + uint32_t base; + } u_angular; + u_angular.base = 0; + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angular = u_angular.real; + offset += sizeof(this->angular); + return offset; + } + + const char * getType(){ return "turtle_actionlib/Velocity"; }; + const char * getMD5(){ return "9d5c2dcd348ac8f76ce2a4307bd63a13"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/MotorPower.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/MotorPower.h new file mode 100644 index 0000000000000000000000000000000000000000..a22dc41ad20c32c319ba1fff21dc67a32b94653a --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/MotorPower.h @@ -0,0 +1,47 @@ +#ifndef _ROS_turtlebot3_msgs_MotorPower_h +#define _ROS_turtlebot3_msgs_MotorPower_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtlebot3_msgs +{ + + class MotorPower : public ros::Msg + { + public: + typedef uint8_t _state_type; + _state_type state; + enum { OFF = 0 }; + enum { ON = 1 }; + + MotorPower(): + state(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->state >> (8 * 0)) & 0xFF; + offset += sizeof(this->state); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->state = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->state); + return offset; + } + + const char * getType(){ return "turtlebot3_msgs/MotorPower"; }; + const char * getMD5(){ return "8f77c0161e0f2021493136bb5f3f0e51"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/PanoramaImg.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/PanoramaImg.h new file mode 100644 index 0000000000000000000000000000000000000000..7d29869a7755fd6e0bb39d18ddbfe30dda3e6822 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/PanoramaImg.h @@ -0,0 +1,180 @@ +#ifndef _ROS_turtlebot3_msgs_PanoramaImg_h +#define _ROS_turtlebot3_msgs_PanoramaImg_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/Image.h" + +namespace turtlebot3_msgs +{ + + class PanoramaImg : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _pano_id_type; + _pano_id_type pano_id; + typedef double _latitude_type; + _latitude_type latitude; + typedef double _longitude_type; + _longitude_type longitude; + typedef double _heading_type; + _heading_type heading; + typedef const char* _geo_tag_type; + _geo_tag_type geo_tag; + typedef sensor_msgs::Image _image_type; + _image_type image; + + PanoramaImg(): + header(), + pano_id(""), + latitude(0), + longitude(0), + heading(0), + geo_tag(""), + image() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_pano_id = strlen(this->pano_id); + varToArr(outbuffer + offset, length_pano_id); + offset += 4; + memcpy(outbuffer + offset, this->pano_id, length_pano_id); + offset += length_pano_id; + union { + double real; + uint64_t base; + } u_latitude; + u_latitude.real = this->latitude; + *(outbuffer + offset + 0) = (u_latitude.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_latitude.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_latitude.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_latitude.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_latitude.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_latitude.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_latitude.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_latitude.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->latitude); + union { + double real; + uint64_t base; + } u_longitude; + u_longitude.real = this->longitude; + *(outbuffer + offset + 0) = (u_longitude.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_longitude.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_longitude.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_longitude.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_longitude.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_longitude.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_longitude.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_longitude.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->longitude); + union { + double real; + uint64_t base; + } u_heading; + u_heading.real = this->heading; + *(outbuffer + offset + 0) = (u_heading.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_heading.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_heading.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_heading.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_heading.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_heading.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_heading.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_heading.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->heading); + uint32_t length_geo_tag = strlen(this->geo_tag); + varToArr(outbuffer + offset, length_geo_tag); + offset += 4; + memcpy(outbuffer + offset, this->geo_tag, length_geo_tag); + offset += length_geo_tag; + offset += this->image.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_pano_id; + arrToVar(length_pano_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_pano_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_pano_id-1]=0; + this->pano_id = (char *)(inbuffer + offset-1); + offset += length_pano_id; + union { + double real; + uint64_t base; + } u_latitude; + u_latitude.base = 0; + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->latitude = u_latitude.real; + offset += sizeof(this->latitude); + union { + double real; + uint64_t base; + } u_longitude; + u_longitude.base = 0; + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->longitude = u_longitude.real; + offset += sizeof(this->longitude); + union { + double real; + uint64_t base; + } u_heading; + u_heading.base = 0; + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->heading = u_heading.real; + offset += sizeof(this->heading); + uint32_t length_geo_tag; + arrToVar(length_geo_tag, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_geo_tag; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_geo_tag-1]=0; + this->geo_tag = (char *)(inbuffer + offset-1); + offset += length_geo_tag; + offset += this->image.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "turtlebot3_msgs/PanoramaImg"; }; + const char * getMD5(){ return "aedf66295b374a7249a786af27aecc87"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/SensorState.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/SensorState.h new file mode 100644 index 0000000000000000000000000000000000000000..34b624ab9751a80939c7475d87fd516b65c32ffe --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/SensorState.h @@ -0,0 +1,166 @@ +#ifndef _ROS_turtlebot3_msgs_SensorState_h +#define _ROS_turtlebot3_msgs_SensorState_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../ros/time.h" + +namespace turtlebot3_msgs +{ + + class SensorState : public ros::Msg + { + public: + typedef ros::Time _stamp_type; + _stamp_type stamp; + typedef uint8_t _bumper_type; + _bumper_type bumper; + typedef uint8_t _cliff_type; + _cliff_type cliff; + typedef uint8_t _button_type; + _button_type button; + typedef int32_t _left_encoder_type; + _left_encoder_type left_encoder; + typedef int32_t _right_encoder_type; + _right_encoder_type right_encoder; + typedef float _battery_type; + _battery_type battery; + enum { BUMPER_RIGHT = 1 }; + enum { BUMPER_CENTER = 2 }; + enum { BUMPER_LEFT = 4 }; + enum { CLIFF_RIGHT = 1 }; + enum { CLIFF_CENTER = 2 }; + enum { CLIFF_LEFT = 4 }; + enum { BUTTON0 = 1 }; + enum { BUTTON1 = 2 }; + enum { BUTTON2 = 4 }; + enum { ERROR_LEFT_MOTOR = 1 }; + enum { ERROR_RIGHT_MOTOR = 2 }; + + SensorState(): + stamp(), + bumper(0), + cliff(0), + button(0), + left_encoder(0), + right_encoder(0), + battery(0) + { + } + + 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); + *(outbuffer + offset + 0) = (this->bumper >> (8 * 0)) & 0xFF; + offset += sizeof(this->bumper); + *(outbuffer + offset + 0) = (this->cliff >> (8 * 0)) & 0xFF; + offset += sizeof(this->cliff); + *(outbuffer + offset + 0) = (this->button >> (8 * 0)) & 0xFF; + offset += sizeof(this->button); + union { + int32_t real; + uint32_t base; + } u_left_encoder; + u_left_encoder.real = this->left_encoder; + *(outbuffer + offset + 0) = (u_left_encoder.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_left_encoder.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_left_encoder.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_left_encoder.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->left_encoder); + union { + int32_t real; + uint32_t base; + } u_right_encoder; + u_right_encoder.real = this->right_encoder; + *(outbuffer + offset + 0) = (u_right_encoder.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_right_encoder.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_right_encoder.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_right_encoder.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->right_encoder); + union { + float real; + uint32_t base; + } u_battery; + u_battery.real = this->battery; + *(outbuffer + offset + 0) = (u_battery.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_battery.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_battery.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_battery.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->battery); + 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); + this->bumper = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->bumper); + this->cliff = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->cliff); + this->button = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->button); + union { + int32_t real; + uint32_t base; + } u_left_encoder; + u_left_encoder.base = 0; + u_left_encoder.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_left_encoder.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_left_encoder.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_left_encoder.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->left_encoder = u_left_encoder.real; + offset += sizeof(this->left_encoder); + union { + int32_t real; + uint32_t base; + } u_right_encoder; + u_right_encoder.base = 0; + u_right_encoder.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_right_encoder.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_right_encoder.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_right_encoder.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->right_encoder = u_right_encoder.real; + offset += sizeof(this->right_encoder); + union { + float real; + uint32_t base; + } u_battery; + u_battery.base = 0; + u_battery.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_battery.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_battery.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_battery.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->battery = u_battery.real; + offset += sizeof(this->battery); + return offset; + } + + const char * getType(){ return "turtlebot3_msgs/SensorState"; }; + const char * getMD5(){ return "427f77f85da38bc1aa3f65ffb673c94c"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/SetFollowState.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/SetFollowState.h new file mode 100644 index 0000000000000000000000000000000000000000..cb16e5cdaca0e2fff97ad52acad4a631c46c60ca --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/SetFollowState.h @@ -0,0 +1,88 @@ +#ifndef _ROS_SERVICE_SetFollowState_h +#define _ROS_SERVICE_SetFollowState_h +#include +#include +#include +#include "ros/msg.h" + +namespace turtlebot3_msgs +{ + +static const char SETFOLLOWSTATE[] = "turtlebot3_msgs/SetFollowState"; + + class SetFollowStateRequest : public ros::Msg + { + public: + typedef uint8_t _state_type; + _state_type state; + enum { STOPPED = 0 }; + enum { FOLLOW = 1 }; + + SetFollowStateRequest(): + state(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->state >> (8 * 0)) & 0xFF; + offset += sizeof(this->state); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->state = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->state); + return offset; + } + + const char * getType(){ return SETFOLLOWSTATE; }; + const char * getMD5(){ return "92b912c48c68248015bb32deb0bf7713"; }; + + }; + + class SetFollowStateResponse : public ros::Msg + { + public: + typedef uint8_t _result_type; + _result_type result; + enum { OK = 0 }; + enum { ERROR = 1 }; + + SetFollowStateResponse(): + result(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->result >> (8 * 0)) & 0xFF; + offset += sizeof(this->result); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->result = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->result); + return offset; + } + + const char * getType(){ return SETFOLLOWSTATE; }; + const char * getMD5(){ return "37065417175a2f4a49100bc798e5ee49"; }; + + }; + + class SetFollowState { + public: + typedef SetFollowStateRequest Request; + typedef SetFollowStateResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/TakePanorama.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/TakePanorama.h new file mode 100644 index 0000000000000000000000000000000000000000..4adde3721add99eccb02d19e1eeeaddcd3c388e1 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/TakePanorama.h @@ -0,0 +1,162 @@ +#ifndef _ROS_SERVICE_TakePanorama_h +#define _ROS_SERVICE_TakePanorama_h +#include +#include +#include +#include "ros/msg.h" + +namespace turtlebot3_msgs +{ + +static const char TAKEPANORAMA[] = "turtlebot3_msgs/TakePanorama"; + + class TakePanoramaRequest : public ros::Msg + { + public: + typedef uint8_t _mode_type; + _mode_type mode; + typedef float _pano_angle_type; + _pano_angle_type pano_angle; + typedef float _snap_interval_type; + _snap_interval_type snap_interval; + typedef float _rot_vel_type; + _rot_vel_type rot_vel; + enum { SNAPANDROTATE = 0 }; + enum { CONTINUOUS = 1 }; + enum { STOP = 2 }; + + TakePanoramaRequest(): + mode(0), + pano_angle(0), + snap_interval(0), + rot_vel(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->mode >> (8 * 0)) & 0xFF; + offset += sizeof(this->mode); + union { + float real; + uint32_t base; + } u_pano_angle; + u_pano_angle.real = this->pano_angle; + *(outbuffer + offset + 0) = (u_pano_angle.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_pano_angle.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_pano_angle.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_pano_angle.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->pano_angle); + union { + float real; + uint32_t base; + } u_snap_interval; + u_snap_interval.real = this->snap_interval; + *(outbuffer + offset + 0) = (u_snap_interval.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_snap_interval.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_snap_interval.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_snap_interval.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->snap_interval); + union { + float real; + uint32_t base; + } u_rot_vel; + u_rot_vel.real = this->rot_vel; + *(outbuffer + offset + 0) = (u_rot_vel.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_rot_vel.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_rot_vel.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_rot_vel.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->rot_vel); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->mode = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->mode); + union { + float real; + uint32_t base; + } u_pano_angle; + u_pano_angle.base = 0; + u_pano_angle.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_pano_angle.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_pano_angle.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_pano_angle.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->pano_angle = u_pano_angle.real; + offset += sizeof(this->pano_angle); + union { + float real; + uint32_t base; + } u_snap_interval; + u_snap_interval.base = 0; + u_snap_interval.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_snap_interval.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_snap_interval.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_snap_interval.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->snap_interval = u_snap_interval.real; + offset += sizeof(this->snap_interval); + union { + float real; + uint32_t base; + } u_rot_vel; + u_rot_vel.base = 0; + u_rot_vel.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_rot_vel.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_rot_vel.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_rot_vel.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->rot_vel = u_rot_vel.real; + offset += sizeof(this->rot_vel); + return offset; + } + + const char * getType(){ return TAKEPANORAMA; }; + const char * getMD5(){ return "f52c694c82704221735cc576c7587ecc"; }; + + }; + + class TakePanoramaResponse : public ros::Msg + { + public: + typedef uint8_t _status_type; + _status_type status; + enum { STARTED = 0 }; + enum { IN_PROGRESS = 1 }; + enum { STOPPED = 2 }; + + TakePanoramaResponse(): + status(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->status >> (8 * 0)) & 0xFF; + offset += sizeof(this->status); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->status = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->status); + return offset; + } + + const char * getType(){ return TAKEPANORAMA; }; + const char * getMD5(){ return "1ebe3e03b034aa9578d367d7cf6ed627"; }; + + }; + + class TakePanorama { + public: + typedef TakePanoramaRequest Request; + typedef TakePanoramaResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/VersionInfo.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/VersionInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..3d81b30c650570f10d881aecf86f3ff39b82d3bb --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/VersionInfo.h @@ -0,0 +1,89 @@ +#ifndef _ROS_turtlebot3_msgs_VersionInfo_h +#define _ROS_turtlebot3_msgs_VersionInfo_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtlebot3_msgs +{ + + class VersionInfo : public ros::Msg + { + public: + typedef const char* _hardware_type; + _hardware_type hardware; + typedef const char* _firmware_type; + _firmware_type firmware; + typedef const char* _software_type; + _software_type software; + + VersionInfo(): + hardware(""), + firmware(""), + software("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_hardware = strlen(this->hardware); + varToArr(outbuffer + offset, length_hardware); + offset += 4; + memcpy(outbuffer + offset, this->hardware, length_hardware); + offset += length_hardware; + uint32_t length_firmware = strlen(this->firmware); + varToArr(outbuffer + offset, length_firmware); + offset += 4; + memcpy(outbuffer + offset, this->firmware, length_firmware); + offset += length_firmware; + uint32_t length_software = strlen(this->software); + varToArr(outbuffer + offset, length_software); + offset += 4; + memcpy(outbuffer + offset, this->software, length_software); + offset += length_software; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_hardware; + arrToVar(length_hardware, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_hardware; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_hardware-1]=0; + this->hardware = (char *)(inbuffer + offset-1); + offset += length_hardware; + uint32_t length_firmware; + arrToVar(length_firmware, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_firmware; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_firmware-1]=0; + this->firmware = (char *)(inbuffer + offset-1); + offset += length_firmware; + uint32_t length_software; + arrToVar(length_software, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_software; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_software-1]=0; + this->software = (char *)(inbuffer + offset-1); + offset += length_software; + return offset; + } + + const char * getType(){ return "turtlebot3_msgs/VersionInfo"; }; + const char * getMD5(){ return "43e0361461af2970a33107409403ef3c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlesim/Color.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlesim/Color.h new file mode 100644 index 0000000000000000000000000000000000000000..de802907bd3c787692d47611bee45ba7ea25da46 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlesim/Color.h @@ -0,0 +1,59 @@ +#ifndef _ROS_turtlesim_Color_h +#define _ROS_turtlesim_Color_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtlesim +{ + + class Color : public ros::Msg + { + public: + typedef uint8_t _r_type; + _r_type r; + typedef uint8_t _g_type; + _g_type g; + typedef uint8_t _b_type; + _b_type b; + + Color(): + r(0), + g(0), + b(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->r >> (8 * 0)) & 0xFF; + offset += sizeof(this->r); + *(outbuffer + offset + 0) = (this->g >> (8 * 0)) & 0xFF; + offset += sizeof(this->g); + *(outbuffer + offset + 0) = (this->b >> (8 * 0)) & 0xFF; + offset += sizeof(this->b); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->r = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->r); + this->g = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->g); + this->b = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->b); + return offset; + } + + const char * getType(){ return "turtlesim/Color"; }; + const char * getMD5(){ return "353891e354491c51aabe32df673fb446"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlesim/Kill.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlesim/Kill.h new file mode 100644 index 0000000000000000000000000000000000000000..086f2bbd01569bec4341a6f9ca65228806723fae --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlesim/Kill.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_Kill_h +#define _ROS_SERVICE_Kill_h +#include +#include +#include +#include "ros/msg.h" + +namespace turtlesim +{ + +static const char KILL[] = "turtlesim/Kill"; + + class KillRequest : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + + KillRequest(): + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return KILL; }; + const char * getMD5(){ return "c1f3d28f1b044c871e6eff2e9fc3c667"; }; + + }; + + class KillResponse : public ros::Msg + { + public: + + KillResponse() + { + } + + 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 KILL; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class Kill { + public: + typedef KillRequest Request; + typedef KillResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlesim/Pose.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlesim/Pose.h new file mode 100644 index 0000000000000000000000000000000000000000..7dede410337f904c20040c565f061c40ea597257 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlesim/Pose.h @@ -0,0 +1,158 @@ +#ifndef _ROS_turtlesim_Pose_h +#define _ROS_turtlesim_Pose_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtlesim +{ + + class Pose : public ros::Msg + { + public: + typedef float _x_type; + _x_type x; + typedef float _y_type; + _y_type y; + typedef float _theta_type; + _theta_type theta; + typedef float _linear_velocity_type; + _linear_velocity_type linear_velocity; + typedef float _angular_velocity_type; + _angular_velocity_type angular_velocity; + + Pose(): + x(0), + y(0), + theta(0), + linear_velocity(0), + angular_velocity(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_theta; + u_theta.real = this->theta; + *(outbuffer + offset + 0) = (u_theta.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_theta.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_theta.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_theta.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->theta); + union { + float real; + uint32_t base; + } u_linear_velocity; + u_linear_velocity.real = this->linear_velocity; + *(outbuffer + offset + 0) = (u_linear_velocity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_linear_velocity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_linear_velocity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_linear_velocity.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->linear_velocity); + union { + float real; + uint32_t base; + } u_angular_velocity; + u_angular_velocity.real = this->angular_velocity; + *(outbuffer + offset + 0) = (u_angular_velocity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angular_velocity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angular_velocity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angular_velocity.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angular_velocity); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->x = u_x.real; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->y = u_y.real; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_theta; + u_theta.base = 0; + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->theta = u_theta.real; + offset += sizeof(this->theta); + union { + float real; + uint32_t base; + } u_linear_velocity; + u_linear_velocity.base = 0; + u_linear_velocity.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_linear_velocity.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_linear_velocity.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_linear_velocity.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->linear_velocity = u_linear_velocity.real; + offset += sizeof(this->linear_velocity); + union { + float real; + uint32_t base; + } u_angular_velocity; + u_angular_velocity.base = 0; + u_angular_velocity.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angular_velocity.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angular_velocity.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angular_velocity.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angular_velocity = u_angular_velocity.real; + offset += sizeof(this->angular_velocity); + return offset; + } + + const char * getType(){ return "turtlesim/Pose"; }; + const char * getMD5(){ return "863b248d5016ca62ea2e895ae5265cf9"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlesim/SetPen.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlesim/SetPen.h new file mode 100644 index 0000000000000000000000000000000000000000..a0e32c046c8b2b7066107e6b424c15455fddc9cc --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlesim/SetPen.h @@ -0,0 +1,105 @@ +#ifndef _ROS_SERVICE_SetPen_h +#define _ROS_SERVICE_SetPen_h +#include +#include +#include +#include "ros/msg.h" + +namespace turtlesim +{ + +static const char SETPEN[] = "turtlesim/SetPen"; + + class SetPenRequest : public ros::Msg + { + public: + typedef uint8_t _r_type; + _r_type r; + typedef uint8_t _g_type; + _g_type g; + typedef uint8_t _b_type; + _b_type b; + typedef uint8_t _width_type; + _width_type width; + typedef uint8_t _off_type; + _off_type off; + + SetPenRequest(): + r(0), + g(0), + b(0), + width(0), + off(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->r >> (8 * 0)) & 0xFF; + offset += sizeof(this->r); + *(outbuffer + offset + 0) = (this->g >> (8 * 0)) & 0xFF; + offset += sizeof(this->g); + *(outbuffer + offset + 0) = (this->b >> (8 * 0)) & 0xFF; + offset += sizeof(this->b); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + offset += sizeof(this->width); + *(outbuffer + offset + 0) = (this->off >> (8 * 0)) & 0xFF; + offset += sizeof(this->off); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->r = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->r); + this->g = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->g); + this->b = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->b); + this->width = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->width); + this->off = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->off); + return offset; + } + + const char * getType(){ return SETPEN; }; + const char * getMD5(){ return "9f452acce566bf0c0954594f69a8e41b"; }; + + }; + + class SetPenResponse : public ros::Msg + { + public: + + SetPenResponse() + { + } + + 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 SETPEN; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class SetPen { + public: + typedef SetPenRequest Request; + typedef SetPenResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlesim/Spawn.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlesim/Spawn.h new file mode 100644 index 0000000000000000000000000000000000000000..f69b42febadf0ad50bd0d59d8c15fbdd0aa095be --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlesim/Spawn.h @@ -0,0 +1,176 @@ +#ifndef _ROS_SERVICE_Spawn_h +#define _ROS_SERVICE_Spawn_h +#include +#include +#include +#include "ros/msg.h" + +namespace turtlesim +{ + +static const char SPAWN[] = "turtlesim/Spawn"; + + class SpawnRequest : public ros::Msg + { + public: + typedef float _x_type; + _x_type x; + typedef float _y_type; + _y_type y; + typedef float _theta_type; + _theta_type theta; + typedef const char* _name_type; + _name_type name; + + SpawnRequest(): + x(0), + y(0), + theta(0), + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_theta; + u_theta.real = this->theta; + *(outbuffer + offset + 0) = (u_theta.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_theta.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_theta.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_theta.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->theta); + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->x = u_x.real; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->y = u_y.real; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_theta; + u_theta.base = 0; + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->theta = u_theta.real; + offset += sizeof(this->theta); + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return SPAWN; }; + const char * getMD5(){ return "57f001c49ab7b11d699f8606c1f4f7ff"; }; + + }; + + class SpawnResponse : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + + SpawnResponse(): + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return SPAWN; }; + const char * getMD5(){ return "c1f3d28f1b044c871e6eff2e9fc3c667"; }; + + }; + + class Spawn { + public: + typedef SpawnRequest Request; + typedef SpawnResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlesim/TeleportAbsolute.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlesim/TeleportAbsolute.h new file mode 100644 index 0000000000000000000000000000000000000000..c81489b06319ff7d1e7f41b194b0db5d2df23532 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlesim/TeleportAbsolute.h @@ -0,0 +1,142 @@ +#ifndef _ROS_SERVICE_TeleportAbsolute_h +#define _ROS_SERVICE_TeleportAbsolute_h +#include +#include +#include +#include "ros/msg.h" + +namespace turtlesim +{ + +static const char TELEPORTABSOLUTE[] = "turtlesim/TeleportAbsolute"; + + class TeleportAbsoluteRequest : public ros::Msg + { + public: + typedef float _x_type; + _x_type x; + typedef float _y_type; + _y_type y; + typedef float _theta_type; + _theta_type theta; + + TeleportAbsoluteRequest(): + x(0), + y(0), + theta(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_theta; + u_theta.real = this->theta; + *(outbuffer + offset + 0) = (u_theta.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_theta.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_theta.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_theta.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->theta); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->x = u_x.real; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->y = u_y.real; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_theta; + u_theta.base = 0; + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->theta = u_theta.real; + offset += sizeof(this->theta); + return offset; + } + + const char * getType(){ return TELEPORTABSOLUTE; }; + const char * getMD5(){ return "a130bc60ee6513855dc62ea83fcc5b20"; }; + + }; + + class TeleportAbsoluteResponse : public ros::Msg + { + public: + + TeleportAbsoluteResponse() + { + } + + 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 TELEPORTABSOLUTE; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class TeleportAbsolute { + public: + typedef TeleportAbsoluteRequest Request; + typedef TeleportAbsoluteResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlesim/TeleportRelative.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlesim/TeleportRelative.h new file mode 100644 index 0000000000000000000000000000000000000000..2da96682a8e149a3f139fd0043c469a46a8e27cb --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/turtlesim/TeleportRelative.h @@ -0,0 +1,118 @@ +#ifndef _ROS_SERVICE_TeleportRelative_h +#define _ROS_SERVICE_TeleportRelative_h +#include +#include +#include +#include "ros/msg.h" + +namespace turtlesim +{ + +static const char TELEPORTRELATIVE[] = "turtlesim/TeleportRelative"; + + class TeleportRelativeRequest : public ros::Msg + { + public: + typedef float _linear_type; + _linear_type linear; + typedef float _angular_type; + _angular_type angular; + + TeleportRelativeRequest(): + linear(0), + angular(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_linear; + u_linear.real = this->linear; + *(outbuffer + offset + 0) = (u_linear.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_linear.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_linear.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_linear.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->linear); + union { + float real; + uint32_t base; + } u_angular; + u_angular.real = this->angular; + *(outbuffer + offset + 0) = (u_angular.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angular.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angular.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angular.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angular); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_linear; + u_linear.base = 0; + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->linear = u_linear.real; + offset += sizeof(this->linear); + union { + float real; + uint32_t base; + } u_angular; + u_angular.base = 0; + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angular = u_angular.real; + offset += sizeof(this->angular); + return offset; + } + + const char * getType(){ return TELEPORTRELATIVE; }; + const char * getMD5(){ return "9d5c2dcd348ac8f76ce2a4307bd63a13"; }; + + }; + + class TeleportRelativeResponse : public ros::Msg + { + public: + + TeleportRelativeResponse() + { + } + + 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 TELEPORTRELATIVE; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class TeleportRelative { + public: + typedef TeleportRelativeRequest Request; + typedef TeleportRelativeResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/uuid_msgs/UniqueID.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/uuid_msgs/UniqueID.h new file mode 100644 index 0000000000000000000000000000000000000000..bf14c401a33fc3184d2b03c39d88ed674e57045c --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/uuid_msgs/UniqueID.h @@ -0,0 +1,48 @@ +#ifndef _ROS_uuid_msgs_UniqueID_h +#define _ROS_uuid_msgs_UniqueID_h + +#include +#include +#include +#include "ros/msg.h" + +namespace uuid_msgs +{ + + class UniqueID : public ros::Msg + { + public: + uint8_t uuid[16]; + + UniqueID(): + uuid() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + for( uint32_t i = 0; i < 16; i++){ + *(outbuffer + offset + 0) = (this->uuid[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->uuid[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + for( uint32_t i = 0; i < 16; i++){ + this->uuid[i] = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->uuid[i]); + } + return offset; + } + + const char * getType(){ return "uuid_msgs/UniqueID"; }; + const char * getMD5(){ return "fec2a93b6f5367ee8112c9c0b41ff310"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/variant_msgs/Test.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/variant_msgs/Test.h new file mode 100644 index 0000000000000000000000000000000000000000..4316dfeb0bb4aa556803377025230b19de1165e8 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/variant_msgs/Test.h @@ -0,0 +1,241 @@ +#ifndef _ROS_variant_msgs_Test_h +#define _ROS_variant_msgs_Test_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "std_msgs/Bool.h" +#include "std_msgs/String.h" + +namespace variant_msgs +{ + + class Test : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef int32_t _builtin_int_type; + _builtin_int_type builtin_int; + typedef bool _builtin_boolean_type; + _builtin_boolean_type builtin_boolean; + typedef std_msgs::Bool _boolean_type; + _boolean_type boolean; + typedef const char* _builtin_string_type; + _builtin_string_type builtin_string; + typedef std_msgs::String _string_type; + _string_type string; + int32_t builtin_int_array[3]; + uint32_t builtin_int_vector_length; + typedef int32_t _builtin_int_vector_type; + _builtin_int_vector_type st_builtin_int_vector; + _builtin_int_vector_type * builtin_int_vector; + std_msgs::String string_array[3]; + uint32_t string_vector_length; + typedef std_msgs::String _string_vector_type; + _string_vector_type st_string_vector; + _string_vector_type * string_vector; + bool builtin_boolean_array[3]; + enum { byte_constant = 42 }; + + Test(): + header(), + builtin_int(0), + builtin_boolean(0), + boolean(), + builtin_string(""), + string(), + builtin_int_array(), + builtin_int_vector_length(0), builtin_int_vector(NULL), + string_array(), + string_vector_length(0), string_vector(NULL), + builtin_boolean_array() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + int32_t real; + uint32_t base; + } u_builtin_int; + u_builtin_int.real = this->builtin_int; + *(outbuffer + offset + 0) = (u_builtin_int.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_builtin_int.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_builtin_int.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_builtin_int.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->builtin_int); + union { + bool real; + uint8_t base; + } u_builtin_boolean; + u_builtin_boolean.real = this->builtin_boolean; + *(outbuffer + offset + 0) = (u_builtin_boolean.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->builtin_boolean); + offset += this->boolean.serialize(outbuffer + offset); + uint32_t length_builtin_string = strlen(this->builtin_string); + varToArr(outbuffer + offset, length_builtin_string); + offset += 4; + memcpy(outbuffer + offset, this->builtin_string, length_builtin_string); + offset += length_builtin_string; + offset += this->string.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 3; i++){ + union { + int32_t real; + uint32_t base; + } u_builtin_int_arrayi; + u_builtin_int_arrayi.real = this->builtin_int_array[i]; + *(outbuffer + offset + 0) = (u_builtin_int_arrayi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_builtin_int_arrayi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_builtin_int_arrayi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_builtin_int_arrayi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->builtin_int_array[i]); + } + *(outbuffer + offset + 0) = (this->builtin_int_vector_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->builtin_int_vector_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->builtin_int_vector_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->builtin_int_vector_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->builtin_int_vector_length); + for( uint32_t i = 0; i < builtin_int_vector_length; i++){ + union { + int32_t real; + uint32_t base; + } u_builtin_int_vectori; + u_builtin_int_vectori.real = this->builtin_int_vector[i]; + *(outbuffer + offset + 0) = (u_builtin_int_vectori.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_builtin_int_vectori.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_builtin_int_vectori.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_builtin_int_vectori.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->builtin_int_vector[i]); + } + for( uint32_t i = 0; i < 3; i++){ + offset += this->string_array[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->string_vector_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->string_vector_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->string_vector_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->string_vector_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->string_vector_length); + for( uint32_t i = 0; i < string_vector_length; i++){ + offset += this->string_vector[i].serialize(outbuffer + offset); + } + for( uint32_t i = 0; i < 3; i++){ + union { + bool real; + uint8_t base; + } u_builtin_boolean_arrayi; + u_builtin_boolean_arrayi.real = this->builtin_boolean_array[i]; + *(outbuffer + offset + 0) = (u_builtin_boolean_arrayi.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->builtin_boolean_array[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + int32_t real; + uint32_t base; + } u_builtin_int; + u_builtin_int.base = 0; + u_builtin_int.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_builtin_int.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_builtin_int.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_builtin_int.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->builtin_int = u_builtin_int.real; + offset += sizeof(this->builtin_int); + union { + bool real; + uint8_t base; + } u_builtin_boolean; + u_builtin_boolean.base = 0; + u_builtin_boolean.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->builtin_boolean = u_builtin_boolean.real; + offset += sizeof(this->builtin_boolean); + offset += this->boolean.deserialize(inbuffer + offset); + uint32_t length_builtin_string; + arrToVar(length_builtin_string, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_builtin_string; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_builtin_string-1]=0; + this->builtin_string = (char *)(inbuffer + offset-1); + offset += length_builtin_string; + offset += this->string.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 3; i++){ + union { + int32_t real; + uint32_t base; + } u_builtin_int_arrayi; + u_builtin_int_arrayi.base = 0; + u_builtin_int_arrayi.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_builtin_int_arrayi.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_builtin_int_arrayi.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_builtin_int_arrayi.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->builtin_int_array[i] = u_builtin_int_arrayi.real; + offset += sizeof(this->builtin_int_array[i]); + } + uint32_t builtin_int_vector_lengthT = ((uint32_t) (*(inbuffer + offset))); + builtin_int_vector_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + builtin_int_vector_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + builtin_int_vector_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->builtin_int_vector_length); + if(builtin_int_vector_lengthT > builtin_int_vector_length) + this->builtin_int_vector = (int32_t*)realloc(this->builtin_int_vector, builtin_int_vector_lengthT * sizeof(int32_t)); + builtin_int_vector_length = builtin_int_vector_lengthT; + for( uint32_t i = 0; i < builtin_int_vector_length; i++){ + union { + int32_t real; + uint32_t base; + } u_st_builtin_int_vector; + u_st_builtin_int_vector.base = 0; + u_st_builtin_int_vector.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_builtin_int_vector.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_builtin_int_vector.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_builtin_int_vector.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_builtin_int_vector = u_st_builtin_int_vector.real; + offset += sizeof(this->st_builtin_int_vector); + memcpy( &(this->builtin_int_vector[i]), &(this->st_builtin_int_vector), sizeof(int32_t)); + } + for( uint32_t i = 0; i < 3; i++){ + offset += this->string_array[i].deserialize(inbuffer + offset); + } + uint32_t string_vector_lengthT = ((uint32_t) (*(inbuffer + offset))); + string_vector_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + string_vector_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + string_vector_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->string_vector_length); + if(string_vector_lengthT > string_vector_length) + this->string_vector = (std_msgs::String*)realloc(this->string_vector, string_vector_lengthT * sizeof(std_msgs::String)); + string_vector_length = string_vector_lengthT; + for( uint32_t i = 0; i < string_vector_length; i++){ + offset += this->st_string_vector.deserialize(inbuffer + offset); + memcpy( &(this->string_vector[i]), &(this->st_string_vector), sizeof(std_msgs::String)); + } + for( uint32_t i = 0; i < 3; i++){ + union { + bool real; + uint8_t base; + } u_builtin_boolean_arrayi; + u_builtin_boolean_arrayi.base = 0; + u_builtin_boolean_arrayi.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->builtin_boolean_array[i] = u_builtin_boolean_arrayi.real; + offset += sizeof(this->builtin_boolean_array[i]); + } + return offset; + } + + const char * getType(){ return "variant_msgs/Test"; }; + const char * getMD5(){ return "17d92d9cea3499753cb392766b3203a1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/variant_msgs/Variant.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/variant_msgs/Variant.h new file mode 100644 index 0000000000000000000000000000000000000000..c62dd4429cf993c3ab3214cd8771b034aaa6880c --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/variant_msgs/Variant.h @@ -0,0 +1,77 @@ +#ifndef _ROS_variant_msgs_Variant_h +#define _ROS_variant_msgs_Variant_h + +#include +#include +#include +#include "ros/msg.h" +#include "variant_msgs/VariantHeader.h" +#include "variant_msgs/VariantType.h" + +namespace variant_msgs +{ + + class Variant : public ros::Msg + { + public: + typedef variant_msgs::VariantHeader _header_type; + _header_type header; + typedef variant_msgs::VariantType _type_type; + _type_type type; + uint32_t data_length; + typedef uint8_t _data_type; + _data_type st_data; + _data_type * data; + + Variant(): + header(), + type(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->type.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->type.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint8_t*)realloc(this->data, data_lengthT * sizeof(uint8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint8_t)); + } + return offset; + } + + const char * getType(){ return "variant_msgs/Variant"; }; + const char * getMD5(){ return "01c24cd44ef34b0c6a309bcafb6bdfab"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/variant_msgs/VariantHeader.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/variant_msgs/VariantHeader.h new file mode 100644 index 0000000000000000000000000000000000000000..236b5cbaf6fb1fa1739423e9311c91cf218dd936 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/variant_msgs/VariantHeader.h @@ -0,0 +1,90 @@ +#ifndef _ROS_variant_msgs_VariantHeader_h +#define _ROS_variant_msgs_VariantHeader_h + +#include +#include +#include +#include "ros/msg.h" + +namespace variant_msgs +{ + + class VariantHeader : public ros::Msg + { + public: + typedef const char* _publisher_type; + _publisher_type publisher; + typedef const char* _topic_type; + _topic_type topic; + typedef bool _latched_type; + _latched_type latched; + + VariantHeader(): + publisher(""), + topic(""), + latched(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_publisher = strlen(this->publisher); + varToArr(outbuffer + offset, length_publisher); + offset += 4; + memcpy(outbuffer + offset, this->publisher, length_publisher); + offset += length_publisher; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + union { + bool real; + uint8_t base; + } u_latched; + u_latched.real = this->latched; + *(outbuffer + offset + 0) = (u_latched.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->latched); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_publisher; + arrToVar(length_publisher, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_publisher; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_publisher-1]=0; + this->publisher = (char *)(inbuffer + offset-1); + offset += length_publisher; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + union { + bool real; + uint8_t base; + } u_latched; + u_latched.base = 0; + u_latched.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->latched = u_latched.real; + offset += sizeof(this->latched); + return offset; + } + + const char * getType(){ return "variant_msgs/VariantHeader"; }; + const char * getMD5(){ return "e4adbe277ed51d50644d64067b86c73d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/variant_msgs/VariantType.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/variant_msgs/VariantType.h new file mode 100644 index 0000000000000000000000000000000000000000..66c7ac73d7769bbf59d7a0056cbc575d89616617 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/variant_msgs/VariantType.h @@ -0,0 +1,89 @@ +#ifndef _ROS_variant_msgs_VariantType_h +#define _ROS_variant_msgs_VariantType_h + +#include +#include +#include +#include "ros/msg.h" + +namespace variant_msgs +{ + + class VariantType : public ros::Msg + { + public: + typedef const char* _md5_sum_type; + _md5_sum_type md5_sum; + typedef const char* _data_type_type; + _data_type_type data_type; + typedef const char* _definition_type; + _definition_type definition; + + VariantType(): + md5_sum(""), + data_type(""), + definition("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_md5_sum = strlen(this->md5_sum); + varToArr(outbuffer + offset, length_md5_sum); + offset += 4; + memcpy(outbuffer + offset, this->md5_sum, length_md5_sum); + offset += length_md5_sum; + uint32_t length_data_type = strlen(this->data_type); + varToArr(outbuffer + offset, length_data_type); + offset += 4; + memcpy(outbuffer + offset, this->data_type, length_data_type); + offset += length_data_type; + uint32_t length_definition = strlen(this->definition); + varToArr(outbuffer + offset, length_definition); + offset += 4; + memcpy(outbuffer + offset, this->definition, length_definition); + offset += length_definition; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_md5_sum; + arrToVar(length_md5_sum, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_md5_sum; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_md5_sum-1]=0; + this->md5_sum = (char *)(inbuffer + offset-1); + offset += length_md5_sum; + uint32_t length_data_type; + arrToVar(length_data_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data_type-1]=0; + this->data_type = (char *)(inbuffer + offset-1); + offset += length_data_type; + uint32_t length_definition; + arrToVar(length_definition, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_definition; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_definition-1]=0; + this->definition = (char *)(inbuffer + offset-1); + offset += length_definition; + return offset; + } + + const char * getType(){ return "variant_msgs/VariantType"; }; + const char * getMD5(){ return "ea49579a10d85560b62a77e2f2f84caf"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/ImageMarker.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/ImageMarker.h new file mode 100644 index 0000000000000000000000000000000000000000..c69577ad449ffefc3e898f61cd93e657ce5d1b5a --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/ImageMarker.h @@ -0,0 +1,262 @@ +#ifndef _ROS_visualization_msgs_ImageMarker_h +#define _ROS_visualization_msgs_ImageMarker_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Point.h" +#include "std_msgs/ColorRGBA.h" +#include "ros/duration.h" + +namespace visualization_msgs +{ + + class ImageMarker : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _ns_type; + _ns_type ns; + typedef int32_t _id_type; + _id_type id; + typedef int32_t _type_type; + _type_type type; + typedef int32_t _action_type; + _action_type action; + typedef geometry_msgs::Point _position_type; + _position_type position; + typedef float _scale_type; + _scale_type scale; + typedef std_msgs::ColorRGBA _outline_color_type; + _outline_color_type outline_color; + typedef uint8_t _filled_type; + _filled_type filled; + typedef std_msgs::ColorRGBA _fill_color_type; + _fill_color_type fill_color; + typedef ros::Duration _lifetime_type; + _lifetime_type lifetime; + uint32_t points_length; + typedef geometry_msgs::Point _points_type; + _points_type st_points; + _points_type * points; + uint32_t outline_colors_length; + typedef std_msgs::ColorRGBA _outline_colors_type; + _outline_colors_type st_outline_colors; + _outline_colors_type * outline_colors; + enum { CIRCLE = 0 }; + enum { LINE_STRIP = 1 }; + enum { LINE_LIST = 2 }; + enum { POLYGON = 3 }; + enum { POINTS = 4 }; + enum { ADD = 0 }; + enum { REMOVE = 1 }; + + ImageMarker(): + header(), + ns(""), + id(0), + type(0), + action(0), + position(), + scale(0), + outline_color(), + filled(0), + fill_color(), + lifetime(), + points_length(0), points(NULL), + outline_colors_length(0), outline_colors(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_ns = strlen(this->ns); + varToArr(outbuffer + offset, length_ns); + offset += 4; + memcpy(outbuffer + offset, this->ns, length_ns); + offset += length_ns; + union { + int32_t real; + uint32_t base; + } u_id; + u_id.real = this->id; + *(outbuffer + offset + 0) = (u_id.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_id.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_id.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_id.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->id); + union { + int32_t real; + uint32_t base; + } u_type; + u_type.real = this->type; + *(outbuffer + offset + 0) = (u_type.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_type.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_type.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_type.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->type); + union { + int32_t real; + uint32_t base; + } u_action; + u_action.real = this->action; + *(outbuffer + offset + 0) = (u_action.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_action.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_action.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_action.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->action); + offset += this->position.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_scale; + u_scale.real = this->scale; + *(outbuffer + offset + 0) = (u_scale.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_scale.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_scale.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_scale.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->scale); + offset += this->outline_color.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->filled >> (8 * 0)) & 0xFF; + offset += sizeof(this->filled); + offset += this->fill_color.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->lifetime.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->lifetime.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->lifetime.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->lifetime.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->lifetime.sec); + *(outbuffer + offset + 0) = (this->lifetime.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->lifetime.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->lifetime.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->lifetime.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->lifetime.nsec); + *(outbuffer + offset + 0) = (this->points_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->points_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->points_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->points_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->points_length); + for( uint32_t i = 0; i < points_length; i++){ + offset += this->points[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->outline_colors_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->outline_colors_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->outline_colors_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->outline_colors_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->outline_colors_length); + for( uint32_t i = 0; i < outline_colors_length; i++){ + offset += this->outline_colors[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_ns; + arrToVar(length_ns, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_ns; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_ns-1]=0; + this->ns = (char *)(inbuffer + offset-1); + offset += length_ns; + union { + int32_t real; + uint32_t base; + } u_id; + u_id.base = 0; + u_id.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->id = u_id.real; + offset += sizeof(this->id); + union { + int32_t real; + uint32_t base; + } u_type; + u_type.base = 0; + u_type.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_type.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_type.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_type.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->type = u_type.real; + offset += sizeof(this->type); + union { + int32_t real; + uint32_t base; + } u_action; + u_action.base = 0; + u_action.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_action.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_action.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_action.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->action = u_action.real; + offset += sizeof(this->action); + offset += this->position.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_scale; + u_scale.base = 0; + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->scale = u_scale.real; + offset += sizeof(this->scale); + offset += this->outline_color.deserialize(inbuffer + offset); + this->filled = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->filled); + offset += this->fill_color.deserialize(inbuffer + offset); + this->lifetime.sec = ((uint32_t) (*(inbuffer + offset))); + this->lifetime.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->lifetime.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->lifetime.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->lifetime.sec); + this->lifetime.nsec = ((uint32_t) (*(inbuffer + offset))); + this->lifetime.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->lifetime.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->lifetime.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->lifetime.nsec); + uint32_t points_lengthT = ((uint32_t) (*(inbuffer + offset))); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->points_length); + if(points_lengthT > points_length) + this->points = (geometry_msgs::Point*)realloc(this->points, points_lengthT * sizeof(geometry_msgs::Point)); + points_length = points_lengthT; + for( uint32_t i = 0; i < points_length; i++){ + offset += this->st_points.deserialize(inbuffer + offset); + memcpy( &(this->points[i]), &(this->st_points), sizeof(geometry_msgs::Point)); + } + uint32_t outline_colors_lengthT = ((uint32_t) (*(inbuffer + offset))); + outline_colors_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + outline_colors_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + outline_colors_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->outline_colors_length); + if(outline_colors_lengthT > outline_colors_length) + this->outline_colors = (std_msgs::ColorRGBA*)realloc(this->outline_colors, outline_colors_lengthT * sizeof(std_msgs::ColorRGBA)); + outline_colors_length = outline_colors_lengthT; + for( uint32_t i = 0; i < outline_colors_length; i++){ + offset += this->st_outline_colors.deserialize(inbuffer + offset); + memcpy( &(this->outline_colors[i]), &(this->st_outline_colors), sizeof(std_msgs::ColorRGBA)); + } + return offset; + } + + const char * getType(){ return "visualization_msgs/ImageMarker"; }; + const char * getMD5(){ return "1de93c67ec8858b831025a08fbf1b35c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarker.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarker.h new file mode 100644 index 0000000000000000000000000000000000000000..8752679cd6d2c7b442ddbca122f2c9cc28db0bb4 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarker.h @@ -0,0 +1,160 @@ +#ifndef _ROS_visualization_msgs_InteractiveMarker_h +#define _ROS_visualization_msgs_InteractiveMarker_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" +#include "visualization_msgs/MenuEntry.h" +#include "visualization_msgs/InteractiveMarkerControl.h" + +namespace visualization_msgs +{ + + class InteractiveMarker : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + typedef const char* _name_type; + _name_type name; + typedef const char* _description_type; + _description_type description; + typedef float _scale_type; + _scale_type scale; + uint32_t menu_entries_length; + typedef visualization_msgs::MenuEntry _menu_entries_type; + _menu_entries_type st_menu_entries; + _menu_entries_type * menu_entries; + uint32_t controls_length; + typedef visualization_msgs::InteractiveMarkerControl _controls_type; + _controls_type st_controls; + _controls_type * controls; + + InteractiveMarker(): + header(), + pose(), + name(""), + description(""), + scale(0), + menu_entries_length(0), menu_entries(NULL), + controls_length(0), controls(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->pose.serialize(outbuffer + offset); + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_description = strlen(this->description); + varToArr(outbuffer + offset, length_description); + offset += 4; + memcpy(outbuffer + offset, this->description, length_description); + offset += length_description; + union { + float real; + uint32_t base; + } u_scale; + u_scale.real = this->scale; + *(outbuffer + offset + 0) = (u_scale.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_scale.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_scale.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_scale.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->scale); + *(outbuffer + offset + 0) = (this->menu_entries_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->menu_entries_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->menu_entries_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->menu_entries_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->menu_entries_length); + for( uint32_t i = 0; i < menu_entries_length; i++){ + offset += this->menu_entries[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->controls_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->controls_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->controls_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->controls_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->controls_length); + for( uint32_t i = 0; i < controls_length; i++){ + offset += this->controls[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->pose.deserialize(inbuffer + offset); + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_description; + arrToVar(length_description, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_description; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_description-1]=0; + this->description = (char *)(inbuffer + offset-1); + offset += length_description; + union { + float real; + uint32_t base; + } u_scale; + u_scale.base = 0; + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->scale = u_scale.real; + offset += sizeof(this->scale); + uint32_t menu_entries_lengthT = ((uint32_t) (*(inbuffer + offset))); + menu_entries_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + menu_entries_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + menu_entries_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->menu_entries_length); + if(menu_entries_lengthT > menu_entries_length) + this->menu_entries = (visualization_msgs::MenuEntry*)realloc(this->menu_entries, menu_entries_lengthT * sizeof(visualization_msgs::MenuEntry)); + menu_entries_length = menu_entries_lengthT; + for( uint32_t i = 0; i < menu_entries_length; i++){ + offset += this->st_menu_entries.deserialize(inbuffer + offset); + memcpy( &(this->menu_entries[i]), &(this->st_menu_entries), sizeof(visualization_msgs::MenuEntry)); + } + uint32_t controls_lengthT = ((uint32_t) (*(inbuffer + offset))); + controls_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + controls_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + controls_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->controls_length); + if(controls_lengthT > controls_length) + this->controls = (visualization_msgs::InteractiveMarkerControl*)realloc(this->controls, controls_lengthT * sizeof(visualization_msgs::InteractiveMarkerControl)); + controls_length = controls_lengthT; + for( uint32_t i = 0; i < controls_length; i++){ + offset += this->st_controls.deserialize(inbuffer + offset); + memcpy( &(this->controls[i]), &(this->st_controls), sizeof(visualization_msgs::InteractiveMarkerControl)); + } + return offset; + } + + const char * getType(){ return "visualization_msgs/InteractiveMarker"; }; + const char * getMD5(){ return "dd86d22909d5a3364b384492e35c10af"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerControl.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerControl.h new file mode 100644 index 0000000000000000000000000000000000000000..0c905ce8b58099aa61ba90120fe7ef3ee5d74ec1 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerControl.h @@ -0,0 +1,167 @@ +#ifndef _ROS_visualization_msgs_InteractiveMarkerControl_h +#define _ROS_visualization_msgs_InteractiveMarkerControl_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Quaternion.h" +#include "visualization_msgs/Marker.h" + +namespace visualization_msgs +{ + + class InteractiveMarkerControl : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef geometry_msgs::Quaternion _orientation_type; + _orientation_type orientation; + typedef uint8_t _orientation_mode_type; + _orientation_mode_type orientation_mode; + typedef uint8_t _interaction_mode_type; + _interaction_mode_type interaction_mode; + typedef bool _always_visible_type; + _always_visible_type always_visible; + uint32_t markers_length; + typedef visualization_msgs::Marker _markers_type; + _markers_type st_markers; + _markers_type * markers; + typedef bool _independent_marker_orientation_type; + _independent_marker_orientation_type independent_marker_orientation; + typedef const char* _description_type; + _description_type description; + enum { INHERIT = 0 }; + enum { FIXED = 1 }; + enum { VIEW_FACING = 2 }; + enum { NONE = 0 }; + enum { MENU = 1 }; + enum { BUTTON = 2 }; + enum { MOVE_AXIS = 3 }; + enum { MOVE_PLANE = 4 }; + enum { ROTATE_AXIS = 5 }; + enum { MOVE_ROTATE = 6 }; + enum { MOVE_3D = 7 }; + enum { ROTATE_3D = 8 }; + enum { MOVE_ROTATE_3D = 9 }; + + InteractiveMarkerControl(): + name(""), + orientation(), + orientation_mode(0), + interaction_mode(0), + always_visible(0), + markers_length(0), markers(NULL), + independent_marker_orientation(0), + description("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + offset += this->orientation.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->orientation_mode >> (8 * 0)) & 0xFF; + offset += sizeof(this->orientation_mode); + *(outbuffer + offset + 0) = (this->interaction_mode >> (8 * 0)) & 0xFF; + offset += sizeof(this->interaction_mode); + union { + bool real; + uint8_t base; + } u_always_visible; + u_always_visible.real = this->always_visible; + *(outbuffer + offset + 0) = (u_always_visible.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->always_visible); + *(outbuffer + offset + 0) = (this->markers_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->markers_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->markers_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->markers_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->markers_length); + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->markers[i].serialize(outbuffer + offset); + } + union { + bool real; + uint8_t base; + } u_independent_marker_orientation; + u_independent_marker_orientation.real = this->independent_marker_orientation; + *(outbuffer + offset + 0) = (u_independent_marker_orientation.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->independent_marker_orientation); + uint32_t length_description = strlen(this->description); + varToArr(outbuffer + offset, length_description); + offset += 4; + memcpy(outbuffer + offset, this->description, length_description); + offset += length_description; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + offset += this->orientation.deserialize(inbuffer + offset); + this->orientation_mode = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->orientation_mode); + this->interaction_mode = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->interaction_mode); + union { + bool real; + uint8_t base; + } u_always_visible; + u_always_visible.base = 0; + u_always_visible.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->always_visible = u_always_visible.real; + offset += sizeof(this->always_visible); + uint32_t markers_lengthT = ((uint32_t) (*(inbuffer + offset))); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->markers_length); + if(markers_lengthT > markers_length) + this->markers = (visualization_msgs::Marker*)realloc(this->markers, markers_lengthT * sizeof(visualization_msgs::Marker)); + markers_length = markers_lengthT; + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->st_markers.deserialize(inbuffer + offset); + memcpy( &(this->markers[i]), &(this->st_markers), sizeof(visualization_msgs::Marker)); + } + union { + bool real; + uint8_t base; + } u_independent_marker_orientation; + u_independent_marker_orientation.base = 0; + u_independent_marker_orientation.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->independent_marker_orientation = u_independent_marker_orientation.real; + offset += sizeof(this->independent_marker_orientation); + uint32_t length_description; + arrToVar(length_description, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_description; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_description-1]=0; + this->description = (char *)(inbuffer + offset-1); + offset += length_description; + return offset; + } + + const char * getType(){ return "visualization_msgs/InteractiveMarkerControl"; }; + const char * getMD5(){ return "b3c81e785788195d1840b86c28da1aac"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerFeedback.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..3d5cebb2127b1da33f980f20b39b2ea302d1812b --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerFeedback.h @@ -0,0 +1,151 @@ +#ifndef _ROS_visualization_msgs_InteractiveMarkerFeedback_h +#define _ROS_visualization_msgs_InteractiveMarkerFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Point.h" + +namespace visualization_msgs +{ + + class InteractiveMarkerFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _client_id_type; + _client_id_type client_id; + typedef const char* _marker_name_type; + _marker_name_type marker_name; + typedef const char* _control_name_type; + _control_name_type control_name; + typedef uint8_t _event_type_type; + _event_type_type event_type; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + typedef uint32_t _menu_entry_id_type; + _menu_entry_id_type menu_entry_id; + typedef geometry_msgs::Point _mouse_point_type; + _mouse_point_type mouse_point; + typedef bool _mouse_point_valid_type; + _mouse_point_valid_type mouse_point_valid; + enum { KEEP_ALIVE = 0 }; + enum { POSE_UPDATE = 1 }; + enum { MENU_SELECT = 2 }; + enum { BUTTON_CLICK = 3 }; + enum { MOUSE_DOWN = 4 }; + enum { MOUSE_UP = 5 }; + + InteractiveMarkerFeedback(): + header(), + client_id(""), + marker_name(""), + control_name(""), + event_type(0), + pose(), + menu_entry_id(0), + mouse_point(), + mouse_point_valid(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_client_id = strlen(this->client_id); + varToArr(outbuffer + offset, length_client_id); + offset += 4; + memcpy(outbuffer + offset, this->client_id, length_client_id); + offset += length_client_id; + uint32_t length_marker_name = strlen(this->marker_name); + varToArr(outbuffer + offset, length_marker_name); + offset += 4; + memcpy(outbuffer + offset, this->marker_name, length_marker_name); + offset += length_marker_name; + uint32_t length_control_name = strlen(this->control_name); + varToArr(outbuffer + offset, length_control_name); + offset += 4; + memcpy(outbuffer + offset, this->control_name, length_control_name); + offset += length_control_name; + *(outbuffer + offset + 0) = (this->event_type >> (8 * 0)) & 0xFF; + offset += sizeof(this->event_type); + offset += this->pose.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->menu_entry_id >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->menu_entry_id >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->menu_entry_id >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->menu_entry_id >> (8 * 3)) & 0xFF; + offset += sizeof(this->menu_entry_id); + offset += this->mouse_point.serialize(outbuffer + offset); + union { + bool real; + uint8_t base; + } u_mouse_point_valid; + u_mouse_point_valid.real = this->mouse_point_valid; + *(outbuffer + offset + 0) = (u_mouse_point_valid.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->mouse_point_valid); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_client_id; + arrToVar(length_client_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_client_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_client_id-1]=0; + this->client_id = (char *)(inbuffer + offset-1); + offset += length_client_id; + uint32_t length_marker_name; + arrToVar(length_marker_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_marker_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_marker_name-1]=0; + this->marker_name = (char *)(inbuffer + offset-1); + offset += length_marker_name; + uint32_t length_control_name; + arrToVar(length_control_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_control_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_control_name-1]=0; + this->control_name = (char *)(inbuffer + offset-1); + offset += length_control_name; + this->event_type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->event_type); + offset += this->pose.deserialize(inbuffer + offset); + this->menu_entry_id = ((uint32_t) (*(inbuffer + offset))); + this->menu_entry_id |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->menu_entry_id |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->menu_entry_id |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->menu_entry_id); + offset += this->mouse_point.deserialize(inbuffer + offset); + union { + bool real; + uint8_t base; + } u_mouse_point_valid; + u_mouse_point_valid.base = 0; + u_mouse_point_valid.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->mouse_point_valid = u_mouse_point_valid.real; + offset += sizeof(this->mouse_point_valid); + return offset; + } + + const char * getType(){ return "visualization_msgs/InteractiveMarkerFeedback"; }; + const char * getMD5(){ return "ab0f1eee058667e28c19ff3ffc3f4b78"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerInit.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerInit.h new file mode 100644 index 0000000000000000000000000000000000000000..a6fb154a839647e1720fc14cee0500fc35a302c8 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerInit.h @@ -0,0 +1,105 @@ +#ifndef _ROS_visualization_msgs_InteractiveMarkerInit_h +#define _ROS_visualization_msgs_InteractiveMarkerInit_h + +#include +#include +#include +#include "ros/msg.h" +#include "visualization_msgs/InteractiveMarker.h" + +namespace visualization_msgs +{ + + class InteractiveMarkerInit : public ros::Msg + { + public: + typedef const char* _server_id_type; + _server_id_type server_id; + typedef uint64_t _seq_num_type; + _seq_num_type seq_num; + uint32_t markers_length; + typedef visualization_msgs::InteractiveMarker _markers_type; + _markers_type st_markers; + _markers_type * markers; + + InteractiveMarkerInit(): + server_id(""), + seq_num(0), + markers_length(0), markers(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_server_id = strlen(this->server_id); + varToArr(outbuffer + offset, length_server_id); + offset += 4; + memcpy(outbuffer + offset, this->server_id, length_server_id); + offset += length_server_id; + union { + uint64_t real; + uint32_t base; + } u_seq_num; + u_seq_num.real = this->seq_num; + *(outbuffer + offset + 0) = (u_seq_num.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_seq_num.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_seq_num.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_seq_num.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->seq_num); + *(outbuffer + offset + 0) = (this->markers_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->markers_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->markers_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->markers_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->markers_length); + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->markers[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_server_id; + arrToVar(length_server_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_server_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_server_id-1]=0; + this->server_id = (char *)(inbuffer + offset-1); + offset += length_server_id; + union { + uint64_t real; + uint32_t base; + } u_seq_num; + u_seq_num.base = 0; + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->seq_num = u_seq_num.real; + offset += sizeof(this->seq_num); + uint32_t markers_lengthT = ((uint32_t) (*(inbuffer + offset))); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->markers_length); + if(markers_lengthT > markers_length) + this->markers = (visualization_msgs::InteractiveMarker*)realloc(this->markers, markers_lengthT * sizeof(visualization_msgs::InteractiveMarker)); + markers_length = markers_lengthT; + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->st_markers.deserialize(inbuffer + offset); + memcpy( &(this->markers[i]), &(this->st_markers), sizeof(visualization_msgs::InteractiveMarker)); + } + return offset; + } + + const char * getType(){ return "visualization_msgs/InteractiveMarkerInit"; }; + const char * getMD5(){ return "d5f2c5045a72456d228676ab91048734"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerPose.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerPose.h new file mode 100644 index 0000000000000000000000000000000000000000..f46032af0cc48ba76797cfb5ba82538ec9c04893 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerPose.h @@ -0,0 +1,67 @@ +#ifndef _ROS_visualization_msgs_InteractiveMarkerPose_h +#define _ROS_visualization_msgs_InteractiveMarkerPose_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" + +namespace visualization_msgs +{ + + class InteractiveMarkerPose : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + typedef const char* _name_type; + _name_type name; + + InteractiveMarkerPose(): + header(), + pose(), + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->pose.serialize(outbuffer + offset); + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->pose.deserialize(inbuffer + offset); + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return "visualization_msgs/InteractiveMarkerPose"; }; + const char * getMD5(){ return "a6e6833209a196a38d798dadb02c81f8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerUpdate.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerUpdate.h new file mode 100644 index 0000000000000000000000000000000000000000..8cea6ca12571ee5aa8223d0a5f29b4c0b3a2427b --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerUpdate.h @@ -0,0 +1,177 @@ +#ifndef _ROS_visualization_msgs_InteractiveMarkerUpdate_h +#define _ROS_visualization_msgs_InteractiveMarkerUpdate_h + +#include +#include +#include +#include "ros/msg.h" +#include "visualization_msgs/InteractiveMarker.h" +#include "visualization_msgs/InteractiveMarkerPose.h" + +namespace visualization_msgs +{ + + class InteractiveMarkerUpdate : public ros::Msg + { + public: + typedef const char* _server_id_type; + _server_id_type server_id; + typedef uint64_t _seq_num_type; + _seq_num_type seq_num; + typedef uint8_t _type_type; + _type_type type; + uint32_t markers_length; + typedef visualization_msgs::InteractiveMarker _markers_type; + _markers_type st_markers; + _markers_type * markers; + uint32_t poses_length; + typedef visualization_msgs::InteractiveMarkerPose _poses_type; + _poses_type st_poses; + _poses_type * poses; + uint32_t erases_length; + typedef char* _erases_type; + _erases_type st_erases; + _erases_type * erases; + enum { KEEP_ALIVE = 0 }; + enum { UPDATE = 1 }; + + InteractiveMarkerUpdate(): + server_id(""), + seq_num(0), + type(0), + markers_length(0), markers(NULL), + poses_length(0), poses(NULL), + erases_length(0), erases(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_server_id = strlen(this->server_id); + varToArr(outbuffer + offset, length_server_id); + offset += 4; + memcpy(outbuffer + offset, this->server_id, length_server_id); + offset += length_server_id; + union { + uint64_t real; + uint32_t base; + } u_seq_num; + u_seq_num.real = this->seq_num; + *(outbuffer + offset + 0) = (u_seq_num.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_seq_num.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_seq_num.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_seq_num.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->seq_num); + *(outbuffer + offset + 0) = (this->type >> (8 * 0)) & 0xFF; + offset += sizeof(this->type); + *(outbuffer + offset + 0) = (this->markers_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->markers_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->markers_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->markers_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->markers_length); + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->markers[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->poses_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->poses_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->poses_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->poses_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->poses_length); + for( uint32_t i = 0; i < poses_length; i++){ + offset += this->poses[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->erases_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->erases_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->erases_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->erases_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->erases_length); + for( uint32_t i = 0; i < erases_length; i++){ + uint32_t length_erasesi = strlen(this->erases[i]); + varToArr(outbuffer + offset, length_erasesi); + offset += 4; + memcpy(outbuffer + offset, this->erases[i], length_erasesi); + offset += length_erasesi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_server_id; + arrToVar(length_server_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_server_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_server_id-1]=0; + this->server_id = (char *)(inbuffer + offset-1); + offset += length_server_id; + union { + uint64_t real; + uint32_t base; + } u_seq_num; + u_seq_num.base = 0; + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->seq_num = u_seq_num.real; + offset += sizeof(this->seq_num); + this->type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->type); + uint32_t markers_lengthT = ((uint32_t) (*(inbuffer + offset))); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->markers_length); + if(markers_lengthT > markers_length) + this->markers = (visualization_msgs::InteractiveMarker*)realloc(this->markers, markers_lengthT * sizeof(visualization_msgs::InteractiveMarker)); + markers_length = markers_lengthT; + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->st_markers.deserialize(inbuffer + offset); + memcpy( &(this->markers[i]), &(this->st_markers), sizeof(visualization_msgs::InteractiveMarker)); + } + uint32_t poses_lengthT = ((uint32_t) (*(inbuffer + offset))); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->poses_length); + if(poses_lengthT > poses_length) + this->poses = (visualization_msgs::InteractiveMarkerPose*)realloc(this->poses, poses_lengthT * sizeof(visualization_msgs::InteractiveMarkerPose)); + poses_length = poses_lengthT; + for( uint32_t i = 0; i < poses_length; i++){ + offset += this->st_poses.deserialize(inbuffer + offset); + memcpy( &(this->poses[i]), &(this->st_poses), sizeof(visualization_msgs::InteractiveMarkerPose)); + } + uint32_t erases_lengthT = ((uint32_t) (*(inbuffer + offset))); + erases_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + erases_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + erases_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->erases_length); + if(erases_lengthT > erases_length) + this->erases = (char**)realloc(this->erases, erases_lengthT * sizeof(char*)); + erases_length = erases_lengthT; + for( uint32_t i = 0; i < erases_length; i++){ + uint32_t length_st_erases; + arrToVar(length_st_erases, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_erases; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_erases-1]=0; + this->st_erases = (char *)(inbuffer + offset-1); + offset += length_st_erases; + memcpy( &(this->erases[i]), &(this->st_erases), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return "visualization_msgs/InteractiveMarkerUpdate"; }; + const char * getMD5(){ return "710d308d0a9276d65945e92dd30b3946"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/Marker.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/Marker.h new file mode 100644 index 0000000000000000000000000000000000000000..1c6e1b2e428b68127a82a9b8f1451bd100ad21d9 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/Marker.h @@ -0,0 +1,312 @@ +#ifndef _ROS_visualization_msgs_Marker_h +#define _ROS_visualization_msgs_Marker_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Vector3.h" +#include "std_msgs/ColorRGBA.h" +#include "ros/duration.h" +#include "geometry_msgs/Point.h" + +namespace visualization_msgs +{ + + class Marker : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _ns_type; + _ns_type ns; + typedef int32_t _id_type; + _id_type id; + typedef int32_t _type_type; + _type_type type; + typedef int32_t _action_type; + _action_type action; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + typedef geometry_msgs::Vector3 _scale_type; + _scale_type scale; + typedef std_msgs::ColorRGBA _color_type; + _color_type color; + typedef ros::Duration _lifetime_type; + _lifetime_type lifetime; + typedef bool _frame_locked_type; + _frame_locked_type frame_locked; + uint32_t points_length; + typedef geometry_msgs::Point _points_type; + _points_type st_points; + _points_type * points; + uint32_t colors_length; + typedef std_msgs::ColorRGBA _colors_type; + _colors_type st_colors; + _colors_type * colors; + typedef const char* _text_type; + _text_type text; + typedef const char* _mesh_resource_type; + _mesh_resource_type mesh_resource; + typedef bool _mesh_use_embedded_materials_type; + _mesh_use_embedded_materials_type mesh_use_embedded_materials; + enum { ARROW = 0 }; + enum { CUBE = 1 }; + enum { SPHERE = 2 }; + enum { CYLINDER = 3 }; + enum { LINE_STRIP = 4 }; + enum { LINE_LIST = 5 }; + enum { CUBE_LIST = 6 }; + enum { SPHERE_LIST = 7 }; + enum { POINTS = 8 }; + enum { TEXT_VIEW_FACING = 9 }; + enum { MESH_RESOURCE = 10 }; + enum { TRIANGLE_LIST = 11 }; + enum { ADD = 0 }; + enum { MODIFY = 0 }; + enum { DELETE = 2 }; + enum { DELETEALL = 3 }; + + Marker(): + header(), + ns(""), + id(0), + type(0), + action(0), + pose(), + scale(), + color(), + lifetime(), + frame_locked(0), + points_length(0), points(NULL), + colors_length(0), colors(NULL), + text(""), + mesh_resource(""), + mesh_use_embedded_materials(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_ns = strlen(this->ns); + varToArr(outbuffer + offset, length_ns); + offset += 4; + memcpy(outbuffer + offset, this->ns, length_ns); + offset += length_ns; + union { + int32_t real; + uint32_t base; + } u_id; + u_id.real = this->id; + *(outbuffer + offset + 0) = (u_id.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_id.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_id.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_id.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->id); + union { + int32_t real; + uint32_t base; + } u_type; + u_type.real = this->type; + *(outbuffer + offset + 0) = (u_type.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_type.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_type.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_type.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->type); + union { + int32_t real; + uint32_t base; + } u_action; + u_action.real = this->action; + *(outbuffer + offset + 0) = (u_action.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_action.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_action.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_action.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->action); + offset += this->pose.serialize(outbuffer + offset); + offset += this->scale.serialize(outbuffer + offset); + offset += this->color.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->lifetime.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->lifetime.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->lifetime.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->lifetime.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->lifetime.sec); + *(outbuffer + offset + 0) = (this->lifetime.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->lifetime.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->lifetime.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->lifetime.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->lifetime.nsec); + union { + bool real; + uint8_t base; + } u_frame_locked; + u_frame_locked.real = this->frame_locked; + *(outbuffer + offset + 0) = (u_frame_locked.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->frame_locked); + *(outbuffer + offset + 0) = (this->points_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->points_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->points_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->points_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->points_length); + for( uint32_t i = 0; i < points_length; i++){ + offset += this->points[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->colors_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->colors_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->colors_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->colors_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->colors_length); + for( uint32_t i = 0; i < colors_length; i++){ + offset += this->colors[i].serialize(outbuffer + offset); + } + uint32_t length_text = strlen(this->text); + varToArr(outbuffer + offset, length_text); + offset += 4; + memcpy(outbuffer + offset, this->text, length_text); + offset += length_text; + uint32_t length_mesh_resource = strlen(this->mesh_resource); + varToArr(outbuffer + offset, length_mesh_resource); + offset += 4; + memcpy(outbuffer + offset, this->mesh_resource, length_mesh_resource); + offset += length_mesh_resource; + union { + bool real; + uint8_t base; + } u_mesh_use_embedded_materials; + u_mesh_use_embedded_materials.real = this->mesh_use_embedded_materials; + *(outbuffer + offset + 0) = (u_mesh_use_embedded_materials.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->mesh_use_embedded_materials); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_ns; + arrToVar(length_ns, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_ns; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_ns-1]=0; + this->ns = (char *)(inbuffer + offset-1); + offset += length_ns; + union { + int32_t real; + uint32_t base; + } u_id; + u_id.base = 0; + u_id.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->id = u_id.real; + offset += sizeof(this->id); + union { + int32_t real; + uint32_t base; + } u_type; + u_type.base = 0; + u_type.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_type.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_type.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_type.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->type = u_type.real; + offset += sizeof(this->type); + union { + int32_t real; + uint32_t base; + } u_action; + u_action.base = 0; + u_action.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_action.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_action.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_action.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->action = u_action.real; + offset += sizeof(this->action); + offset += this->pose.deserialize(inbuffer + offset); + offset += this->scale.deserialize(inbuffer + offset); + offset += this->color.deserialize(inbuffer + offset); + this->lifetime.sec = ((uint32_t) (*(inbuffer + offset))); + this->lifetime.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->lifetime.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->lifetime.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->lifetime.sec); + this->lifetime.nsec = ((uint32_t) (*(inbuffer + offset))); + this->lifetime.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->lifetime.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->lifetime.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->lifetime.nsec); + union { + bool real; + uint8_t base; + } u_frame_locked; + u_frame_locked.base = 0; + u_frame_locked.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->frame_locked = u_frame_locked.real; + offset += sizeof(this->frame_locked); + uint32_t points_lengthT = ((uint32_t) (*(inbuffer + offset))); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->points_length); + if(points_lengthT > points_length) + this->points = (geometry_msgs::Point*)realloc(this->points, points_lengthT * sizeof(geometry_msgs::Point)); + points_length = points_lengthT; + for( uint32_t i = 0; i < points_length; i++){ + offset += this->st_points.deserialize(inbuffer + offset); + memcpy( &(this->points[i]), &(this->st_points), sizeof(geometry_msgs::Point)); + } + uint32_t colors_lengthT = ((uint32_t) (*(inbuffer + offset))); + colors_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + colors_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + colors_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->colors_length); + if(colors_lengthT > colors_length) + this->colors = (std_msgs::ColorRGBA*)realloc(this->colors, colors_lengthT * sizeof(std_msgs::ColorRGBA)); + colors_length = colors_lengthT; + for( uint32_t i = 0; i < colors_length; i++){ + offset += this->st_colors.deserialize(inbuffer + offset); + memcpy( &(this->colors[i]), &(this->st_colors), sizeof(std_msgs::ColorRGBA)); + } + uint32_t length_text; + arrToVar(length_text, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_text; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_text-1]=0; + this->text = (char *)(inbuffer + offset-1); + offset += length_text; + uint32_t length_mesh_resource; + arrToVar(length_mesh_resource, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_mesh_resource; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_mesh_resource-1]=0; + this->mesh_resource = (char *)(inbuffer + offset-1); + offset += length_mesh_resource; + union { + bool real; + uint8_t base; + } u_mesh_use_embedded_materials; + u_mesh_use_embedded_materials.base = 0; + u_mesh_use_embedded_materials.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->mesh_use_embedded_materials = u_mesh_use_embedded_materials.real; + offset += sizeof(this->mesh_use_embedded_materials); + return offset; + } + + const char * getType(){ return "visualization_msgs/Marker"; }; + const char * getMD5(){ return "4048c9de2a16f4ae8e0538085ebf1b97"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/MarkerArray.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/MarkerArray.h new file mode 100644 index 0000000000000000000000000000000000000000..20d1fce0a6bdd2f3889266d860c1a04834641ff3 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/MarkerArray.h @@ -0,0 +1,64 @@ +#ifndef _ROS_visualization_msgs_MarkerArray_h +#define _ROS_visualization_msgs_MarkerArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "visualization_msgs/Marker.h" + +namespace visualization_msgs +{ + + class MarkerArray : public ros::Msg + { + public: + uint32_t markers_length; + typedef visualization_msgs::Marker _markers_type; + _markers_type st_markers; + _markers_type * markers; + + MarkerArray(): + markers_length(0), markers(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->markers_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->markers_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->markers_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->markers_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->markers_length); + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->markers[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t markers_lengthT = ((uint32_t) (*(inbuffer + offset))); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->markers_length); + if(markers_lengthT > markers_length) + this->markers = (visualization_msgs::Marker*)realloc(this->markers, markers_lengthT * sizeof(visualization_msgs::Marker)); + markers_length = markers_lengthT; + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->st_markers.deserialize(inbuffer + offset); + memcpy( &(this->markers[i]), &(this->st_markers), sizeof(visualization_msgs::Marker)); + } + return offset; + } + + const char * getType(){ return "visualization_msgs/MarkerArray"; }; + const char * getMD5(){ return "d155b9ce5188fbaf89745847fd5882d7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/MenuEntry.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/MenuEntry.h new file mode 100644 index 0000000000000000000000000000000000000000..c7b6c2393ac3e1c78fab27caf77ba8fef349a712 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/visualization_msgs/MenuEntry.h @@ -0,0 +1,108 @@ +#ifndef _ROS_visualization_msgs_MenuEntry_h +#define _ROS_visualization_msgs_MenuEntry_h + +#include +#include +#include +#include "ros/msg.h" + +namespace visualization_msgs +{ + + class MenuEntry : public ros::Msg + { + public: + typedef uint32_t _id_type; + _id_type id; + typedef uint32_t _parent_id_type; + _parent_id_type parent_id; + typedef const char* _title_type; + _title_type title; + typedef const char* _command_type; + _command_type command; + typedef uint8_t _command_type_type; + _command_type_type command_type; + enum { FEEDBACK = 0 }; + enum { ROSRUN = 1 }; + enum { ROSLAUNCH = 2 }; + + MenuEntry(): + id(0), + parent_id(0), + title(""), + command(""), + command_type(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->id >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->id >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->id >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->id >> (8 * 3)) & 0xFF; + offset += sizeof(this->id); + *(outbuffer + offset + 0) = (this->parent_id >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->parent_id >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->parent_id >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->parent_id >> (8 * 3)) & 0xFF; + offset += sizeof(this->parent_id); + uint32_t length_title = strlen(this->title); + varToArr(outbuffer + offset, length_title); + offset += 4; + memcpy(outbuffer + offset, this->title, length_title); + offset += length_title; + uint32_t length_command = strlen(this->command); + varToArr(outbuffer + offset, length_command); + offset += 4; + memcpy(outbuffer + offset, this->command, length_command); + offset += length_command; + *(outbuffer + offset + 0) = (this->command_type >> (8 * 0)) & 0xFF; + offset += sizeof(this->command_type); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->id = ((uint32_t) (*(inbuffer + offset))); + this->id |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->id |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->id |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->id); + this->parent_id = ((uint32_t) (*(inbuffer + offset))); + this->parent_id |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->parent_id |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->parent_id |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->parent_id); + uint32_t length_title; + arrToVar(length_title, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_title; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_title-1]=0; + this->title = (char *)(inbuffer + offset-1); + offset += length_title; + uint32_t length_command; + arrToVar(length_command, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_command; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_command-1]=0; + this->command = (char *)(inbuffer + offset-1); + offset += length_command; + this->command_type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->command_type); + return offset; + } + + const char * getType(){ return "visualization_msgs/MenuEntry"; }; + const char * getMD5(){ return "b90ec63024573de83b57aa93eb39be2d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/wfov_camera_msgs/WFOVCompressedImage.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/wfov_camera_msgs/WFOVCompressedImage.h new file mode 100644 index 0000000000000000000000000000000000000000..c6b05bc4138b685c531db1569b99420d5f777eab --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/wfov_camera_msgs/WFOVCompressedImage.h @@ -0,0 +1,169 @@ +#ifndef _ROS_wfov_camera_msgs_WFOVCompressedImage_h +#define _ROS_wfov_camera_msgs_WFOVCompressedImage_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/CompressedImage.h" +#include "sensor_msgs/CameraInfo.h" +#include "geometry_msgs/TransformStamped.h" + +namespace wfov_camera_msgs +{ + + class WFOVCompressedImage : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _time_reference_type; + _time_reference_type time_reference; + typedef sensor_msgs::CompressedImage _image_type; + _image_type image; + typedef sensor_msgs::CameraInfo _info_type; + _info_type info; + typedef float _shutter_type; + _shutter_type shutter; + typedef float _gain_type; + _gain_type gain; + typedef uint16_t _white_balance_blue_type; + _white_balance_blue_type white_balance_blue; + typedef uint16_t _white_balance_red_type; + _white_balance_red_type white_balance_red; + typedef float _temperature_type; + _temperature_type temperature; + typedef geometry_msgs::TransformStamped _worldToCamera_type; + _worldToCamera_type worldToCamera; + + WFOVCompressedImage(): + header(), + time_reference(""), + image(), + info(), + shutter(0), + gain(0), + white_balance_blue(0), + white_balance_red(0), + temperature(0), + worldToCamera() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_time_reference = strlen(this->time_reference); + varToArr(outbuffer + offset, length_time_reference); + offset += 4; + memcpy(outbuffer + offset, this->time_reference, length_time_reference); + offset += length_time_reference; + offset += this->image.serialize(outbuffer + offset); + offset += this->info.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_shutter; + u_shutter.real = this->shutter; + *(outbuffer + offset + 0) = (u_shutter.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_shutter.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_shutter.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_shutter.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->shutter); + union { + float real; + uint32_t base; + } u_gain; + u_gain.real = this->gain; + *(outbuffer + offset + 0) = (u_gain.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_gain.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_gain.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_gain.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->gain); + *(outbuffer + offset + 0) = (this->white_balance_blue >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->white_balance_blue >> (8 * 1)) & 0xFF; + offset += sizeof(this->white_balance_blue); + *(outbuffer + offset + 0) = (this->white_balance_red >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->white_balance_red >> (8 * 1)) & 0xFF; + offset += sizeof(this->white_balance_red); + union { + float real; + uint32_t base; + } u_temperature; + u_temperature.real = this->temperature; + *(outbuffer + offset + 0) = (u_temperature.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_temperature.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_temperature.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_temperature.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->temperature); + offset += this->worldToCamera.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_time_reference; + arrToVar(length_time_reference, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_time_reference; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_time_reference-1]=0; + this->time_reference = (char *)(inbuffer + offset-1); + offset += length_time_reference; + offset += this->image.deserialize(inbuffer + offset); + offset += this->info.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_shutter; + u_shutter.base = 0; + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->shutter = u_shutter.real; + offset += sizeof(this->shutter); + union { + float real; + uint32_t base; + } u_gain; + u_gain.base = 0; + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->gain = u_gain.real; + offset += sizeof(this->gain); + this->white_balance_blue = ((uint16_t) (*(inbuffer + offset))); + this->white_balance_blue |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->white_balance_blue); + this->white_balance_red = ((uint16_t) (*(inbuffer + offset))); + this->white_balance_red |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->white_balance_red); + union { + float real; + uint32_t base; + } u_temperature; + u_temperature.base = 0; + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->temperature = u_temperature.real; + offset += sizeof(this->temperature); + offset += this->worldToCamera.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "wfov_camera_msgs/WFOVCompressedImage"; }; + const char * getMD5(){ return "5b0f85e79ffccd27dc377911c83e026f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/wfov_camera_msgs/WFOVImage.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/wfov_camera_msgs/WFOVImage.h new file mode 100644 index 0000000000000000000000000000000000000000..6ce4f0e281911555b7ca8e2e4128860d4bbef069 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/wfov_camera_msgs/WFOVImage.h @@ -0,0 +1,163 @@ +#ifndef _ROS_wfov_camera_msgs_WFOVImage_h +#define _ROS_wfov_camera_msgs_WFOVImage_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/Image.h" +#include "sensor_msgs/CameraInfo.h" + +namespace wfov_camera_msgs +{ + + class WFOVImage : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _time_reference_type; + _time_reference_type time_reference; + typedef sensor_msgs::Image _image_type; + _image_type image; + typedef sensor_msgs::CameraInfo _info_type; + _info_type info; + typedef float _shutter_type; + _shutter_type shutter; + typedef float _gain_type; + _gain_type gain; + typedef uint16_t _white_balance_blue_type; + _white_balance_blue_type white_balance_blue; + typedef uint16_t _white_balance_red_type; + _white_balance_red_type white_balance_red; + typedef float _temperature_type; + _temperature_type temperature; + + WFOVImage(): + header(), + time_reference(""), + image(), + info(), + shutter(0), + gain(0), + white_balance_blue(0), + white_balance_red(0), + temperature(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_time_reference = strlen(this->time_reference); + varToArr(outbuffer + offset, length_time_reference); + offset += 4; + memcpy(outbuffer + offset, this->time_reference, length_time_reference); + offset += length_time_reference; + offset += this->image.serialize(outbuffer + offset); + offset += this->info.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_shutter; + u_shutter.real = this->shutter; + *(outbuffer + offset + 0) = (u_shutter.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_shutter.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_shutter.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_shutter.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->shutter); + union { + float real; + uint32_t base; + } u_gain; + u_gain.real = this->gain; + *(outbuffer + offset + 0) = (u_gain.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_gain.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_gain.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_gain.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->gain); + *(outbuffer + offset + 0) = (this->white_balance_blue >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->white_balance_blue >> (8 * 1)) & 0xFF; + offset += sizeof(this->white_balance_blue); + *(outbuffer + offset + 0) = (this->white_balance_red >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->white_balance_red >> (8 * 1)) & 0xFF; + offset += sizeof(this->white_balance_red); + union { + float real; + uint32_t base; + } u_temperature; + u_temperature.real = this->temperature; + *(outbuffer + offset + 0) = (u_temperature.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_temperature.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_temperature.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_temperature.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->temperature); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_time_reference; + arrToVar(length_time_reference, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_time_reference; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_time_reference-1]=0; + this->time_reference = (char *)(inbuffer + offset-1); + offset += length_time_reference; + offset += this->image.deserialize(inbuffer + offset); + offset += this->info.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_shutter; + u_shutter.base = 0; + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->shutter = u_shutter.real; + offset += sizeof(this->shutter); + union { + float real; + uint32_t base; + } u_gain; + u_gain.base = 0; + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->gain = u_gain.real; + offset += sizeof(this->gain); + this->white_balance_blue = ((uint16_t) (*(inbuffer + offset))); + this->white_balance_blue |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->white_balance_blue); + this->white_balance_red = ((uint16_t) (*(inbuffer + offset))); + this->white_balance_red |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->white_balance_red); + union { + float real; + uint32_t base; + } u_temperature; + u_temperature.base = 0; + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->temperature = u_temperature.real; + offset += sizeof(this->temperature); + return offset; + } + + const char * getType(){ return "wfov_camera_msgs/WFOVImage"; }; + const char * getMD5(){ return "807d0db423ab5e1561cfeba09a10bc88"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/wfov_camera_msgs/WFOVTrigger.h b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/wfov_camera_msgs/WFOVTrigger.h new file mode 100644 index 0000000000000000000000000000000000000000..67b0d0f1ce5902acabb7f458639d06a3b700d7d5 --- /dev/null +++ b/cr/externals/cr.robotin.mxo/Contents/Resources/ros_lib/wfov_camera_msgs/WFOVTrigger.h @@ -0,0 +1,141 @@ +#ifndef _ROS_wfov_camera_msgs_WFOVTrigger_h +#define _ROS_wfov_camera_msgs_WFOVTrigger_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "ros/time.h" + +namespace wfov_camera_msgs +{ + + class WFOVTrigger : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _time_reference_type; + _time_reference_type time_reference; + typedef ros::Time _trigger_time_type; + _trigger_time_type trigger_time; + typedef const char* _trigger_time_reference_type; + _trigger_time_reference_type trigger_time_reference; + typedef uint32_t _shutter_type; + _shutter_type shutter; + typedef uint32_t _id_type; + _id_type id; + typedef uint32_t _trigger_seq_type; + _trigger_seq_type trigger_seq; + + WFOVTrigger(): + header(), + time_reference(""), + trigger_time(), + trigger_time_reference(""), + shutter(0), + id(0), + trigger_seq(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_time_reference = strlen(this->time_reference); + varToArr(outbuffer + offset, length_time_reference); + offset += 4; + memcpy(outbuffer + offset, this->time_reference, length_time_reference); + offset += length_time_reference; + *(outbuffer + offset + 0) = (this->trigger_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->trigger_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->trigger_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->trigger_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->trigger_time.sec); + *(outbuffer + offset + 0) = (this->trigger_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->trigger_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->trigger_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->trigger_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->trigger_time.nsec); + uint32_t length_trigger_time_reference = strlen(this->trigger_time_reference); + varToArr(outbuffer + offset, length_trigger_time_reference); + offset += 4; + memcpy(outbuffer + offset, this->trigger_time_reference, length_trigger_time_reference); + offset += length_trigger_time_reference; + *(outbuffer + offset + 0) = (this->shutter >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->shutter >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->shutter >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->shutter >> (8 * 3)) & 0xFF; + offset += sizeof(this->shutter); + *(outbuffer + offset + 0) = (this->id >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->id >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->id >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->id >> (8 * 3)) & 0xFF; + offset += sizeof(this->id); + *(outbuffer + offset + 0) = (this->trigger_seq >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->trigger_seq >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->trigger_seq >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->trigger_seq >> (8 * 3)) & 0xFF; + offset += sizeof(this->trigger_seq); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_time_reference; + arrToVar(length_time_reference, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_time_reference; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_time_reference-1]=0; + this->time_reference = (char *)(inbuffer + offset-1); + offset += length_time_reference; + this->trigger_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->trigger_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->trigger_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->trigger_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->trigger_time.sec); + this->trigger_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->trigger_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->trigger_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->trigger_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->trigger_time.nsec); + uint32_t length_trigger_time_reference; + arrToVar(length_trigger_time_reference, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_trigger_time_reference; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_trigger_time_reference-1]=0; + this->trigger_time_reference = (char *)(inbuffer + offset-1); + offset += length_trigger_time_reference; + this->shutter = ((uint32_t) (*(inbuffer + offset))); + this->shutter |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->shutter |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->shutter |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->shutter); + this->id = ((uint32_t) (*(inbuffer + offset))); + this->id |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->id |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->id |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->id); + this->trigger_seq = ((uint32_t) (*(inbuffer + offset))); + this->trigger_seq |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->trigger_seq |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->trigger_seq |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->trigger_seq); + return offset; + } + + const char * getType(){ return "wfov_camera_msgs/WFOVTrigger"; }; + const char * getMD5(){ return "e38c040150f1be3148468f6b9974f8bf"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Info.plist b/cr/externals/cr.robotout.mxo/Contents/Info.plist new file mode 100644 index 0000000000000000000000000000000000000000..7057319f9cce3b7b7614afd65558956bdedf6e13 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Info.plist @@ -0,0 +1,46 @@ + + + + + BuildMachineOSBuild + 16G1314 + CFBundleDevelopmentRegion + English + CFBundleExecutable + cr.robotout + CFBundleIdentifier + boardout + CFBundleInfoDictionaryVersion + 7.0.1 + CFBundleLongVersionString + cr.robotout 7.0.1, Copyright 2014 Cycling '74 + CFBundlePackageType + iLaX + CFBundleShortVersionString + 7.0.1 + CFBundleSignature + max2 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 7.0.1 + CSResourcesFileMapped + + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 8E3004b + DTPlatformVersion + GM + DTSDKBuild + 16E185 + DTSDKName + macosx10.12 + DTXcode + 0833 + DTXcodeBuild + 8E3004b + + diff --git a/cr/externals/cr.robotout.mxo/Contents/MacOS/cr.robotout b/cr/externals/cr.robotout.mxo/Contents/MacOS/cr.robotout new file mode 100755 index 0000000000000000000000000000000000000000..7c1267e134c9d82e4211ede53ed3c4a627baa5b6 Binary files /dev/null and b/cr/externals/cr.robotout.mxo/Contents/MacOS/cr.robotout differ diff --git a/cr/externals/cr.robotout.mxo/Contents/PkgInfo b/cr/externals/cr.robotout.mxo/Contents/PkgInfo new file mode 100644 index 0000000000000000000000000000000000000000..0febb6eb9eebdfa768ac5563c31e92629c7a71ab --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/PkgInfo @@ -0,0 +1 @@ +iLaXmax2 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestAction.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestAction.h new file mode 100644 index 0000000000000000000000000000000000000000..4a6042d1e2e4b8b518e721535c64b629753a2c2f --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestAction_h +#define _ROS_actionlib_TestAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "actionlib/TestActionGoal.h" +#include "actionlib/TestActionResult.h" +#include "actionlib/TestActionFeedback.h" + +namespace actionlib +{ + + class TestAction : public ros::Msg + { + public: + typedef actionlib::TestActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef actionlib::TestActionResult _action_result_type; + _action_result_type action_result; + typedef actionlib::TestActionFeedback _action_feedback_type; + _action_feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestActionFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..aab52afa6b766d5a1914bb0b809cb19c9407c886 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestActionFeedback_h +#define _ROS_actionlib_TestActionFeedback_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib::TestFeedback _feedback_type; + _feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestActionGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..6cb740255cd2206e07a30b30ddee71bfbf944194 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestActionGoal_h +#define _ROS_actionlib_TestActionGoal_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef actionlib::TestGoal _goal_type; + _goal_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestActionResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..d534d0ac6bb7be28dee15ece12e847a9a893f927 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestActionResult_h +#define _ROS_actionlib_TestActionResult_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib::TestResult _result_type; + _result_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..83798cfd667f0d183001a120b00901b3996a65ea --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestFeedback.h @@ -0,0 +1,62 @@ +#ifndef _ROS_actionlib_TestFeedback_h +#define _ROS_actionlib_TestFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib +{ + + class TestFeedback : public ros::Msg + { + public: + typedef int32_t _feedback_type; + _feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..40d3a99bf09012210685fe356ec31479881aa6ff --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestGoal.h @@ -0,0 +1,62 @@ +#ifndef _ROS_actionlib_TestGoal_h +#define _ROS_actionlib_TestGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib +{ + + class TestGoal : public ros::Msg + { + public: + typedef int32_t _goal_type; + _goal_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestRequestAction.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestRequestAction.h new file mode 100644 index 0000000000000000000000000000000000000000..52a2fe9c76042a9a7b95466c4460e64497ecc5f8 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestRequestAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestRequestAction_h +#define _ROS_actionlib_TestRequestAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "actionlib/TestRequestActionGoal.h" +#include "actionlib/TestRequestActionResult.h" +#include "actionlib/TestRequestActionFeedback.h" + +namespace actionlib +{ + + class TestRequestAction : public ros::Msg + { + public: + typedef actionlib::TestRequestActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef actionlib::TestRequestActionResult _action_result_type; + _action_result_type action_result; + typedef actionlib::TestRequestActionFeedback _action_feedback_type; + _action_feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestRequestActionFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestRequestActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..0d585c0c2eb66a90ad6554e48a0c1fb0e9f2b2da --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestRequestActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestRequestActionFeedback_h +#define _ROS_actionlib_TestRequestActionFeedback_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib::TestRequestFeedback _feedback_type; + _feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestRequestActionGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestRequestActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..24c6c4873c56feaf9f12641443e95dd557416e3a --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestRequestActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestRequestActionGoal_h +#define _ROS_actionlib_TestRequestActionGoal_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef actionlib::TestRequestGoal _goal_type; + _goal_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestRequestActionResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestRequestActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..a71e715af33a32f9f133d83aed12f3a8c079cbaf --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestRequestActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestRequestActionResult_h +#define _ROS_actionlib_TestRequestActionResult_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib::TestRequestResult _result_type; + _result_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestRequestFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestRequestFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..f1fc24796db62f1505a4b34ad733ce8530261ae1 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestRequestFeedback.h @@ -0,0 +1,38 @@ +#ifndef _ROS_actionlib_TestRequestFeedback_h +#define _ROS_actionlib_TestRequestFeedback_h + +#include +#include +#include +#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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestRequestGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestRequestGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..321ebd31dd50a51d5535d4768d089fd2b9cdf85a --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestRequestGoal.h @@ -0,0 +1,215 @@ +#ifndef _ROS_actionlib_TestRequestGoal_h +#define _ROS_actionlib_TestRequestGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/duration.h" + +namespace actionlib +{ + + class TestRequestGoal : public ros::Msg + { + public: + typedef int32_t _terminate_status_type; + _terminate_status_type terminate_status; + typedef bool _ignore_cancel_type; + _ignore_cancel_type ignore_cancel; + typedef const char* _result_text_type; + _result_text_type result_text; + typedef int32_t _the_result_type; + _the_result_type the_result; + typedef bool _is_simple_client_type; + _is_simple_client_type is_simple_client; + typedef ros::Duration _delay_accept_type; + _delay_accept_type delay_accept; + typedef ros::Duration _delay_terminate_type; + _delay_terminate_type delay_terminate; + typedef ros::Duration _pause_status_type; + _pause_status_type 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); + varToArr(outbuffer + offset, length_result_text); + 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; + arrToVar(length_result_text, (inbuffer + offset)); + 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestRequestResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestRequestResult.h new file mode 100644 index 0000000000000000000000000000000000000000..97887253a38fb9a4fd34781b69ec9d86371ccd4e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestRequestResult.h @@ -0,0 +1,80 @@ +#ifndef _ROS_actionlib_TestRequestResult_h +#define _ROS_actionlib_TestRequestResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib +{ + + class TestRequestResult : public ros::Msg + { + public: + typedef int32_t _the_result_type; + _the_result_type the_result; + typedef bool _is_simple_server_type; + _is_simple_server_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestResult.h new file mode 100644 index 0000000000000000000000000000000000000000..5c9718c93420a89c67c4593345a4b42a3092fb4e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TestResult.h @@ -0,0 +1,62 @@ +#ifndef _ROS_actionlib_TestResult_h +#define _ROS_actionlib_TestResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib +{ + + class TestResult : public ros::Msg + { + public: + typedef int32_t _result_type; + _result_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsAction.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsAction.h new file mode 100644 index 0000000000000000000000000000000000000000..30c73cc9e1baa5f049f2ddfed062d85b08b87199 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TwoIntsAction_h +#define _ROS_actionlib_TwoIntsAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "actionlib/TwoIntsActionGoal.h" +#include "actionlib/TwoIntsActionResult.h" +#include "actionlib/TwoIntsActionFeedback.h" + +namespace actionlib +{ + + class TwoIntsAction : public ros::Msg + { + public: + typedef actionlib::TwoIntsActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef actionlib::TwoIntsActionResult _action_result_type; + _action_result_type action_result; + typedef actionlib::TwoIntsActionFeedback _action_feedback_type; + _action_feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsActionFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..8cd4862fa04dc2fc63c5de31f90f8d2bb315f3bf --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TwoIntsActionFeedback_h +#define _ROS_actionlib_TwoIntsActionFeedback_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib::TwoIntsFeedback _feedback_type; + _feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsActionGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..7d33c178e992bd70886c1c55113a98a3c7c9fe36 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TwoIntsActionGoal_h +#define _ROS_actionlib_TwoIntsActionGoal_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef actionlib::TwoIntsGoal _goal_type; + _goal_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsActionResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..e36c808fe5c1825e51eddc0e1eb51f4b6bce6e21 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TwoIntsActionResult_h +#define _ROS_actionlib_TwoIntsActionResult_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib::TwoIntsResult _result_type; + _result_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..3789c4dcd8515d892575dfd08c4a1775a3f0a8de --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsFeedback.h @@ -0,0 +1,38 @@ +#ifndef _ROS_actionlib_TwoIntsFeedback_h +#define _ROS_actionlib_TwoIntsFeedback_h + +#include +#include +#include +#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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..088c6ec3e44b437a116275e0ab4f83b0bef06c07 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsGoal.h @@ -0,0 +1,102 @@ +#ifndef _ROS_actionlib_TwoIntsGoal_h +#define _ROS_actionlib_TwoIntsGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib +{ + + class TwoIntsGoal : public ros::Msg + { + public: + typedef int64_t _a_type; + _a_type a; + typedef int64_t _b_type; + _b_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsResult.h new file mode 100644 index 0000000000000000000000000000000000000000..51d3cce117fbfdda46ca849c54c076f2c1ccd9ba --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib/TwoIntsResult.h @@ -0,0 +1,70 @@ +#ifndef _ROS_actionlib_TwoIntsResult_h +#define _ROS_actionlib_TwoIntsResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib +{ + + class TwoIntsResult : public ros::Msg + { + public: + typedef int64_t _sum_type; + _sum_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_msgs/GoalID.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_msgs/GoalID.h new file mode 100644 index 0000000000000000000000000000000000000000..24391a3e87bff4310514346601667becd9c0000e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_msgs/GoalID.h @@ -0,0 +1,79 @@ +#ifndef _ROS_actionlib_msgs_GoalID_h +#define _ROS_actionlib_msgs_GoalID_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" + +namespace actionlib_msgs +{ + + class GoalID : public ros::Msg + { + public: + typedef ros::Time _stamp_type; + _stamp_type stamp; + typedef const char* _id_type; + _id_type id; + + GoalID(): + stamp(), + id("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->stamp.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp.sec); + *(outbuffer + offset + 0) = (this->stamp.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp.nsec); + uint32_t length_id = strlen(this->id); + varToArr(outbuffer + offset, length_id); + offset += 4; + memcpy(outbuffer + offset, this->id, length_id); + offset += length_id; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->stamp.sec = ((uint32_t) (*(inbuffer + offset))); + this->stamp.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp.sec); + this->stamp.nsec = ((uint32_t) (*(inbuffer + offset))); + this->stamp.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp.nsec); + uint32_t length_id; + arrToVar(length_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_id-1]=0; + this->id = (char *)(inbuffer + offset-1); + offset += length_id; + return offset; + } + + const char * getType(){ return "actionlib_msgs/GoalID"; }; + const char * getMD5(){ return "302881f31927c1df708a2dbab0e80ee8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_msgs/GoalStatus.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_msgs/GoalStatus.h new file mode 100644 index 0000000000000000000000000000000000000000..349524c3a935d8ff0570d407373c3e7ccca353d7 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_msgs/GoalStatus.h @@ -0,0 +1,78 @@ +#ifndef _ROS_actionlib_msgs_GoalStatus_h +#define _ROS_actionlib_msgs_GoalStatus_h + +#include +#include +#include +#include "ros/msg.h" +#include "actionlib_msgs/GoalID.h" + +namespace actionlib_msgs +{ + + class GoalStatus : public ros::Msg + { + public: + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef uint8_t _status_type; + _status_type status; + typedef const char* _text_type; + _text_type text; + enum { PENDING = 0 }; + enum { ACTIVE = 1 }; + enum { PREEMPTED = 2 }; + enum { SUCCEEDED = 3 }; + enum { ABORTED = 4 }; + enum { REJECTED = 5 }; + enum { PREEMPTING = 6 }; + enum { RECALLING = 7 }; + enum { RECALLED = 8 }; + enum { LOST = 9 }; + + GoalStatus(): + goal_id(), + status(0), + text("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->goal_id.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->status >> (8 * 0)) & 0xFF; + offset += sizeof(this->status); + uint32_t length_text = strlen(this->text); + varToArr(outbuffer + offset, length_text); + offset += 4; + memcpy(outbuffer + offset, this->text, length_text); + offset += length_text; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->goal_id.deserialize(inbuffer + offset); + this->status = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->status); + uint32_t length_text; + arrToVar(length_text, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_text; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_text-1]=0; + this->text = (char *)(inbuffer + offset-1); + offset += length_text; + return offset; + } + + const char * getType(){ return "actionlib_msgs/GoalStatus"; }; + const char * getMD5(){ return "d388f9b87b3c471f784434d671988d4a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_msgs/GoalStatusArray.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_msgs/GoalStatusArray.h new file mode 100644 index 0000000000000000000000000000000000000000..9e39b5f845a39019cd8fd58bf4ba49cd97a45854 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_msgs/GoalStatusArray.h @@ -0,0 +1,70 @@ +#ifndef _ROS_actionlib_msgs_GoalStatusArray_h +#define _ROS_actionlib_msgs_GoalStatusArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" + +namespace actionlib_msgs +{ + + class GoalStatusArray : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t status_list_length; + typedef actionlib_msgs::GoalStatus _status_list_type; + _status_list_type st_status_list; + _status_list_type * status_list; + + GoalStatusArray(): + header(), + status_list_length(0), status_list(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->status_list_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->status_list_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->status_list_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->status_list_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->status_list_length); + for( uint32_t i = 0; i < status_list_length; i++){ + offset += this->status_list[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t status_list_lengthT = ((uint32_t) (*(inbuffer + offset))); + status_list_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + status_list_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + status_list_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->status_list_length); + if(status_list_lengthT > status_list_length) + this->status_list = (actionlib_msgs::GoalStatus*)realloc(this->status_list, status_list_lengthT * sizeof(actionlib_msgs::GoalStatus)); + status_list_length = status_list_lengthT; + for( uint32_t i = 0; i < status_list_length; i++){ + offset += this->st_status_list.deserialize(inbuffer + offset); + memcpy( &(this->status_list[i]), &(this->st_status_list), sizeof(actionlib_msgs::GoalStatus)); + } + return offset; + } + + const char * getType(){ return "actionlib_msgs/GoalStatusArray"; }; + const char * getMD5(){ return "8b2b82f13216d0a8ea88bd3af735e619"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingAction.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingAction.h new file mode 100644 index 0000000000000000000000000000000000000000..16eef59a9284fadd87a7b404b93b4a3e7e0fca40 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_AveragingAction_h +#define _ROS_actionlib_tutorials_AveragingAction_h + +#include +#include +#include +#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: + typedef actionlib_tutorials::AveragingActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef actionlib_tutorials::AveragingActionResult _action_result_type; + _action_result_type action_result; + typedef actionlib_tutorials::AveragingActionFeedback _action_feedback_type; + _action_feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingActionFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..e269f39d2baac0f75e40a45550f8859e219cdc87 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_AveragingActionFeedback_h +#define _ROS_actionlib_tutorials_AveragingActionFeedback_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib_tutorials::AveragingFeedback _feedback_type; + _feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingActionGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..e9f718ff814ab411a806e8e599be705f838d350d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_AveragingActionGoal_h +#define _ROS_actionlib_tutorials_AveragingActionGoal_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef actionlib_tutorials::AveragingGoal _goal_type; + _goal_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingActionResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..db99e51744122f79d4fcff69945c38235e51343c --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_AveragingActionResult_h +#define _ROS_actionlib_tutorials_AveragingActionResult_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib_tutorials::AveragingResult _result_type; + _result_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..e71ad1f0682e9e8f92c1beed7203fba59d0a2181 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingFeedback.h @@ -0,0 +1,134 @@ +#ifndef _ROS_actionlib_tutorials_AveragingFeedback_h +#define _ROS_actionlib_tutorials_AveragingFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib_tutorials +{ + + class AveragingFeedback : public ros::Msg + { + public: + typedef int32_t _sample_type; + _sample_type sample; + typedef float _data_type; + _data_type data; + typedef float _mean_type; + _mean_type mean; + typedef float _std_dev_type; + _std_dev_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..e1cc2ad30300c9c3ef71097facf35a02b4db9a4d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingGoal.h @@ -0,0 +1,62 @@ +#ifndef _ROS_actionlib_tutorials_AveragingGoal_h +#define _ROS_actionlib_tutorials_AveragingGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib_tutorials +{ + + class AveragingGoal : public ros::Msg + { + public: + typedef int32_t _samples_type; + _samples_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingResult.h new file mode 100644 index 0000000000000000000000000000000000000000..e476e594205cedf0daecf247281b218ffb11c648 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/AveragingResult.h @@ -0,0 +1,86 @@ +#ifndef _ROS_actionlib_tutorials_AveragingResult_h +#define _ROS_actionlib_tutorials_AveragingResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib_tutorials +{ + + class AveragingResult : public ros::Msg + { + public: + typedef float _mean_type; + _mean_type mean; + typedef float _std_dev_type; + _std_dev_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciAction.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciAction.h new file mode 100644 index 0000000000000000000000000000000000000000..2fd1c636d52a49896640f93f2b3c6afe25ec6244 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_FibonacciAction_h +#define _ROS_actionlib_tutorials_FibonacciAction_h + +#include +#include +#include +#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: + typedef actionlib_tutorials::FibonacciActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef actionlib_tutorials::FibonacciActionResult _action_result_type; + _action_result_type action_result; + typedef actionlib_tutorials::FibonacciActionFeedback _action_feedback_type; + _action_feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciActionFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..241ebad304c32ead12da8eab99cd600207ab58f9 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_FibonacciActionFeedback_h +#define _ROS_actionlib_tutorials_FibonacciActionFeedback_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib_tutorials::FibonacciFeedback _feedback_type; + _feedback_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciActionGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..dd1361794f2e177c698d7be1ee764aa2f2c5f4b9 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_FibonacciActionGoal_h +#define _ROS_actionlib_tutorials_FibonacciActionGoal_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef actionlib_tutorials::FibonacciGoal _goal_type; + _goal_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciActionResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..35c9d48c53e61ab072dab9f9c3a453d4a2e73bdf --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_FibonacciActionResult_h +#define _ROS_actionlib_tutorials_FibonacciActionResult_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib_tutorials::FibonacciResult _result_type; + _result_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..87eaf8fa71158f56d1e0aef1fd2792033c708e85 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciFeedback.h @@ -0,0 +1,82 @@ +#ifndef _ROS_actionlib_tutorials_FibonacciFeedback_h +#define _ROS_actionlib_tutorials_FibonacciFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib_tutorials +{ + + class FibonacciFeedback : public ros::Msg + { + public: + uint32_t sequence_length; + typedef int32_t _sequence_type; + _sequence_type st_sequence; + _sequence_type * sequence; + + FibonacciFeedback(): + sequence_length(0), sequence(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->sequence_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->sequence_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->sequence_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->sequence_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->sequence_length); + for( uint32_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; + uint32_t sequence_lengthT = ((uint32_t) (*(inbuffer + offset))); + sequence_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + sequence_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + sequence_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->sequence_length); + if(sequence_lengthT > sequence_length) + this->sequence = (int32_t*)realloc(this->sequence, sequence_lengthT * sizeof(int32_t)); + sequence_length = sequence_lengthT; + for( uint32_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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..e711de10bf8b534544eecee3a0f1946b9d345a4c --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciGoal.h @@ -0,0 +1,62 @@ +#ifndef _ROS_actionlib_tutorials_FibonacciGoal_h +#define _ROS_actionlib_tutorials_FibonacciGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib_tutorials +{ + + class FibonacciGoal : public ros::Msg + { + public: + typedef int32_t _order_type; + _order_type 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciResult.h new file mode 100644 index 0000000000000000000000000000000000000000..dc710239d0f034bf6af44caeae9a25d8d45eaaeb --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/actionlib_tutorials/FibonacciResult.h @@ -0,0 +1,82 @@ +#ifndef _ROS_actionlib_tutorials_FibonacciResult_h +#define _ROS_actionlib_tutorials_FibonacciResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib_tutorials +{ + + class FibonacciResult : public ros::Msg + { + public: + uint32_t sequence_length; + typedef int32_t _sequence_type; + _sequence_type st_sequence; + _sequence_type * sequence; + + FibonacciResult(): + sequence_length(0), sequence(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->sequence_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->sequence_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->sequence_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->sequence_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->sequence_length); + for( uint32_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; + uint32_t sequence_lengthT = ((uint32_t) (*(inbuffer + offset))); + sequence_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + sequence_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + sequence_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->sequence_length); + if(sequence_lengthT > sequence_length) + this->sequence = (int32_t*)realloc(this->sequence, sequence_lengthT * sizeof(int32_t)); + sequence_length = sequence_lengthT; + for( uint32_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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/base_local_planner/Position2DInt.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/base_local_planner/Position2DInt.h new file mode 100644 index 0000000000000000000000000000000000000000..79beed25ad6d3686cf7eed2d0455863d05f97b5a --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/base_local_planner/Position2DInt.h @@ -0,0 +1,102 @@ +#ifndef _ROS_base_local_planner_Position2DInt_h +#define _ROS_base_local_planner_Position2DInt_h + +#include +#include +#include +#include "ros/msg.h" + +namespace base_local_planner +{ + + class Position2DInt : public ros::Msg + { + public: + typedef int64_t _x_type; + _x_type x; + typedef int64_t _y_type; + _y_type y; + + Position2DInt(): + x(0), + y(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int64_t real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + int64_t real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int64_t real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + int64_t real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + return offset; + } + + const char * getType(){ return "base_local_planner/Position2DInt"; }; + const char * getMD5(){ return "3b834ede922a0fff22c43585c533b49f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/bond/Constants.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/bond/Constants.h new file mode 100644 index 0000000000000000000000000000000000000000..9594342f62f1b3cda9bc743bcdf04cb6c4a69217 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/bond/Constants.h @@ -0,0 +1,44 @@ +#ifndef _ROS_bond_Constants_h +#define _ROS_bond_Constants_h + +#include +#include +#include +#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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/bond/Status.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/bond/Status.h new file mode 100644 index 0000000000000000000000000000000000000000..b9fa9a5484bb6dffb37e8252605f3c769186689f --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/bond/Status.h @@ -0,0 +1,144 @@ +#ifndef _ROS_bond_Status_h +#define _ROS_bond_Status_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace bond +{ + + class Status : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _id_type; + _id_type id; + typedef const char* _instance_id_type; + _instance_id_type instance_id; + typedef bool _active_type; + _active_type active; + typedef float _heartbeat_timeout_type; + _heartbeat_timeout_type heartbeat_timeout; + typedef float _heartbeat_period_type; + _heartbeat_period_type 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); + varToArr(outbuffer + offset, length_id); + offset += 4; + memcpy(outbuffer + offset, this->id, length_id); + offset += length_id; + uint32_t length_instance_id = strlen(this->instance_id); + varToArr(outbuffer + offset, length_instance_id); + 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; + arrToVar(length_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_id-1]=0; + this->id = (char *)(inbuffer + offset-1); + offset += length_id; + uint32_t length_instance_id; + arrToVar(length_instance_id, (inbuffer + offset)); + 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 \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryAction.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryAction.h new file mode 100644 index 0000000000000000000000000000000000000000..ec67771ad20f89dd11949574e0529a39e35de879 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_FollowJointTrajectoryAction_h +#define _ROS_control_msgs_FollowJointTrajectoryAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "control_msgs/FollowJointTrajectoryActionGoal.h" +#include "control_msgs/FollowJointTrajectoryActionResult.h" +#include "control_msgs/FollowJointTrajectoryActionFeedback.h" + +namespace control_msgs +{ + + class FollowJointTrajectoryAction : public ros::Msg + { + public: + typedef control_msgs::FollowJointTrajectoryActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef control_msgs::FollowJointTrajectoryActionResult _action_result_type; + _action_result_type action_result; + typedef control_msgs::FollowJointTrajectoryActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + FollowJointTrajectoryAction(): + action_goal(), + action_result(), + action_feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->action_goal.serialize(outbuffer + offset); + offset += this->action_result.serialize(outbuffer + offset); + offset += this->action_feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->action_goal.deserialize(inbuffer + offset); + offset += this->action_result.deserialize(inbuffer + offset); + offset += this->action_feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/FollowJointTrajectoryAction"; }; + const char * getMD5(){ return "bc4f9b743838566551c0390c65f1a248"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryActionFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..d5d037a75ff917a6c3ec027e1f1fee8e40174a8e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_FollowJointTrajectoryActionFeedback_h +#define _ROS_control_msgs_FollowJointTrajectoryActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/FollowJointTrajectoryFeedback.h" + +namespace control_msgs +{ + + class FollowJointTrajectoryActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::FollowJointTrajectoryFeedback _feedback_type; + _feedback_type feedback; + + FollowJointTrajectoryActionFeedback(): + header(), + status(), + feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/FollowJointTrajectoryActionFeedback"; }; + const char * getMD5(){ return "d8920dc4eae9fc107e00999cce4be641"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryActionGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..4aa00c6466386c37e775dd0231b6578def6f0a39 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_FollowJointTrajectoryActionGoal_h +#define _ROS_control_msgs_FollowJointTrajectoryActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "control_msgs/FollowJointTrajectoryGoal.h" + +namespace control_msgs +{ + + class FollowJointTrajectoryActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef control_msgs::FollowJointTrajectoryGoal _goal_type; + _goal_type goal; + + FollowJointTrajectoryActionGoal(): + header(), + goal_id(), + goal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->goal_id.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->goal_id.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/FollowJointTrajectoryActionGoal"; }; + const char * getMD5(){ return "cff5c1d533bf2f82dd0138d57f4304bb"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryActionResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..aa6b2b3f9126e21ecb097bc0f2b6381e13e367ac --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_FollowJointTrajectoryActionResult_h +#define _ROS_control_msgs_FollowJointTrajectoryActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/FollowJointTrajectoryResult.h" + +namespace control_msgs +{ + + class FollowJointTrajectoryActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::FollowJointTrajectoryResult _result_type; + _result_type result; + + FollowJointTrajectoryActionResult(): + header(), + status(), + result() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->result.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->result.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/FollowJointTrajectoryActionResult"; }; + const char * getMD5(){ return "c4fb3b000dc9da4fd99699380efcc5d9"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..6f27eccc9615209bea284219616d9d044a3b2f35 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryFeedback.h @@ -0,0 +1,97 @@ +#ifndef _ROS_control_msgs_FollowJointTrajectoryFeedback_h +#define _ROS_control_msgs_FollowJointTrajectoryFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "trajectory_msgs/JointTrajectoryPoint.h" + +namespace control_msgs +{ + + class FollowJointTrajectoryFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t joint_names_length; + typedef char* _joint_names_type; + _joint_names_type st_joint_names; + _joint_names_type * joint_names; + typedef trajectory_msgs::JointTrajectoryPoint _desired_type; + _desired_type desired; + typedef trajectory_msgs::JointTrajectoryPoint _actual_type; + _actual_type actual; + typedef trajectory_msgs::JointTrajectoryPoint _error_type; + _error_type error; + + FollowJointTrajectoryFeedback(): + header(), + joint_names_length(0), joint_names(NULL), + desired(), + actual(), + error() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_names_length); + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_joint_namesi = strlen(this->joint_names[i]); + varToArr(outbuffer + offset, length_joint_namesi); + offset += 4; + memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); + offset += length_joint_namesi; + } + offset += this->desired.serialize(outbuffer + offset); + offset += this->actual.serialize(outbuffer + offset); + offset += this->error.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_names_length); + if(joint_names_lengthT > joint_names_length) + this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); + joint_names_length = joint_names_lengthT; + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_st_joint_names; + arrToVar(length_st_joint_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_joint_names-1]=0; + this->st_joint_names = (char *)(inbuffer + offset-1); + offset += length_st_joint_names; + memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); + } + offset += this->desired.deserialize(inbuffer + offset); + offset += this->actual.deserialize(inbuffer + offset); + offset += this->error.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/FollowJointTrajectoryFeedback"; }; + const char * getMD5(){ return "10817c60c2486ef6b33e97dcd87f4474"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..1185615ab3e4e6aa493fb04046e4180047dad372 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryGoal.h @@ -0,0 +1,119 @@ +#ifndef _ROS_control_msgs_FollowJointTrajectoryGoal_h +#define _ROS_control_msgs_FollowJointTrajectoryGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "trajectory_msgs/JointTrajectory.h" +#include "control_msgs/JointTolerance.h" +#include "ros/duration.h" + +namespace control_msgs +{ + + class FollowJointTrajectoryGoal : public ros::Msg + { + public: + typedef trajectory_msgs::JointTrajectory _trajectory_type; + _trajectory_type trajectory; + uint32_t path_tolerance_length; + typedef control_msgs::JointTolerance _path_tolerance_type; + _path_tolerance_type st_path_tolerance; + _path_tolerance_type * path_tolerance; + uint32_t goal_tolerance_length; + typedef control_msgs::JointTolerance _goal_tolerance_type; + _goal_tolerance_type st_goal_tolerance; + _goal_tolerance_type * goal_tolerance; + typedef ros::Duration _goal_time_tolerance_type; + _goal_time_tolerance_type goal_time_tolerance; + + FollowJointTrajectoryGoal(): + trajectory(), + path_tolerance_length(0), path_tolerance(NULL), + goal_tolerance_length(0), goal_tolerance(NULL), + goal_time_tolerance() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->trajectory.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->path_tolerance_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->path_tolerance_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->path_tolerance_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->path_tolerance_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->path_tolerance_length); + for( uint32_t i = 0; i < path_tolerance_length; i++){ + offset += this->path_tolerance[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->goal_tolerance_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->goal_tolerance_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->goal_tolerance_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->goal_tolerance_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->goal_tolerance_length); + for( uint32_t i = 0; i < goal_tolerance_length; i++){ + offset += this->goal_tolerance[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->goal_time_tolerance.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->goal_time_tolerance.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->goal_time_tolerance.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->goal_time_tolerance.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->goal_time_tolerance.sec); + *(outbuffer + offset + 0) = (this->goal_time_tolerance.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->goal_time_tolerance.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->goal_time_tolerance.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->goal_time_tolerance.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->goal_time_tolerance.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->trajectory.deserialize(inbuffer + offset); + uint32_t path_tolerance_lengthT = ((uint32_t) (*(inbuffer + offset))); + path_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + path_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + path_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->path_tolerance_length); + if(path_tolerance_lengthT > path_tolerance_length) + this->path_tolerance = (control_msgs::JointTolerance*)realloc(this->path_tolerance, path_tolerance_lengthT * sizeof(control_msgs::JointTolerance)); + path_tolerance_length = path_tolerance_lengthT; + for( uint32_t i = 0; i < path_tolerance_length; i++){ + offset += this->st_path_tolerance.deserialize(inbuffer + offset); + memcpy( &(this->path_tolerance[i]), &(this->st_path_tolerance), sizeof(control_msgs::JointTolerance)); + } + uint32_t goal_tolerance_lengthT = ((uint32_t) (*(inbuffer + offset))); + goal_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + goal_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + goal_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->goal_tolerance_length); + if(goal_tolerance_lengthT > goal_tolerance_length) + this->goal_tolerance = (control_msgs::JointTolerance*)realloc(this->goal_tolerance, goal_tolerance_lengthT * sizeof(control_msgs::JointTolerance)); + goal_tolerance_length = goal_tolerance_lengthT; + for( uint32_t i = 0; i < goal_tolerance_length; i++){ + offset += this->st_goal_tolerance.deserialize(inbuffer + offset); + memcpy( &(this->goal_tolerance[i]), &(this->st_goal_tolerance), sizeof(control_msgs::JointTolerance)); + } + this->goal_time_tolerance.sec = ((uint32_t) (*(inbuffer + offset))); + this->goal_time_tolerance.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->goal_time_tolerance.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->goal_time_tolerance.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->goal_time_tolerance.sec); + this->goal_time_tolerance.nsec = ((uint32_t) (*(inbuffer + offset))); + this->goal_time_tolerance.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->goal_time_tolerance.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->goal_time_tolerance.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->goal_time_tolerance.nsec); + return offset; + } + + const char * getType(){ return "control_msgs/FollowJointTrajectoryGoal"; }; + const char * getMD5(){ return "69636787b6ecbde4d61d711979bc7ecb"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryResult.h new file mode 100644 index 0000000000000000000000000000000000000000..819f27265783893ac4844ee7bc36dbaaea7d3299 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/FollowJointTrajectoryResult.h @@ -0,0 +1,85 @@ +#ifndef _ROS_control_msgs_FollowJointTrajectoryResult_h +#define _ROS_control_msgs_FollowJointTrajectoryResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class FollowJointTrajectoryResult : public ros::Msg + { + public: + typedef int32_t _error_code_type; + _error_code_type error_code; + typedef const char* _error_string_type; + _error_string_type error_string; + enum { SUCCESSFUL = 0 }; + enum { INVALID_GOAL = -1 }; + enum { INVALID_JOINTS = -2 }; + enum { OLD_HEADER_TIMESTAMP = -3 }; + enum { PATH_TOLERANCE_VIOLATED = -4 }; + enum { GOAL_TOLERANCE_VIOLATED = -5 }; + + FollowJointTrajectoryResult(): + error_code(0), + error_string("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int32_t real; + uint32_t base; + } u_error_code; + u_error_code.real = this->error_code; + *(outbuffer + offset + 0) = (u_error_code.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_error_code.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_error_code.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_error_code.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->error_code); + uint32_t length_error_string = strlen(this->error_string); + varToArr(outbuffer + offset, length_error_string); + offset += 4; + memcpy(outbuffer + offset, this->error_string, length_error_string); + offset += length_error_string; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int32_t real; + uint32_t base; + } u_error_code; + u_error_code.base = 0; + u_error_code.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_error_code.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_error_code.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_error_code.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->error_code = u_error_code.real; + offset += sizeof(this->error_code); + uint32_t length_error_string; + arrToVar(length_error_string, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_error_string; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_error_string-1]=0; + this->error_string = (char *)(inbuffer + offset-1); + offset += length_error_string; + return offset; + } + + const char * getType(){ return "control_msgs/FollowJointTrajectoryResult"; }; + const char * getMD5(){ return "493383b18409bfb604b4e26c676401d2"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommand.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommand.h new file mode 100644 index 0000000000000000000000000000000000000000..0b37e5c4f007962922ffff9cdc2c1fcad4c2d9ad --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommand.h @@ -0,0 +1,102 @@ +#ifndef _ROS_control_msgs_GripperCommand_h +#define _ROS_control_msgs_GripperCommand_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class GripperCommand : public ros::Msg + { + public: + typedef double _position_type; + _position_type position; + typedef double _max_effort_type; + _max_effort_type max_effort; + + GripperCommand(): + position(0), + max_effort(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_position; + u_position.real = this->position; + *(outbuffer + offset + 0) = (u_position.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_position.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_position.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_position.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_position.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_position.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_position.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_position.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_max_effort; + u_max_effort.real = this->max_effort; + *(outbuffer + offset + 0) = (u_max_effort.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_effort.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_effort.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_effort.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max_effort.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max_effort.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max_effort.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max_effort.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max_effort); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_position; + u_position.base = 0; + u_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->position = u_position.real; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_max_effort; + u_max_effort.base = 0; + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max_effort = u_max_effort.real; + offset += sizeof(this->max_effort); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommand"; }; + const char * getMD5(){ return "680acaff79486f017132a7f198d40f08"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandAction.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandAction.h new file mode 100644 index 0000000000000000000000000000000000000000..68d8356e00af1a7200f6bbbd101a6fdfd34ecf0d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_GripperCommandAction_h +#define _ROS_control_msgs_GripperCommandAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "control_msgs/GripperCommandActionGoal.h" +#include "control_msgs/GripperCommandActionResult.h" +#include "control_msgs/GripperCommandActionFeedback.h" + +namespace control_msgs +{ + + class GripperCommandAction : public ros::Msg + { + public: + typedef control_msgs::GripperCommandActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef control_msgs::GripperCommandActionResult _action_result_type; + _action_result_type action_result; + typedef control_msgs::GripperCommandActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + GripperCommandAction(): + action_goal(), + action_result(), + action_feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->action_goal.serialize(outbuffer + offset); + offset += this->action_result.serialize(outbuffer + offset); + offset += this->action_feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->action_goal.deserialize(inbuffer + offset); + offset += this->action_result.deserialize(inbuffer + offset); + offset += this->action_feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommandAction"; }; + const char * getMD5(){ return "950b2a6ebe831f5d4f4ceaba3d8be01e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandActionFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..67f99c9c1b0d3e4d62a7e0d069e85fb2d1191de4 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_GripperCommandActionFeedback_h +#define _ROS_control_msgs_GripperCommandActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/GripperCommandFeedback.h" + +namespace control_msgs +{ + + class GripperCommandActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::GripperCommandFeedback _feedback_type; + _feedback_type feedback; + + GripperCommandActionFeedback(): + header(), + status(), + feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommandActionFeedback"; }; + const char * getMD5(){ return "653dff30c045f5e6ff3feb3409f4558d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandActionGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..efb19d1d8e90ee1c35e1bf46cacad720cef176c0 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_GripperCommandActionGoal_h +#define _ROS_control_msgs_GripperCommandActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "control_msgs/GripperCommandGoal.h" + +namespace control_msgs +{ + + class GripperCommandActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef control_msgs::GripperCommandGoal _goal_type; + _goal_type goal; + + GripperCommandActionGoal(): + header(), + goal_id(), + goal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->goal_id.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->goal_id.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommandActionGoal"; }; + const char * getMD5(){ return "aa581f648a35ed681db2ec0bf7a82bea"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandActionResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..704f18db86b87b781cb3042736f81c9b9fc9e424 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_GripperCommandActionResult_h +#define _ROS_control_msgs_GripperCommandActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/GripperCommandResult.h" + +namespace control_msgs +{ + + class GripperCommandActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::GripperCommandResult _result_type; + _result_type result; + + GripperCommandActionResult(): + header(), + status(), + result() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->result.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->result.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommandActionResult"; }; + const char * getMD5(){ return "143702cb2df0f163c5283cedc5efc6b6"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..15d0397b4f6a94a6b3b4b114f98faf6bcaccf700 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandFeedback.h @@ -0,0 +1,138 @@ +#ifndef _ROS_control_msgs_GripperCommandFeedback_h +#define _ROS_control_msgs_GripperCommandFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class GripperCommandFeedback : public ros::Msg + { + public: + typedef double _position_type; + _position_type position; + typedef double _effort_type; + _effort_type effort; + typedef bool _stalled_type; + _stalled_type stalled; + typedef bool _reached_goal_type; + _reached_goal_type reached_goal; + + GripperCommandFeedback(): + position(0), + effort(0), + stalled(0), + reached_goal(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_position; + u_position.real = this->position; + *(outbuffer + offset + 0) = (u_position.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_position.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_position.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_position.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_position.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_position.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_position.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_position.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_effort; + u_effort.real = this->effort; + *(outbuffer + offset + 0) = (u_effort.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_effort.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_effort.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_effort.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_effort.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_effort.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_effort.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_effort.base >> (8 * 7)) & 0xFF; + offset += sizeof(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; + union { + double real; + uint64_t base; + } u_position; + u_position.base = 0; + u_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->position = u_position.real; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_effort; + u_effort.base = 0; + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->effort = u_effort.real; + offset += sizeof(this->effort); + union { + bool real; + uint8_t base; + } u_stalled; + u_stalled.base = 0; + u_stalled.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->stalled = u_stalled.real; + offset += sizeof(this->stalled); + union { + bool real; + uint8_t base; + } u_reached_goal; + u_reached_goal.base = 0; + u_reached_goal.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->reached_goal = u_reached_goal.real; + offset += sizeof(this->reached_goal); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommandFeedback"; }; + const char * getMD5(){ return "e4cbff56d3562bcf113da5a5adeef91f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..544a864749da9aba26022127edc6a835f4866a34 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandGoal.h @@ -0,0 +1,44 @@ +#ifndef _ROS_control_msgs_GripperCommandGoal_h +#define _ROS_control_msgs_GripperCommandGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "control_msgs/GripperCommand.h" + +namespace control_msgs +{ + + class GripperCommandGoal : public ros::Msg + { + public: + typedef control_msgs::GripperCommand _command_type; + _command_type command; + + GripperCommandGoal(): + command() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->command.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->command.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommandGoal"; }; + const char * getMD5(){ return "86fd82f4ddc48a4cb6856cfa69217e43"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandResult.h new file mode 100644 index 0000000000000000000000000000000000000000..e28b26016feaf8649a9558ae6110e38e8f3dfaa0 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/GripperCommandResult.h @@ -0,0 +1,138 @@ +#ifndef _ROS_control_msgs_GripperCommandResult_h +#define _ROS_control_msgs_GripperCommandResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class GripperCommandResult : public ros::Msg + { + public: + typedef double _position_type; + _position_type position; + typedef double _effort_type; + _effort_type effort; + typedef bool _stalled_type; + _stalled_type stalled; + typedef bool _reached_goal_type; + _reached_goal_type reached_goal; + + GripperCommandResult(): + position(0), + effort(0), + stalled(0), + reached_goal(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_position; + u_position.real = this->position; + *(outbuffer + offset + 0) = (u_position.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_position.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_position.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_position.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_position.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_position.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_position.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_position.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_effort; + u_effort.real = this->effort; + *(outbuffer + offset + 0) = (u_effort.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_effort.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_effort.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_effort.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_effort.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_effort.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_effort.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_effort.base >> (8 * 7)) & 0xFF; + offset += sizeof(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; + union { + double real; + uint64_t base; + } u_position; + u_position.base = 0; + u_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->position = u_position.real; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_effort; + u_effort.base = 0; + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->effort = u_effort.real; + offset += sizeof(this->effort); + union { + bool real; + uint8_t base; + } u_stalled; + u_stalled.base = 0; + u_stalled.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->stalled = u_stalled.real; + offset += sizeof(this->stalled); + union { + bool real; + uint8_t base; + } u_reached_goal; + u_reached_goal.base = 0; + u_reached_goal.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->reached_goal = u_reached_goal.real; + offset += sizeof(this->reached_goal); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommandResult"; }; + const char * getMD5(){ return "e4cbff56d3562bcf113da5a5adeef91f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointControllerState.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointControllerState.h new file mode 100644 index 0000000000000000000000000000000000000000..b70ef6d2fb228acdcc90c2ca713f7da0f085509d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointControllerState.h @@ -0,0 +1,382 @@ +#ifndef _ROS_control_msgs_JointControllerState_h +#define _ROS_control_msgs_JointControllerState_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace control_msgs +{ + + class JointControllerState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef double _set_point_type; + _set_point_type set_point; + typedef double _process_value_type; + _process_value_type process_value; + typedef double _process_value_dot_type; + _process_value_dot_type process_value_dot; + typedef double _error_type; + _error_type error; + typedef double _time_step_type; + _time_step_type time_step; + typedef double _command_type; + _command_type command; + typedef double _p_type; + _p_type p; + typedef double _i_type; + _i_type i; + typedef double _d_type; + _d_type d; + typedef double _i_clamp_type; + _i_clamp_type i_clamp; + typedef bool _antiwindup_type; + _antiwindup_type antiwindup; + + JointControllerState(): + header(), + set_point(0), + process_value(0), + process_value_dot(0), + error(0), + time_step(0), + command(0), + p(0), + i(0), + d(0), + i_clamp(0), + antiwindup(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_set_point; + u_set_point.real = this->set_point; + *(outbuffer + offset + 0) = (u_set_point.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_set_point.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_set_point.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_set_point.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_set_point.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_set_point.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_set_point.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_set_point.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->set_point); + union { + double real; + uint64_t base; + } u_process_value; + u_process_value.real = this->process_value; + *(outbuffer + offset + 0) = (u_process_value.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_process_value.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_process_value.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_process_value.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_process_value.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_process_value.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_process_value.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_process_value.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->process_value); + union { + double real; + uint64_t base; + } u_process_value_dot; + u_process_value_dot.real = this->process_value_dot; + *(outbuffer + offset + 0) = (u_process_value_dot.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_process_value_dot.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_process_value_dot.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_process_value_dot.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_process_value_dot.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_process_value_dot.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_process_value_dot.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_process_value_dot.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->process_value_dot); + union { + double real; + uint64_t base; + } u_error; + u_error.real = this->error; + *(outbuffer + offset + 0) = (u_error.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_error.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_error.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_error.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_error.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_error.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_error.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_error.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->error); + union { + double real; + uint64_t base; + } u_time_step; + u_time_step.real = this->time_step; + *(outbuffer + offset + 0) = (u_time_step.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_time_step.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_time_step.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_time_step.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_time_step.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_time_step.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_time_step.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_time_step.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->time_step); + union { + double real; + uint64_t base; + } u_command; + u_command.real = this->command; + *(outbuffer + offset + 0) = (u_command.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_command.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_command.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_command.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_command.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_command.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_command.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_command.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->command); + union { + double real; + uint64_t base; + } u_p; + u_p.real = this->p; + *(outbuffer + offset + 0) = (u_p.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_p.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_p.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_p.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_p.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_p.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_p.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_p.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->p); + union { + double real; + uint64_t base; + } u_i; + u_i.real = this->i; + *(outbuffer + offset + 0) = (u_i.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i); + union { + double real; + uint64_t base; + } u_d; + u_d.real = this->d; + *(outbuffer + offset + 0) = (u_d.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_d.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_d.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_d.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_d.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_d.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_d.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_d.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->d); + union { + double real; + uint64_t base; + } u_i_clamp; + u_i_clamp.real = this->i_clamp; + *(outbuffer + offset + 0) = (u_i_clamp.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i_clamp.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i_clamp.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i_clamp.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i_clamp.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i_clamp.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i_clamp.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i_clamp.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i_clamp); + union { + bool real; + uint8_t base; + } u_antiwindup; + u_antiwindup.real = this->antiwindup; + *(outbuffer + offset + 0) = (u_antiwindup.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->antiwindup); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_set_point; + u_set_point.base = 0; + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->set_point = u_set_point.real; + offset += sizeof(this->set_point); + union { + double real; + uint64_t base; + } u_process_value; + u_process_value.base = 0; + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->process_value = u_process_value.real; + offset += sizeof(this->process_value); + union { + double real; + uint64_t base; + } u_process_value_dot; + u_process_value_dot.base = 0; + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->process_value_dot = u_process_value_dot.real; + offset += sizeof(this->process_value_dot); + union { + double real; + uint64_t base; + } u_error; + u_error.base = 0; + u_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->error = u_error.real; + offset += sizeof(this->error); + union { + double real; + uint64_t base; + } u_time_step; + u_time_step.base = 0; + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->time_step = u_time_step.real; + offset += sizeof(this->time_step); + union { + double real; + uint64_t base; + } u_command; + u_command.base = 0; + u_command.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_command.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_command.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_command.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_command.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_command.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_command.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_command.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->command = u_command.real; + offset += sizeof(this->command); + union { + double real; + uint64_t base; + } u_p; + u_p.base = 0; + u_p.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->p = u_p.real; + offset += sizeof(this->p); + union { + double real; + uint64_t base; + } u_i; + u_i.base = 0; + u_i.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i = u_i.real; + offset += sizeof(this->i); + union { + double real; + uint64_t base; + } u_d; + u_d.base = 0; + u_d.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->d = u_d.real; + offset += sizeof(this->d); + union { + double real; + uint64_t base; + } u_i_clamp; + u_i_clamp.base = 0; + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i_clamp = u_i_clamp.real; + offset += sizeof(this->i_clamp); + union { + bool real; + uint8_t base; + } u_antiwindup; + u_antiwindup.base = 0; + u_antiwindup.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->antiwindup = u_antiwindup.real; + offset += sizeof(this->antiwindup); + return offset; + } + + const char * getType(){ return "control_msgs/JointControllerState"; }; + const char * getMD5(){ return "987ad85e4756f3aef7f1e5e7fe0595d1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTolerance.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTolerance.h new file mode 100644 index 0000000000000000000000000000000000000000..051971eea27ac02358bfb543a622dd635f337038 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTolerance.h @@ -0,0 +1,151 @@ +#ifndef _ROS_control_msgs_JointTolerance_h +#define _ROS_control_msgs_JointTolerance_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class JointTolerance : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef double _position_type; + _position_type position; + typedef double _velocity_type; + _velocity_type velocity; + typedef double _acceleration_type; + _acceleration_type acceleration; + + JointTolerance(): + name(""), + position(0), + velocity(0), + acceleration(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + union { + double real; + uint64_t base; + } u_position; + u_position.real = this->position; + *(outbuffer + offset + 0) = (u_position.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_position.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_position.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_position.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_position.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_position.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_position.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_position.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_velocity; + u_velocity.real = this->velocity; + *(outbuffer + offset + 0) = (u_velocity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_velocity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_velocity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_velocity.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_velocity.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_velocity.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_velocity.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_velocity.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->velocity); + union { + double real; + uint64_t base; + } u_acceleration; + u_acceleration.real = this->acceleration; + *(outbuffer + offset + 0) = (u_acceleration.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_acceleration.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_acceleration.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_acceleration.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_acceleration.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_acceleration.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_acceleration.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_acceleration.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->acceleration); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + union { + double real; + uint64_t base; + } u_position; + u_position.base = 0; + u_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->position = u_position.real; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_velocity; + u_velocity.base = 0; + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->velocity = u_velocity.real; + offset += sizeof(this->velocity); + union { + double real; + uint64_t base; + } u_acceleration; + u_acceleration.base = 0; + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->acceleration = u_acceleration.real; + offset += sizeof(this->acceleration); + return offset; + } + + const char * getType(){ return "control_msgs/JointTolerance"; }; + const char * getMD5(){ return "f544fe9c16cf04547e135dd6063ff5be"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryAction.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryAction.h new file mode 100644 index 0000000000000000000000000000000000000000..96bbaa488b1686516ebea2e894139b651943b3ac --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_JointTrajectoryAction_h +#define _ROS_control_msgs_JointTrajectoryAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "control_msgs/JointTrajectoryActionGoal.h" +#include "control_msgs/JointTrajectoryActionResult.h" +#include "control_msgs/JointTrajectoryActionFeedback.h" + +namespace control_msgs +{ + + class JointTrajectoryAction : public ros::Msg + { + public: + typedef control_msgs::JointTrajectoryActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef control_msgs::JointTrajectoryActionResult _action_result_type; + _action_result_type action_result; + typedef control_msgs::JointTrajectoryActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + JointTrajectoryAction(): + action_goal(), + action_result(), + action_feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->action_goal.serialize(outbuffer + offset); + offset += this->action_result.serialize(outbuffer + offset); + offset += this->action_feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->action_goal.deserialize(inbuffer + offset); + offset += this->action_result.deserialize(inbuffer + offset); + offset += this->action_feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryAction"; }; + const char * getMD5(){ return "a04ba3ee8f6a2d0985a6aeaf23d9d7ad"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryActionFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..8df7fee09150195e67aab627eded53ee440df4ec --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_JointTrajectoryActionFeedback_h +#define _ROS_control_msgs_JointTrajectoryActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/JointTrajectoryFeedback.h" + +namespace control_msgs +{ + + class JointTrajectoryActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::JointTrajectoryFeedback _feedback_type; + _feedback_type feedback; + + JointTrajectoryActionFeedback(): + header(), + status(), + feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryActionFeedback"; }; + const char * getMD5(){ return "aae20e09065c3809e8a8e87c4c8953fd"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryActionGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..8c432bb5ae7458cfc6490faad9c4d3915495af9f --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_JointTrajectoryActionGoal_h +#define _ROS_control_msgs_JointTrajectoryActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "control_msgs/JointTrajectoryGoal.h" + +namespace control_msgs +{ + + class JointTrajectoryActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef control_msgs::JointTrajectoryGoal _goal_type; + _goal_type goal; + + JointTrajectoryActionGoal(): + header(), + goal_id(), + goal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->goal_id.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->goal_id.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryActionGoal"; }; + const char * getMD5(){ return "a99e83ef6185f9fdd7693efe99623a86"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryActionResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..2a11d224d36cd8b5341c79a371ceeecf97ee824d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_JointTrajectoryActionResult_h +#define _ROS_control_msgs_JointTrajectoryActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/JointTrajectoryResult.h" + +namespace control_msgs +{ + + class JointTrajectoryActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::JointTrajectoryResult _result_type; + _result_type result; + + JointTrajectoryActionResult(): + header(), + status(), + result() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->result.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->result.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryActionResult"; }; + const char * getMD5(){ return "1eb06eeff08fa7ea874431638cb52332"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryControllerState.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryControllerState.h new file mode 100644 index 0000000000000000000000000000000000000000..148db3a7900e5c1d65bbd9047d6ab3d4e9fa1363 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryControllerState.h @@ -0,0 +1,97 @@ +#ifndef _ROS_control_msgs_JointTrajectoryControllerState_h +#define _ROS_control_msgs_JointTrajectoryControllerState_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "trajectory_msgs/JointTrajectoryPoint.h" + +namespace control_msgs +{ + + class JointTrajectoryControllerState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t joint_names_length; + typedef char* _joint_names_type; + _joint_names_type st_joint_names; + _joint_names_type * joint_names; + typedef trajectory_msgs::JointTrajectoryPoint _desired_type; + _desired_type desired; + typedef trajectory_msgs::JointTrajectoryPoint _actual_type; + _actual_type actual; + typedef trajectory_msgs::JointTrajectoryPoint _error_type; + _error_type error; + + JointTrajectoryControllerState(): + header(), + joint_names_length(0), joint_names(NULL), + desired(), + actual(), + error() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_names_length); + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_joint_namesi = strlen(this->joint_names[i]); + varToArr(outbuffer + offset, length_joint_namesi); + offset += 4; + memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); + offset += length_joint_namesi; + } + offset += this->desired.serialize(outbuffer + offset); + offset += this->actual.serialize(outbuffer + offset); + offset += this->error.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_names_length); + if(joint_names_lengthT > joint_names_length) + this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); + joint_names_length = joint_names_lengthT; + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_st_joint_names; + arrToVar(length_st_joint_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_joint_names-1]=0; + this->st_joint_names = (char *)(inbuffer + offset-1); + offset += length_st_joint_names; + memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); + } + offset += this->desired.deserialize(inbuffer + offset); + offset += this->actual.deserialize(inbuffer + offset); + offset += this->error.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryControllerState"; }; + const char * getMD5(){ return "10817c60c2486ef6b33e97dcd87f4474"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..9dfe808d1ad01bfeb70ddfcf3902fa36fad650f5 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryFeedback.h @@ -0,0 +1,38 @@ +#ifndef _ROS_control_msgs_JointTrajectoryFeedback_h +#define _ROS_control_msgs_JointTrajectoryFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class JointTrajectoryFeedback : public ros::Msg + { + public: + + JointTrajectoryFeedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryFeedback"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..b699132e456fedba7acef0d08063bfe885fe772e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryGoal.h @@ -0,0 +1,44 @@ +#ifndef _ROS_control_msgs_JointTrajectoryGoal_h +#define _ROS_control_msgs_JointTrajectoryGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "trajectory_msgs/JointTrajectory.h" + +namespace control_msgs +{ + + class JointTrajectoryGoal : public ros::Msg + { + public: + typedef trajectory_msgs::JointTrajectory _trajectory_type; + _trajectory_type trajectory; + + JointTrajectoryGoal(): + trajectory() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->trajectory.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->trajectory.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryGoal"; }; + const char * getMD5(){ return "2a0eff76c870e8595636c2a562ca298e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryResult.h new file mode 100644 index 0000000000000000000000000000000000000000..623ed9cd099c212a6be65d4d93450b096de4d6d4 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/JointTrajectoryResult.h @@ -0,0 +1,38 @@ +#ifndef _ROS_control_msgs_JointTrajectoryResult_h +#define _ROS_control_msgs_JointTrajectoryResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class JointTrajectoryResult : public ros::Msg + { + public: + + JointTrajectoryResult() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryResult"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PidState.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PidState.h new file mode 100644 index 0000000000000000000000000000000000000000..a19ddf9739a643532eb894b8e544eafef46f8ed9 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PidState.h @@ -0,0 +1,420 @@ +#ifndef _ROS_control_msgs_PidState_h +#define _ROS_control_msgs_PidState_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "ros/duration.h" + +namespace control_msgs +{ + + class PidState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef ros::Duration _timestep_type; + _timestep_type timestep; + typedef double _error_type; + _error_type error; + typedef double _error_dot_type; + _error_dot_type error_dot; + typedef double _p_error_type; + _p_error_type p_error; + typedef double _i_error_type; + _i_error_type i_error; + typedef double _d_error_type; + _d_error_type d_error; + typedef double _p_term_type; + _p_term_type p_term; + typedef double _i_term_type; + _i_term_type i_term; + typedef double _d_term_type; + _d_term_type d_term; + typedef double _i_max_type; + _i_max_type i_max; + typedef double _i_min_type; + _i_min_type i_min; + typedef double _output_type; + _output_type output; + + PidState(): + header(), + timestep(), + error(0), + error_dot(0), + p_error(0), + i_error(0), + d_error(0), + p_term(0), + i_term(0), + d_term(0), + i_max(0), + i_min(0), + output(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->timestep.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timestep.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timestep.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timestep.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timestep.sec); + *(outbuffer + offset + 0) = (this->timestep.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timestep.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timestep.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timestep.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timestep.nsec); + union { + double real; + uint64_t base; + } u_error; + u_error.real = this->error; + *(outbuffer + offset + 0) = (u_error.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_error.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_error.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_error.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_error.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_error.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_error.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_error.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->error); + union { + double real; + uint64_t base; + } u_error_dot; + u_error_dot.real = this->error_dot; + *(outbuffer + offset + 0) = (u_error_dot.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_error_dot.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_error_dot.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_error_dot.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_error_dot.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_error_dot.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_error_dot.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_error_dot.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->error_dot); + union { + double real; + uint64_t base; + } u_p_error; + u_p_error.real = this->p_error; + *(outbuffer + offset + 0) = (u_p_error.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_p_error.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_p_error.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_p_error.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_p_error.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_p_error.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_p_error.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_p_error.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->p_error); + union { + double real; + uint64_t base; + } u_i_error; + u_i_error.real = this->i_error; + *(outbuffer + offset + 0) = (u_i_error.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i_error.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i_error.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i_error.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i_error.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i_error.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i_error.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i_error.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i_error); + union { + double real; + uint64_t base; + } u_d_error; + u_d_error.real = this->d_error; + *(outbuffer + offset + 0) = (u_d_error.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_d_error.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_d_error.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_d_error.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_d_error.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_d_error.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_d_error.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_d_error.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->d_error); + union { + double real; + uint64_t base; + } u_p_term; + u_p_term.real = this->p_term; + *(outbuffer + offset + 0) = (u_p_term.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_p_term.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_p_term.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_p_term.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_p_term.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_p_term.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_p_term.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_p_term.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->p_term); + union { + double real; + uint64_t base; + } u_i_term; + u_i_term.real = this->i_term; + *(outbuffer + offset + 0) = (u_i_term.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i_term.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i_term.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i_term.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i_term.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i_term.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i_term.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i_term.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i_term); + union { + double real; + uint64_t base; + } u_d_term; + u_d_term.real = this->d_term; + *(outbuffer + offset + 0) = (u_d_term.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_d_term.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_d_term.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_d_term.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_d_term.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_d_term.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_d_term.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_d_term.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->d_term); + union { + double real; + uint64_t base; + } u_i_max; + u_i_max.real = this->i_max; + *(outbuffer + offset + 0) = (u_i_max.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i_max.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i_max.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i_max.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i_max.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i_max.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i_max.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i_max.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i_max); + union { + double real; + uint64_t base; + } u_i_min; + u_i_min.real = this->i_min; + *(outbuffer + offset + 0) = (u_i_min.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i_min.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i_min.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i_min.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i_min.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i_min.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i_min.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i_min.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i_min); + union { + double real; + uint64_t base; + } u_output; + u_output.real = this->output; + *(outbuffer + offset + 0) = (u_output.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_output.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_output.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_output.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_output.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_output.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_output.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_output.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->output); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->timestep.sec = ((uint32_t) (*(inbuffer + offset))); + this->timestep.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timestep.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timestep.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timestep.sec); + this->timestep.nsec = ((uint32_t) (*(inbuffer + offset))); + this->timestep.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timestep.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timestep.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timestep.nsec); + union { + double real; + uint64_t base; + } u_error; + u_error.base = 0; + u_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->error = u_error.real; + offset += sizeof(this->error); + union { + double real; + uint64_t base; + } u_error_dot; + u_error_dot.base = 0; + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->error_dot = u_error_dot.real; + offset += sizeof(this->error_dot); + union { + double real; + uint64_t base; + } u_p_error; + u_p_error.base = 0; + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->p_error = u_p_error.real; + offset += sizeof(this->p_error); + union { + double real; + uint64_t base; + } u_i_error; + u_i_error.base = 0; + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i_error = u_i_error.real; + offset += sizeof(this->i_error); + union { + double real; + uint64_t base; + } u_d_error; + u_d_error.base = 0; + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->d_error = u_d_error.real; + offset += sizeof(this->d_error); + union { + double real; + uint64_t base; + } u_p_term; + u_p_term.base = 0; + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->p_term = u_p_term.real; + offset += sizeof(this->p_term); + union { + double real; + uint64_t base; + } u_i_term; + u_i_term.base = 0; + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i_term = u_i_term.real; + offset += sizeof(this->i_term); + union { + double real; + uint64_t base; + } u_d_term; + u_d_term.base = 0; + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->d_term = u_d_term.real; + offset += sizeof(this->d_term); + union { + double real; + uint64_t base; + } u_i_max; + u_i_max.base = 0; + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i_max = u_i_max.real; + offset += sizeof(this->i_max); + union { + double real; + uint64_t base; + } u_i_min; + u_i_min.base = 0; + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i_min = u_i_min.real; + offset += sizeof(this->i_min); + union { + double real; + uint64_t base; + } u_output; + u_output.base = 0; + u_output.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_output.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_output.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_output.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_output.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_output.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_output.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_output.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->output = u_output.real; + offset += sizeof(this->output); + return offset; + } + + const char * getType(){ return "control_msgs/PidState"; }; + const char * getMD5(){ return "b138ec00e886c10e73f27e8712252ea6"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadAction.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadAction.h new file mode 100644 index 0000000000000000000000000000000000000000..82ee446909a212585ae198b9842d4e8dcc6fc6e8 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_PointHeadAction_h +#define _ROS_control_msgs_PointHeadAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "control_msgs/PointHeadActionGoal.h" +#include "control_msgs/PointHeadActionResult.h" +#include "control_msgs/PointHeadActionFeedback.h" + +namespace control_msgs +{ + + class PointHeadAction : public ros::Msg + { + public: + typedef control_msgs::PointHeadActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef control_msgs::PointHeadActionResult _action_result_type; + _action_result_type action_result; + typedef control_msgs::PointHeadActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + PointHeadAction(): + action_goal(), + action_result(), + action_feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->action_goal.serialize(outbuffer + offset); + offset += this->action_result.serialize(outbuffer + offset); + offset += this->action_feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->action_goal.deserialize(inbuffer + offset); + offset += this->action_result.deserialize(inbuffer + offset); + offset += this->action_feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/PointHeadAction"; }; + const char * getMD5(){ return "7252920f1243de1b741f14f214125371"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadActionFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..780656b1de51f13a0114903f138582a487aec0c3 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_PointHeadActionFeedback_h +#define _ROS_control_msgs_PointHeadActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/PointHeadFeedback.h" + +namespace control_msgs +{ + + class PointHeadActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::PointHeadFeedback _feedback_type; + _feedback_type feedback; + + PointHeadActionFeedback(): + header(), + status(), + feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/PointHeadActionFeedback"; }; + const char * getMD5(){ return "33c9244957176bbba97dd641119e8460"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadActionGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..12ae7911bedd1f3cd4c6e032e5e37c68f7b31997 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_PointHeadActionGoal_h +#define _ROS_control_msgs_PointHeadActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "control_msgs/PointHeadGoal.h" + +namespace control_msgs +{ + + class PointHeadActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef control_msgs::PointHeadGoal _goal_type; + _goal_type goal; + + PointHeadActionGoal(): + header(), + goal_id(), + goal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->goal_id.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->goal_id.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/PointHeadActionGoal"; }; + const char * getMD5(){ return "b53a8323d0ba7b310ba17a2d3a82a6b8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadActionResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..7708fe60379fb43a4a3002871dfcf7ac01689c9d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_PointHeadActionResult_h +#define _ROS_control_msgs_PointHeadActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/PointHeadResult.h" + +namespace control_msgs +{ + + class PointHeadActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::PointHeadResult _result_type; + _result_type result; + + PointHeadActionResult(): + header(), + status(), + result() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->result.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->result.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/PointHeadActionResult"; }; + const char * getMD5(){ return "1eb06eeff08fa7ea874431638cb52332"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..beafd3ef52939c8a44e8323d1e2284c8b52d8857 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadFeedback.h @@ -0,0 +1,70 @@ +#ifndef _ROS_control_msgs_PointHeadFeedback_h +#define _ROS_control_msgs_PointHeadFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class PointHeadFeedback : public ros::Msg + { + public: + typedef double _pointing_angle_error_type; + _pointing_angle_error_type pointing_angle_error; + + PointHeadFeedback(): + pointing_angle_error(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_pointing_angle_error; + u_pointing_angle_error.real = this->pointing_angle_error; + *(outbuffer + offset + 0) = (u_pointing_angle_error.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_pointing_angle_error.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_pointing_angle_error.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_pointing_angle_error.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_pointing_angle_error.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_pointing_angle_error.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_pointing_angle_error.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_pointing_angle_error.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->pointing_angle_error); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_pointing_angle_error; + u_pointing_angle_error.base = 0; + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->pointing_angle_error = u_pointing_angle_error.real; + offset += sizeof(this->pointing_angle_error); + return offset; + } + + const char * getType(){ return "control_msgs/PointHeadFeedback"; }; + const char * getMD5(){ return "cce80d27fd763682da8805a73316cab4"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..4d7355cbdea878a4b77632d5ec9e169ab7320747 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadGoal.h @@ -0,0 +1,123 @@ +#ifndef _ROS_control_msgs_PointHeadGoal_h +#define _ROS_control_msgs_PointHeadGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/PointStamped.h" +#include "geometry_msgs/Vector3.h" +#include "ros/duration.h" + +namespace control_msgs +{ + + class PointHeadGoal : public ros::Msg + { + public: + typedef geometry_msgs::PointStamped _target_type; + _target_type target; + typedef geometry_msgs::Vector3 _pointing_axis_type; + _pointing_axis_type pointing_axis; + typedef const char* _pointing_frame_type; + _pointing_frame_type pointing_frame; + typedef ros::Duration _min_duration_type; + _min_duration_type min_duration; + typedef double _max_velocity_type; + _max_velocity_type max_velocity; + + PointHeadGoal(): + target(), + pointing_axis(), + pointing_frame(""), + min_duration(), + max_velocity(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->target.serialize(outbuffer + offset); + offset += this->pointing_axis.serialize(outbuffer + offset); + uint32_t length_pointing_frame = strlen(this->pointing_frame); + varToArr(outbuffer + offset, length_pointing_frame); + offset += 4; + memcpy(outbuffer + offset, this->pointing_frame, length_pointing_frame); + offset += length_pointing_frame; + *(outbuffer + offset + 0) = (this->min_duration.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->min_duration.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->min_duration.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->min_duration.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->min_duration.sec); + *(outbuffer + offset + 0) = (this->min_duration.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->min_duration.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->min_duration.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->min_duration.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->min_duration.nsec); + union { + double real; + uint64_t base; + } u_max_velocity; + u_max_velocity.real = this->max_velocity; + *(outbuffer + offset + 0) = (u_max_velocity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_velocity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_velocity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_velocity.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max_velocity.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max_velocity.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max_velocity.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max_velocity.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max_velocity); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->target.deserialize(inbuffer + offset); + offset += this->pointing_axis.deserialize(inbuffer + offset); + uint32_t length_pointing_frame; + arrToVar(length_pointing_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_pointing_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_pointing_frame-1]=0; + this->pointing_frame = (char *)(inbuffer + offset-1); + offset += length_pointing_frame; + this->min_duration.sec = ((uint32_t) (*(inbuffer + offset))); + this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->min_duration.sec); + this->min_duration.nsec = ((uint32_t) (*(inbuffer + offset))); + this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->min_duration.nsec); + union { + double real; + uint64_t base; + } u_max_velocity; + u_max_velocity.base = 0; + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max_velocity = u_max_velocity.real; + offset += sizeof(this->max_velocity); + return offset; + } + + const char * getType(){ return "control_msgs/PointHeadGoal"; }; + const char * getMD5(){ return "8b92b1cd5e06c8a94c917dc3209a4c1d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadResult.h new file mode 100644 index 0000000000000000000000000000000000000000..53f789e92946eeba57f8825f09422dd6fc4d5b83 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/PointHeadResult.h @@ -0,0 +1,38 @@ +#ifndef _ROS_control_msgs_PointHeadResult_h +#define _ROS_control_msgs_PointHeadResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class PointHeadResult : public ros::Msg + { + public: + + PointHeadResult() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return "control_msgs/PointHeadResult"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/QueryCalibrationState.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/QueryCalibrationState.h new file mode 100644 index 0000000000000000000000000000000000000000..0fd1a66a0be9f04857c28b0ab83f4147ba73788e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/QueryCalibrationState.h @@ -0,0 +1,88 @@ +#ifndef _ROS_SERVICE_QueryCalibrationState_h +#define _ROS_SERVICE_QueryCalibrationState_h +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + +static const char QUERYCALIBRATIONSTATE[] = "control_msgs/QueryCalibrationState"; + + class QueryCalibrationStateRequest : public ros::Msg + { + public: + + QueryCalibrationStateRequest() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return QUERYCALIBRATIONSTATE; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class QueryCalibrationStateResponse : public ros::Msg + { + public: + typedef bool _is_calibrated_type; + _is_calibrated_type is_calibrated; + + QueryCalibrationStateResponse(): + is_calibrated(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_is_calibrated; + u_is_calibrated.real = this->is_calibrated; + *(outbuffer + offset + 0) = (u_is_calibrated.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->is_calibrated); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_is_calibrated; + u_is_calibrated.base = 0; + u_is_calibrated.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->is_calibrated = u_is_calibrated.real; + offset += sizeof(this->is_calibrated); + return offset; + } + + const char * getType(){ return QUERYCALIBRATIONSTATE; }; + const char * getMD5(){ return "28af3beedcb84986b8e470dc5470507d"; }; + + }; + + class QueryCalibrationState { + public: + typedef QueryCalibrationStateRequest Request; + typedef QueryCalibrationStateResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/QueryTrajectoryState.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/QueryTrajectoryState.h new file mode 100644 index 0000000000000000000000000000000000000000..aef19a80e64436c1c8851f3d5344b841ece4a8ab --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/QueryTrajectoryState.h @@ -0,0 +1,287 @@ +#ifndef _ROS_SERVICE_QueryTrajectoryState_h +#define _ROS_SERVICE_QueryTrajectoryState_h +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" + +namespace control_msgs +{ + +static const char QUERYTRAJECTORYSTATE[] = "control_msgs/QueryTrajectoryState"; + + class QueryTrajectoryStateRequest : public ros::Msg + { + public: + typedef ros::Time _time_type; + _time_type time; + + QueryTrajectoryStateRequest(): + time() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time.sec); + *(outbuffer + offset + 0) = (this->time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->time.sec = ((uint32_t) (*(inbuffer + offset))); + this->time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time.sec); + this->time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time.nsec); + return offset; + } + + const char * getType(){ return QUERYTRAJECTORYSTATE; }; + const char * getMD5(){ return "556a4fb76023a469987922359d08a844"; }; + + }; + + class QueryTrajectoryStateResponse : public ros::Msg + { + public: + uint32_t name_length; + typedef char* _name_type; + _name_type st_name; + _name_type * name; + uint32_t position_length; + typedef double _position_type; + _position_type st_position; + _position_type * position; + uint32_t velocity_length; + typedef double _velocity_type; + _velocity_type st_velocity; + _velocity_type * velocity; + uint32_t acceleration_length; + typedef double _acceleration_type; + _acceleration_type st_acceleration; + _acceleration_type * acceleration; + + QueryTrajectoryStateResponse(): + name_length(0), name(NULL), + position_length(0), position(NULL), + velocity_length(0), velocity(NULL), + acceleration_length(0), acceleration(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->name_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->name_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->name_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->name_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->name_length); + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_namei = strlen(this->name[i]); + varToArr(outbuffer + offset, length_namei); + offset += 4; + memcpy(outbuffer + offset, this->name[i], length_namei); + offset += length_namei; + } + *(outbuffer + offset + 0) = (this->position_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->position_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->position_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->position_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->position_length); + for( uint32_t i = 0; i < position_length; i++){ + union { + double real; + uint64_t base; + } u_positioni; + u_positioni.real = this->position[i]; + *(outbuffer + offset + 0) = (u_positioni.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_positioni.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_positioni.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_positioni.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_positioni.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_positioni.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_positioni.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_positioni.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position[i]); + } + *(outbuffer + offset + 0) = (this->velocity_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->velocity_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->velocity_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->velocity_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->velocity_length); + for( uint32_t i = 0; i < velocity_length; i++){ + union { + double real; + uint64_t base; + } u_velocityi; + u_velocityi.real = this->velocity[i]; + *(outbuffer + offset + 0) = (u_velocityi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_velocityi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_velocityi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_velocityi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_velocityi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_velocityi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_velocityi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_velocityi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->velocity[i]); + } + *(outbuffer + offset + 0) = (this->acceleration_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->acceleration_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->acceleration_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->acceleration_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->acceleration_length); + for( uint32_t i = 0; i < acceleration_length; i++){ + union { + double real; + uint64_t base; + } u_accelerationi; + u_accelerationi.real = this->acceleration[i]; + *(outbuffer + offset + 0) = (u_accelerationi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_accelerationi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_accelerationi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_accelerationi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_accelerationi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_accelerationi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_accelerationi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_accelerationi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->acceleration[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t name_lengthT = ((uint32_t) (*(inbuffer + offset))); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->name_length); + if(name_lengthT > name_length) + this->name = (char**)realloc(this->name, name_lengthT * sizeof(char*)); + name_length = name_lengthT; + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_st_name; + arrToVar(length_st_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_name-1]=0; + this->st_name = (char *)(inbuffer + offset-1); + offset += length_st_name; + memcpy( &(this->name[i]), &(this->st_name), sizeof(char*)); + } + uint32_t position_lengthT = ((uint32_t) (*(inbuffer + offset))); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->position_length); + if(position_lengthT > position_length) + this->position = (double*)realloc(this->position, position_lengthT * sizeof(double)); + position_length = position_lengthT; + for( uint32_t i = 0; i < position_length; i++){ + union { + double real; + uint64_t base; + } u_st_position; + u_st_position.base = 0; + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_position = u_st_position.real; + offset += sizeof(this->st_position); + memcpy( &(this->position[i]), &(this->st_position), sizeof(double)); + } + uint32_t velocity_lengthT = ((uint32_t) (*(inbuffer + offset))); + velocity_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + velocity_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + velocity_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->velocity_length); + if(velocity_lengthT > velocity_length) + this->velocity = (double*)realloc(this->velocity, velocity_lengthT * sizeof(double)); + velocity_length = velocity_lengthT; + for( uint32_t i = 0; i < velocity_length; i++){ + union { + double real; + uint64_t base; + } u_st_velocity; + u_st_velocity.base = 0; + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_velocity = u_st_velocity.real; + offset += sizeof(this->st_velocity); + memcpy( &(this->velocity[i]), &(this->st_velocity), sizeof(double)); + } + uint32_t acceleration_lengthT = ((uint32_t) (*(inbuffer + offset))); + acceleration_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + acceleration_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + acceleration_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->acceleration_length); + if(acceleration_lengthT > acceleration_length) + this->acceleration = (double*)realloc(this->acceleration, acceleration_lengthT * sizeof(double)); + acceleration_length = acceleration_lengthT; + for( uint32_t i = 0; i < acceleration_length; i++){ + union { + double real; + uint64_t base; + } u_st_acceleration; + u_st_acceleration.base = 0; + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_acceleration = u_st_acceleration.real; + offset += sizeof(this->st_acceleration); + memcpy( &(this->acceleration[i]), &(this->st_acceleration), sizeof(double)); + } + return offset; + } + + const char * getType(){ return QUERYTRAJECTORYSTATE; }; + const char * getMD5(){ return "1f1a6554ad060f44d013e71868403c1a"; }; + + }; + + class QueryTrajectoryState { + public: + typedef QueryTrajectoryStateRequest Request; + typedef QueryTrajectoryStateResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionAction.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionAction.h new file mode 100644 index 0000000000000000000000000000000000000000..3117ee131ddcb6691577837cf716e9570c7e4742 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_SingleJointPositionAction_h +#define _ROS_control_msgs_SingleJointPositionAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "control_msgs/SingleJointPositionActionGoal.h" +#include "control_msgs/SingleJointPositionActionResult.h" +#include "control_msgs/SingleJointPositionActionFeedback.h" + +namespace control_msgs +{ + + class SingleJointPositionAction : public ros::Msg + { + public: + typedef control_msgs::SingleJointPositionActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef control_msgs::SingleJointPositionActionResult _action_result_type; + _action_result_type action_result; + typedef control_msgs::SingleJointPositionActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + SingleJointPositionAction(): + action_goal(), + action_result(), + action_feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->action_goal.serialize(outbuffer + offset); + offset += this->action_result.serialize(outbuffer + offset); + offset += this->action_feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->action_goal.deserialize(inbuffer + offset); + offset += this->action_result.deserialize(inbuffer + offset); + offset += this->action_feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/SingleJointPositionAction"; }; + const char * getMD5(){ return "c4a786b7d53e5d0983decf967a5a779e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionActionFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..82cba63dd233a10c8b46d9727a2ba46d226c038e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_SingleJointPositionActionFeedback_h +#define _ROS_control_msgs_SingleJointPositionActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/SingleJointPositionFeedback.h" + +namespace control_msgs +{ + + class SingleJointPositionActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::SingleJointPositionFeedback _feedback_type; + _feedback_type feedback; + + SingleJointPositionActionFeedback(): + header(), + status(), + feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/SingleJointPositionActionFeedback"; }; + const char * getMD5(){ return "3503b7cf8972f90d245850a5d8796cfa"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionActionGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..75c789880add2c65d89920a2b69f97df1cbb2c89 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_SingleJointPositionActionGoal_h +#define _ROS_control_msgs_SingleJointPositionActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "control_msgs/SingleJointPositionGoal.h" + +namespace control_msgs +{ + + class SingleJointPositionActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef control_msgs::SingleJointPositionGoal _goal_type; + _goal_type goal; + + SingleJointPositionActionGoal(): + header(), + goal_id(), + goal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->goal_id.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->goal_id.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/SingleJointPositionActionGoal"; }; + const char * getMD5(){ return "4b0d3d091471663e17749c1d0db90f61"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionActionResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..ef99cd8ff3a1db8c3648312f9c13b9255bb0dd3e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_SingleJointPositionActionResult_h +#define _ROS_control_msgs_SingleJointPositionActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/SingleJointPositionResult.h" + +namespace control_msgs +{ + + class SingleJointPositionActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::SingleJointPositionResult _result_type; + _result_type result; + + SingleJointPositionActionResult(): + header(), + status(), + result() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->result.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->result.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/SingleJointPositionActionResult"; }; + const char * getMD5(){ return "1eb06eeff08fa7ea874431638cb52332"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..cbf8fa4dc0b4ff3a630157bbf11bcfd6f92bca06 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionFeedback.h @@ -0,0 +1,140 @@ +#ifndef _ROS_control_msgs_SingleJointPositionFeedback_h +#define _ROS_control_msgs_SingleJointPositionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace control_msgs +{ + + class SingleJointPositionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef double _position_type; + _position_type position; + typedef double _velocity_type; + _velocity_type velocity; + typedef double _error_type; + _error_type error; + + SingleJointPositionFeedback(): + header(), + position(0), + velocity(0), + error(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_position; + u_position.real = this->position; + *(outbuffer + offset + 0) = (u_position.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_position.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_position.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_position.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_position.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_position.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_position.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_position.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_velocity; + u_velocity.real = this->velocity; + *(outbuffer + offset + 0) = (u_velocity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_velocity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_velocity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_velocity.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_velocity.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_velocity.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_velocity.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_velocity.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->velocity); + union { + double real; + uint64_t base; + } u_error; + u_error.real = this->error; + *(outbuffer + offset + 0) = (u_error.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_error.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_error.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_error.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_error.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_error.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_error.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_error.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->error); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_position; + u_position.base = 0; + u_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->position = u_position.real; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_velocity; + u_velocity.base = 0; + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->velocity = u_velocity.real; + offset += sizeof(this->velocity); + union { + double real; + uint64_t base; + } u_error; + u_error.base = 0; + u_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->error = u_error.real; + offset += sizeof(this->error); + return offset; + } + + const char * getType(){ return "control_msgs/SingleJointPositionFeedback"; }; + const char * getMD5(){ return "8cee65610a3d08e0a1bded82f146f1fd"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..7261176297aea0181e9c8e4eb3178d0555b7cbc0 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionGoal.h @@ -0,0 +1,126 @@ +#ifndef _ROS_control_msgs_SingleJointPositionGoal_h +#define _ROS_control_msgs_SingleJointPositionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/duration.h" + +namespace control_msgs +{ + + class SingleJointPositionGoal : public ros::Msg + { + public: + typedef double _position_type; + _position_type position; + typedef ros::Duration _min_duration_type; + _min_duration_type min_duration; + typedef double _max_velocity_type; + _max_velocity_type max_velocity; + + SingleJointPositionGoal(): + position(0), + min_duration(), + max_velocity(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_position; + u_position.real = this->position; + *(outbuffer + offset + 0) = (u_position.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_position.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_position.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_position.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_position.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_position.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_position.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_position.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position); + *(outbuffer + offset + 0) = (this->min_duration.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->min_duration.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->min_duration.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->min_duration.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->min_duration.sec); + *(outbuffer + offset + 0) = (this->min_duration.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->min_duration.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->min_duration.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->min_duration.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->min_duration.nsec); + union { + double real; + uint64_t base; + } u_max_velocity; + u_max_velocity.real = this->max_velocity; + *(outbuffer + offset + 0) = (u_max_velocity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_velocity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_velocity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_velocity.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max_velocity.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max_velocity.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max_velocity.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max_velocity.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max_velocity); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_position; + u_position.base = 0; + u_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->position = u_position.real; + offset += sizeof(this->position); + this->min_duration.sec = ((uint32_t) (*(inbuffer + offset))); + this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->min_duration.sec); + this->min_duration.nsec = ((uint32_t) (*(inbuffer + offset))); + this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->min_duration.nsec); + union { + double real; + uint64_t base; + } u_max_velocity; + u_max_velocity.base = 0; + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max_velocity = u_max_velocity.real; + offset += sizeof(this->max_velocity); + return offset; + } + + const char * getType(){ return "control_msgs/SingleJointPositionGoal"; }; + const char * getMD5(){ return "fbaaa562a23a013fd5053e5f72cbb35c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..7593425910d62bd10c7958e2eb57e86705111ef9 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_msgs/SingleJointPositionResult.h @@ -0,0 +1,38 @@ +#ifndef _ROS_control_msgs_SingleJointPositionResult_h +#define _ROS_control_msgs_SingleJointPositionResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class SingleJointPositionResult : public ros::Msg + { + public: + + SingleJointPositionResult() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return "control_msgs/SingleJointPositionResult"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_toolbox/SetPidGains.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_toolbox/SetPidGains.h new file mode 100644 index 0000000000000000000000000000000000000000..709d825d139dc7e2147243584c72469d780eb502 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/control_toolbox/SetPidGains.h @@ -0,0 +1,216 @@ +#ifndef _ROS_SERVICE_SetPidGains_h +#define _ROS_SERVICE_SetPidGains_h +#include +#include +#include +#include "ros/msg.h" + +namespace control_toolbox +{ + +static const char SETPIDGAINS[] = "control_toolbox/SetPidGains"; + + class SetPidGainsRequest : public ros::Msg + { + public: + typedef double _p_type; + _p_type p; + typedef double _i_type; + _i_type i; + typedef double _d_type; + _d_type d; + typedef double _i_clamp_type; + _i_clamp_type i_clamp; + typedef bool _antiwindup_type; + _antiwindup_type antiwindup; + + SetPidGainsRequest(): + p(0), + i(0), + d(0), + i_clamp(0), + antiwindup(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_p; + u_p.real = this->p; + *(outbuffer + offset + 0) = (u_p.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_p.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_p.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_p.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_p.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_p.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_p.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_p.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->p); + union { + double real; + uint64_t base; + } u_i; + u_i.real = this->i; + *(outbuffer + offset + 0) = (u_i.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i); + union { + double real; + uint64_t base; + } u_d; + u_d.real = this->d; + *(outbuffer + offset + 0) = (u_d.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_d.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_d.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_d.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_d.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_d.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_d.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_d.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->d); + union { + double real; + uint64_t base; + } u_i_clamp; + u_i_clamp.real = this->i_clamp; + *(outbuffer + offset + 0) = (u_i_clamp.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i_clamp.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i_clamp.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i_clamp.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i_clamp.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i_clamp.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i_clamp.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i_clamp.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i_clamp); + union { + bool real; + uint8_t base; + } u_antiwindup; + u_antiwindup.real = this->antiwindup; + *(outbuffer + offset + 0) = (u_antiwindup.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->antiwindup); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_p; + u_p.base = 0; + u_p.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->p = u_p.real; + offset += sizeof(this->p); + union { + double real; + uint64_t base; + } u_i; + u_i.base = 0; + u_i.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i = u_i.real; + offset += sizeof(this->i); + union { + double real; + uint64_t base; + } u_d; + u_d.base = 0; + u_d.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->d = u_d.real; + offset += sizeof(this->d); + union { + double real; + uint64_t base; + } u_i_clamp; + u_i_clamp.base = 0; + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i_clamp = u_i_clamp.real; + offset += sizeof(this->i_clamp); + union { + bool real; + uint8_t base; + } u_antiwindup; + u_antiwindup.base = 0; + u_antiwindup.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->antiwindup = u_antiwindup.real; + offset += sizeof(this->antiwindup); + return offset; + } + + const char * getType(){ return SETPIDGAINS; }; + const char * getMD5(){ return "4a43159879643e60937bf2893b633607"; }; + + }; + + class SetPidGainsResponse : public ros::Msg + { + public: + + SetPidGainsResponse() + { + } + + 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 SETPIDGAINS; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class SetPidGains { + public: + typedef SetPidGainsRequest Request; + typedef SetPidGainsResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ControllerState.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ControllerState.h new file mode 100644 index 0000000000000000000000000000000000000000..ea728c4ee7e7cd9b12c7db0f82a13ca9a2653434 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ControllerState.h @@ -0,0 +1,115 @@ +#ifndef _ROS_controller_manager_msgs_ControllerState_h +#define _ROS_controller_manager_msgs_ControllerState_h + +#include +#include +#include +#include "ros/msg.h" +#include "controller_manager_msgs/HardwareInterfaceResources.h" + +namespace controller_manager_msgs +{ + + class ControllerState : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _state_type; + _state_type state; + typedef const char* _type_type; + _type_type type; + uint32_t claimed_resources_length; + typedef controller_manager_msgs::HardwareInterfaceResources _claimed_resources_type; + _claimed_resources_type st_claimed_resources; + _claimed_resources_type * claimed_resources; + + ControllerState(): + name(""), + state(""), + type(""), + claimed_resources_length(0), claimed_resources(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_state = strlen(this->state); + varToArr(outbuffer + offset, length_state); + offset += 4; + memcpy(outbuffer + offset, this->state, length_state); + offset += length_state; + uint32_t length_type = strlen(this->type); + varToArr(outbuffer + offset, length_type); + offset += 4; + memcpy(outbuffer + offset, this->type, length_type); + offset += length_type; + *(outbuffer + offset + 0) = (this->claimed_resources_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->claimed_resources_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->claimed_resources_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->claimed_resources_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->claimed_resources_length); + for( uint32_t i = 0; i < claimed_resources_length; i++){ + offset += this->claimed_resources[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_state; + arrToVar(length_state, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_state; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_state-1]=0; + this->state = (char *)(inbuffer + offset-1); + offset += length_state; + uint32_t length_type; + arrToVar(length_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type-1]=0; + this->type = (char *)(inbuffer + offset-1); + offset += length_type; + uint32_t claimed_resources_lengthT = ((uint32_t) (*(inbuffer + offset))); + claimed_resources_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + claimed_resources_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + claimed_resources_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->claimed_resources_length); + if(claimed_resources_lengthT > claimed_resources_length) + this->claimed_resources = (controller_manager_msgs::HardwareInterfaceResources*)realloc(this->claimed_resources, claimed_resources_lengthT * sizeof(controller_manager_msgs::HardwareInterfaceResources)); + claimed_resources_length = claimed_resources_lengthT; + for( uint32_t i = 0; i < claimed_resources_length; i++){ + offset += this->st_claimed_resources.deserialize(inbuffer + offset); + memcpy( &(this->claimed_resources[i]), &(this->st_claimed_resources), sizeof(controller_manager_msgs::HardwareInterfaceResources)); + } + return offset; + } + + const char * getType(){ return "controller_manager_msgs/ControllerState"; }; + const char * getMD5(){ return "aeb6b261d97793ab74099a3740245272"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ControllerStatistics.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ControllerStatistics.h new file mode 100644 index 0000000000000000000000000000000000000000..c62773c538e5afba7c15e362278f6f861c9c27c8 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ControllerStatistics.h @@ -0,0 +1,231 @@ +#ifndef _ROS_controller_manager_msgs_ControllerStatistics_h +#define _ROS_controller_manager_msgs_ControllerStatistics_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" +#include "ros/duration.h" + +namespace controller_manager_msgs +{ + + class ControllerStatistics : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _type_type; + _type_type type; + typedef ros::Time _timestamp_type; + _timestamp_type timestamp; + typedef bool _running_type; + _running_type running; + typedef ros::Duration _max_time_type; + _max_time_type max_time; + typedef ros::Duration _mean_time_type; + _mean_time_type mean_time; + typedef ros::Duration _variance_time_type; + _variance_time_type variance_time; + typedef int32_t _num_control_loop_overruns_type; + _num_control_loop_overruns_type num_control_loop_overruns; + typedef ros::Time _time_last_control_loop_overrun_type; + _time_last_control_loop_overrun_type time_last_control_loop_overrun; + + ControllerStatistics(): + name(""), + type(""), + timestamp(), + running(0), + max_time(), + mean_time(), + variance_time(), + num_control_loop_overruns(0), + time_last_control_loop_overrun() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_type = strlen(this->type); + varToArr(outbuffer + offset, length_type); + offset += 4; + memcpy(outbuffer + offset, this->type, length_type); + offset += length_type; + *(outbuffer + offset + 0) = (this->timestamp.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timestamp.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timestamp.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timestamp.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timestamp.sec); + *(outbuffer + offset + 0) = (this->timestamp.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timestamp.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timestamp.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timestamp.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timestamp.nsec); + union { + bool real; + uint8_t base; + } u_running; + u_running.real = this->running; + *(outbuffer + offset + 0) = (u_running.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->running); + *(outbuffer + offset + 0) = (this->max_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->max_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->max_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->max_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->max_time.sec); + *(outbuffer + offset + 0) = (this->max_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->max_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->max_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->max_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->max_time.nsec); + *(outbuffer + offset + 0) = (this->mean_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->mean_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->mean_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->mean_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->mean_time.sec); + *(outbuffer + offset + 0) = (this->mean_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->mean_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->mean_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->mean_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->mean_time.nsec); + *(outbuffer + offset + 0) = (this->variance_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->variance_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->variance_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->variance_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->variance_time.sec); + *(outbuffer + offset + 0) = (this->variance_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->variance_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->variance_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->variance_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->variance_time.nsec); + union { + int32_t real; + uint32_t base; + } u_num_control_loop_overruns; + u_num_control_loop_overruns.real = this->num_control_loop_overruns; + *(outbuffer + offset + 0) = (u_num_control_loop_overruns.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_num_control_loop_overruns.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_num_control_loop_overruns.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_num_control_loop_overruns.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->num_control_loop_overruns); + *(outbuffer + offset + 0) = (this->time_last_control_loop_overrun.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_last_control_loop_overrun.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_last_control_loop_overrun.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_last_control_loop_overrun.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_last_control_loop_overrun.sec); + *(outbuffer + offset + 0) = (this->time_last_control_loop_overrun.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_last_control_loop_overrun.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_last_control_loop_overrun.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_last_control_loop_overrun.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_last_control_loop_overrun.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_type; + arrToVar(length_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type-1]=0; + this->type = (char *)(inbuffer + offset-1); + offset += length_type; + this->timestamp.sec = ((uint32_t) (*(inbuffer + offset))); + this->timestamp.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timestamp.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timestamp.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timestamp.sec); + this->timestamp.nsec = ((uint32_t) (*(inbuffer + offset))); + this->timestamp.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timestamp.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timestamp.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timestamp.nsec); + union { + bool real; + uint8_t base; + } u_running; + u_running.base = 0; + u_running.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->running = u_running.real; + offset += sizeof(this->running); + this->max_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->max_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->max_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->max_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->max_time.sec); + this->max_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->max_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->max_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->max_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->max_time.nsec); + this->mean_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->mean_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->mean_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->mean_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->mean_time.sec); + this->mean_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->mean_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->mean_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->mean_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->mean_time.nsec); + this->variance_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->variance_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->variance_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->variance_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->variance_time.sec); + this->variance_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->variance_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->variance_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->variance_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->variance_time.nsec); + union { + int32_t real; + uint32_t base; + } u_num_control_loop_overruns; + u_num_control_loop_overruns.base = 0; + u_num_control_loop_overruns.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_num_control_loop_overruns.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_num_control_loop_overruns.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_num_control_loop_overruns.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->num_control_loop_overruns = u_num_control_loop_overruns.real; + offset += sizeof(this->num_control_loop_overruns); + this->time_last_control_loop_overrun.sec = ((uint32_t) (*(inbuffer + offset))); + this->time_last_control_loop_overrun.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_last_control_loop_overrun.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_last_control_loop_overrun.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_last_control_loop_overrun.sec); + this->time_last_control_loop_overrun.nsec = ((uint32_t) (*(inbuffer + offset))); + this->time_last_control_loop_overrun.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_last_control_loop_overrun.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_last_control_loop_overrun.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_last_control_loop_overrun.nsec); + return offset; + } + + const char * getType(){ return "controller_manager_msgs/ControllerStatistics"; }; + const char * getMD5(){ return "697780c372c8d8597a1436d0e2ad3ba8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ControllersStatistics.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ControllersStatistics.h new file mode 100644 index 0000000000000000000000000000000000000000..a3c0503787ce679540031b05df59893781be1ed1 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ControllersStatistics.h @@ -0,0 +1,70 @@ +#ifndef _ROS_controller_manager_msgs_ControllersStatistics_h +#define _ROS_controller_manager_msgs_ControllersStatistics_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "controller_manager_msgs/ControllerStatistics.h" + +namespace controller_manager_msgs +{ + + class ControllersStatistics : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t controller_length; + typedef controller_manager_msgs::ControllerStatistics _controller_type; + _controller_type st_controller; + _controller_type * controller; + + ControllersStatistics(): + header(), + controller_length(0), controller(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->controller_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->controller_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->controller_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->controller_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->controller_length); + for( uint32_t i = 0; i < controller_length; i++){ + offset += this->controller[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t controller_lengthT = ((uint32_t) (*(inbuffer + offset))); + controller_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + controller_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + controller_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->controller_length); + if(controller_lengthT > controller_length) + this->controller = (controller_manager_msgs::ControllerStatistics*)realloc(this->controller, controller_lengthT * sizeof(controller_manager_msgs::ControllerStatistics)); + controller_length = controller_lengthT; + for( uint32_t i = 0; i < controller_length; i++){ + offset += this->st_controller.deserialize(inbuffer + offset); + memcpy( &(this->controller[i]), &(this->st_controller), sizeof(controller_manager_msgs::ControllerStatistics)); + } + return offset; + } + + const char * getType(){ return "controller_manager_msgs/ControllersStatistics"; }; + const char * getMD5(){ return "a154c347736773e3700d1719105df29d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/HardwareInterfaceResources.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/HardwareInterfaceResources.h new file mode 100644 index 0000000000000000000000000000000000000000..5b574c1da509a5681fd58c280565062562012911 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/HardwareInterfaceResources.h @@ -0,0 +1,92 @@ +#ifndef _ROS_controller_manager_msgs_HardwareInterfaceResources_h +#define _ROS_controller_manager_msgs_HardwareInterfaceResources_h + +#include +#include +#include +#include "ros/msg.h" + +namespace controller_manager_msgs +{ + + class HardwareInterfaceResources : public ros::Msg + { + public: + typedef const char* _hardware_interface_type; + _hardware_interface_type hardware_interface; + uint32_t resources_length; + typedef char* _resources_type; + _resources_type st_resources; + _resources_type * resources; + + HardwareInterfaceResources(): + hardware_interface(""), + resources_length(0), resources(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_hardware_interface = strlen(this->hardware_interface); + varToArr(outbuffer + offset, length_hardware_interface); + offset += 4; + memcpy(outbuffer + offset, this->hardware_interface, length_hardware_interface); + offset += length_hardware_interface; + *(outbuffer + offset + 0) = (this->resources_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->resources_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->resources_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->resources_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->resources_length); + for( uint32_t i = 0; i < resources_length; i++){ + uint32_t length_resourcesi = strlen(this->resources[i]); + varToArr(outbuffer + offset, length_resourcesi); + offset += 4; + memcpy(outbuffer + offset, this->resources[i], length_resourcesi); + offset += length_resourcesi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_hardware_interface; + arrToVar(length_hardware_interface, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_hardware_interface; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_hardware_interface-1]=0; + this->hardware_interface = (char *)(inbuffer + offset-1); + offset += length_hardware_interface; + uint32_t resources_lengthT = ((uint32_t) (*(inbuffer + offset))); + resources_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + resources_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + resources_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->resources_length); + if(resources_lengthT > resources_length) + this->resources = (char**)realloc(this->resources, resources_lengthT * sizeof(char*)); + resources_length = resources_lengthT; + for( uint32_t i = 0; i < resources_length; i++){ + uint32_t length_st_resources; + arrToVar(length_st_resources, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_resources; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_resources-1]=0; + this->st_resources = (char *)(inbuffer + offset-1); + offset += length_st_resources; + memcpy( &(this->resources[i]), &(this->st_resources), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return "controller_manager_msgs/HardwareInterfaceResources"; }; + const char * getMD5(){ return "f25b55cbf1d1f76e82e5ec9e83f76258"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ListControllerTypes.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ListControllerTypes.h new file mode 100644 index 0000000000000000000000000000000000000000..45097f8fb0edb45459f200dde5f30a8953574cbc --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ListControllerTypes.h @@ -0,0 +1,144 @@ +#ifndef _ROS_SERVICE_ListControllerTypes_h +#define _ROS_SERVICE_ListControllerTypes_h +#include +#include +#include +#include "ros/msg.h" + +namespace controller_manager_msgs +{ + +static const char LISTCONTROLLERTYPES[] = "controller_manager_msgs/ListControllerTypes"; + + class ListControllerTypesRequest : public ros::Msg + { + public: + + ListControllerTypesRequest() + { + } + + 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 LISTCONTROLLERTYPES; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class ListControllerTypesResponse : public ros::Msg + { + public: + uint32_t types_length; + typedef char* _types_type; + _types_type st_types; + _types_type * types; + uint32_t base_classes_length; + typedef char* _base_classes_type; + _base_classes_type st_base_classes; + _base_classes_type * base_classes; + + ListControllerTypesResponse(): + types_length(0), types(NULL), + base_classes_length(0), base_classes(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->types_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->types_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->types_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->types_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->types_length); + for( uint32_t i = 0; i < types_length; i++){ + uint32_t length_typesi = strlen(this->types[i]); + varToArr(outbuffer + offset, length_typesi); + offset += 4; + memcpy(outbuffer + offset, this->types[i], length_typesi); + offset += length_typesi; + } + *(outbuffer + offset + 0) = (this->base_classes_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->base_classes_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->base_classes_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->base_classes_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->base_classes_length); + for( uint32_t i = 0; i < base_classes_length; i++){ + uint32_t length_base_classesi = strlen(this->base_classes[i]); + varToArr(outbuffer + offset, length_base_classesi); + offset += 4; + memcpy(outbuffer + offset, this->base_classes[i], length_base_classesi); + offset += length_base_classesi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t types_lengthT = ((uint32_t) (*(inbuffer + offset))); + types_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + types_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + types_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->types_length); + if(types_lengthT > types_length) + this->types = (char**)realloc(this->types, types_lengthT * sizeof(char*)); + types_length = types_lengthT; + for( uint32_t i = 0; i < types_length; i++){ + uint32_t length_st_types; + arrToVar(length_st_types, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_types; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_types-1]=0; + this->st_types = (char *)(inbuffer + offset-1); + offset += length_st_types; + memcpy( &(this->types[i]), &(this->st_types), sizeof(char*)); + } + uint32_t base_classes_lengthT = ((uint32_t) (*(inbuffer + offset))); + base_classes_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + base_classes_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + base_classes_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->base_classes_length); + if(base_classes_lengthT > base_classes_length) + this->base_classes = (char**)realloc(this->base_classes, base_classes_lengthT * sizeof(char*)); + base_classes_length = base_classes_lengthT; + for( uint32_t i = 0; i < base_classes_length; i++){ + uint32_t length_st_base_classes; + arrToVar(length_st_base_classes, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_base_classes; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_base_classes-1]=0; + this->st_base_classes = (char *)(inbuffer + offset-1); + offset += length_st_base_classes; + memcpy( &(this->base_classes[i]), &(this->st_base_classes), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return LISTCONTROLLERTYPES; }; + const char * getMD5(){ return "c1d4cd11aefa9f97ba4aeb5b33987f4e"; }; + + }; + + class ListControllerTypes { + public: + typedef ListControllerTypesRequest Request; + typedef ListControllerTypesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ListControllers.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ListControllers.h new file mode 100644 index 0000000000000000000000000000000000000000..f0d2a5efca596c0a91d564dcfb86aa206be4e03b --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ListControllers.h @@ -0,0 +1,96 @@ +#ifndef _ROS_SERVICE_ListControllers_h +#define _ROS_SERVICE_ListControllers_h +#include +#include +#include +#include "ros/msg.h" +#include "controller_manager_msgs/ControllerState.h" + +namespace controller_manager_msgs +{ + +static const char LISTCONTROLLERS[] = "controller_manager_msgs/ListControllers"; + + class ListControllersRequest : public ros::Msg + { + public: + + ListControllersRequest() + { + } + + 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 LISTCONTROLLERS; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class ListControllersResponse : public ros::Msg + { + public: + uint32_t controller_length; + typedef controller_manager_msgs::ControllerState _controller_type; + _controller_type st_controller; + _controller_type * controller; + + ListControllersResponse(): + controller_length(0), controller(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->controller_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->controller_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->controller_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->controller_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->controller_length); + for( uint32_t i = 0; i < controller_length; i++){ + offset += this->controller[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t controller_lengthT = ((uint32_t) (*(inbuffer + offset))); + controller_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + controller_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + controller_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->controller_length); + if(controller_lengthT > controller_length) + this->controller = (controller_manager_msgs::ControllerState*)realloc(this->controller, controller_lengthT * sizeof(controller_manager_msgs::ControllerState)); + controller_length = controller_lengthT; + for( uint32_t i = 0; i < controller_length; i++){ + offset += this->st_controller.deserialize(inbuffer + offset); + memcpy( &(this->controller[i]), &(this->st_controller), sizeof(controller_manager_msgs::ControllerState)); + } + return offset; + } + + const char * getType(){ return LISTCONTROLLERS; }; + const char * getMD5(){ return "1341feb2e63fa791f855565d0da950d8"; }; + + }; + + class ListControllers { + public: + typedef ListControllersRequest Request; + typedef ListControllersResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/LoadController.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/LoadController.h new file mode 100644 index 0000000000000000000000000000000000000000..98d018fb3e6515ba2fb3aa53a08343169defe531 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/LoadController.h @@ -0,0 +1,105 @@ +#ifndef _ROS_SERVICE_LoadController_h +#define _ROS_SERVICE_LoadController_h +#include +#include +#include +#include "ros/msg.h" + +namespace controller_manager_msgs +{ + +static const char LOADCONTROLLER[] = "controller_manager_msgs/LoadController"; + + class LoadControllerRequest : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + + LoadControllerRequest(): + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return LOADCONTROLLER; }; + const char * getMD5(){ return "c1f3d28f1b044c871e6eff2e9fc3c667"; }; + + }; + + class LoadControllerResponse : public ros::Msg + { + public: + typedef bool _ok_type; + _ok_type ok; + + LoadControllerResponse(): + ok(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.real = this->ok; + *(outbuffer + offset + 0) = (u_ok.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->ok); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.base = 0; + u_ok.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->ok = u_ok.real; + offset += sizeof(this->ok); + return offset; + } + + const char * getType(){ return LOADCONTROLLER; }; + const char * getMD5(){ return "6f6da3883749771fac40d6deb24a8c02"; }; + + }; + + class LoadController { + public: + typedef LoadControllerRequest Request; + typedef LoadControllerResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ReloadControllerLibraries.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ReloadControllerLibraries.h new file mode 100644 index 0000000000000000000000000000000000000000..279de974c7966f891505acef7ce9e21204df538d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/ReloadControllerLibraries.h @@ -0,0 +1,106 @@ +#ifndef _ROS_SERVICE_ReloadControllerLibraries_h +#define _ROS_SERVICE_ReloadControllerLibraries_h +#include +#include +#include +#include "ros/msg.h" + +namespace controller_manager_msgs +{ + +static const char RELOADCONTROLLERLIBRARIES[] = "controller_manager_msgs/ReloadControllerLibraries"; + + class ReloadControllerLibrariesRequest : public ros::Msg + { + public: + typedef bool _force_kill_type; + _force_kill_type force_kill; + + ReloadControllerLibrariesRequest(): + force_kill(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_force_kill; + u_force_kill.real = this->force_kill; + *(outbuffer + offset + 0) = (u_force_kill.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->force_kill); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_force_kill; + u_force_kill.base = 0; + u_force_kill.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->force_kill = u_force_kill.real; + offset += sizeof(this->force_kill); + return offset; + } + + const char * getType(){ return RELOADCONTROLLERLIBRARIES; }; + const char * getMD5(){ return "18442b59be9479097f11c543bddbac62"; }; + + }; + + class ReloadControllerLibrariesResponse : public ros::Msg + { + public: + typedef bool _ok_type; + _ok_type ok; + + ReloadControllerLibrariesResponse(): + ok(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.real = this->ok; + *(outbuffer + offset + 0) = (u_ok.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->ok); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.base = 0; + u_ok.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->ok = u_ok.real; + offset += sizeof(this->ok); + return offset; + } + + const char * getType(){ return RELOADCONTROLLERLIBRARIES; }; + const char * getMD5(){ return "6f6da3883749771fac40d6deb24a8c02"; }; + + }; + + class ReloadControllerLibraries { + public: + typedef ReloadControllerLibrariesRequest Request; + typedef ReloadControllerLibrariesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/SwitchController.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/SwitchController.h new file mode 100644 index 0000000000000000000000000000000000000000..9b76c735448f113a0f8d3b2a636a7f3008015d31 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/SwitchController.h @@ -0,0 +1,188 @@ +#ifndef _ROS_SERVICE_SwitchController_h +#define _ROS_SERVICE_SwitchController_h +#include +#include +#include +#include "ros/msg.h" + +namespace controller_manager_msgs +{ + +static const char SWITCHCONTROLLER[] = "controller_manager_msgs/SwitchController"; + + class SwitchControllerRequest : public ros::Msg + { + public: + uint32_t start_controllers_length; + typedef char* _start_controllers_type; + _start_controllers_type st_start_controllers; + _start_controllers_type * start_controllers; + uint32_t stop_controllers_length; + typedef char* _stop_controllers_type; + _stop_controllers_type st_stop_controllers; + _stop_controllers_type * stop_controllers; + typedef int32_t _strictness_type; + _strictness_type strictness; + enum { BEST_EFFORT = 1 }; + enum { STRICT = 2 }; + + SwitchControllerRequest(): + start_controllers_length(0), start_controllers(NULL), + stop_controllers_length(0), stop_controllers(NULL), + strictness(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->start_controllers_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->start_controllers_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->start_controllers_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->start_controllers_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->start_controllers_length); + for( uint32_t i = 0; i < start_controllers_length; i++){ + uint32_t length_start_controllersi = strlen(this->start_controllers[i]); + varToArr(outbuffer + offset, length_start_controllersi); + offset += 4; + memcpy(outbuffer + offset, this->start_controllers[i], length_start_controllersi); + offset += length_start_controllersi; + } + *(outbuffer + offset + 0) = (this->stop_controllers_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stop_controllers_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stop_controllers_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stop_controllers_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->stop_controllers_length); + for( uint32_t i = 0; i < stop_controllers_length; i++){ + uint32_t length_stop_controllersi = strlen(this->stop_controllers[i]); + varToArr(outbuffer + offset, length_stop_controllersi); + offset += 4; + memcpy(outbuffer + offset, this->stop_controllers[i], length_stop_controllersi); + offset += length_stop_controllersi; + } + union { + int32_t real; + uint32_t base; + } u_strictness; + u_strictness.real = this->strictness; + *(outbuffer + offset + 0) = (u_strictness.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_strictness.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_strictness.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_strictness.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->strictness); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t start_controllers_lengthT = ((uint32_t) (*(inbuffer + offset))); + start_controllers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + start_controllers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + start_controllers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->start_controllers_length); + if(start_controllers_lengthT > start_controllers_length) + this->start_controllers = (char**)realloc(this->start_controllers, start_controllers_lengthT * sizeof(char*)); + start_controllers_length = start_controllers_lengthT; + for( uint32_t i = 0; i < start_controllers_length; i++){ + uint32_t length_st_start_controllers; + arrToVar(length_st_start_controllers, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_start_controllers; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_start_controllers-1]=0; + this->st_start_controllers = (char *)(inbuffer + offset-1); + offset += length_st_start_controllers; + memcpy( &(this->start_controllers[i]), &(this->st_start_controllers), sizeof(char*)); + } + uint32_t stop_controllers_lengthT = ((uint32_t) (*(inbuffer + offset))); + stop_controllers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + stop_controllers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + stop_controllers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stop_controllers_length); + if(stop_controllers_lengthT > stop_controllers_length) + this->stop_controllers = (char**)realloc(this->stop_controllers, stop_controllers_lengthT * sizeof(char*)); + stop_controllers_length = stop_controllers_lengthT; + for( uint32_t i = 0; i < stop_controllers_length; i++){ + uint32_t length_st_stop_controllers; + arrToVar(length_st_stop_controllers, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_stop_controllers; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_stop_controllers-1]=0; + this->st_stop_controllers = (char *)(inbuffer + offset-1); + offset += length_st_stop_controllers; + memcpy( &(this->stop_controllers[i]), &(this->st_stop_controllers), sizeof(char*)); + } + union { + int32_t real; + uint32_t base; + } u_strictness; + u_strictness.base = 0; + u_strictness.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_strictness.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_strictness.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_strictness.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->strictness = u_strictness.real; + offset += sizeof(this->strictness); + return offset; + } + + const char * getType(){ return SWITCHCONTROLLER; }; + const char * getMD5(){ return "434da54adc434a5af5743ed711fd6ba1"; }; + + }; + + class SwitchControllerResponse : public ros::Msg + { + public: + typedef bool _ok_type; + _ok_type ok; + + SwitchControllerResponse(): + ok(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.real = this->ok; + *(outbuffer + offset + 0) = (u_ok.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->ok); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.base = 0; + u_ok.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->ok = u_ok.real; + offset += sizeof(this->ok); + return offset; + } + + const char * getType(){ return SWITCHCONTROLLER; }; + const char * getMD5(){ return "6f6da3883749771fac40d6deb24a8c02"; }; + + }; + + class SwitchController { + public: + typedef SwitchControllerRequest Request; + typedef SwitchControllerResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/UnloadController.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/UnloadController.h new file mode 100644 index 0000000000000000000000000000000000000000..b8bba744f9b1ddcd19d2a600ee7cb7b4030a74b5 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/controller_manager_msgs/UnloadController.h @@ -0,0 +1,105 @@ +#ifndef _ROS_SERVICE_UnloadController_h +#define _ROS_SERVICE_UnloadController_h +#include +#include +#include +#include "ros/msg.h" + +namespace controller_manager_msgs +{ + +static const char UNLOADCONTROLLER[] = "controller_manager_msgs/UnloadController"; + + class UnloadControllerRequest : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + + UnloadControllerRequest(): + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return UNLOADCONTROLLER; }; + const char * getMD5(){ return "c1f3d28f1b044c871e6eff2e9fc3c667"; }; + + }; + + class UnloadControllerResponse : public ros::Msg + { + public: + typedef bool _ok_type; + _ok_type ok; + + UnloadControllerResponse(): + ok(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.real = this->ok; + *(outbuffer + offset + 0) = (u_ok.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->ok); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.base = 0; + u_ok.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->ok = u_ok.real; + offset += sizeof(this->ok); + return offset; + } + + const char * getType(){ return UNLOADCONTROLLER; }; + const char * getMD5(){ return "6f6da3883749771fac40d6deb24a8c02"; }; + + }; + + class UnloadController { + public: + typedef UnloadControllerRequest Request; + typedef UnloadControllerResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/costmap_2d/VoxelGrid.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/costmap_2d/VoxelGrid.h new file mode 100644 index 0000000000000000000000000000000000000000..2fa9dce9373f65674a226786c4e49073b15898fa --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/costmap_2d/VoxelGrid.h @@ -0,0 +1,128 @@ +#ifndef _ROS_costmap_2d_VoxelGrid_h +#define _ROS_costmap_2d_VoxelGrid_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Point32.h" +#include "geometry_msgs/Vector3.h" + +namespace costmap_2d +{ + + class VoxelGrid : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t data_length; + typedef uint32_t _data_type; + _data_type st_data; + _data_type * data; + typedef geometry_msgs::Point32 _origin_type; + _origin_type origin; + typedef geometry_msgs::Vector3 _resolutions_type; + _resolutions_type resolutions; + typedef uint32_t _size_x_type; + _size_x_type size_x; + typedef uint32_t _size_y_type; + _size_y_type size_y; + typedef uint32_t _size_z_type; + _size_z_type size_z; + + VoxelGrid(): + header(), + data_length(0), data(NULL), + origin(), + resolutions(), + size_x(0), + size_y(0), + size_z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data[i] >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data[i] >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data[i] >> (8 * 3)) & 0xFF; + offset += sizeof(this->data[i]); + } + offset += this->origin.serialize(outbuffer + offset); + offset += this->resolutions.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->size_x >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->size_x >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->size_x >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->size_x >> (8 * 3)) & 0xFF; + offset += sizeof(this->size_x); + *(outbuffer + offset + 0) = (this->size_y >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->size_y >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->size_y >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->size_y >> (8 * 3)) & 0xFF; + offset += sizeof(this->size_y); + *(outbuffer + offset + 0) = (this->size_z >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->size_z >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->size_z >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->size_z >> (8 * 3)) & 0xFF; + offset += sizeof(this->size_z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint32_t*)realloc(this->data, data_lengthT * sizeof(uint32_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint32_t) (*(inbuffer + offset))); + this->st_data |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->st_data |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->st_data |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint32_t)); + } + offset += this->origin.deserialize(inbuffer + offset); + offset += this->resolutions.deserialize(inbuffer + offset); + this->size_x = ((uint32_t) (*(inbuffer + offset))); + this->size_x |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->size_x |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->size_x |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->size_x); + this->size_y = ((uint32_t) (*(inbuffer + offset))); + this->size_y |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->size_y |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->size_y |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->size_y); + this->size_z = ((uint32_t) (*(inbuffer + offset))); + this->size_z |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->size_z |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->size_z |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->size_z); + return offset; + } + + const char * getType(){ return "costmap_2d/VoxelGrid"; }; + const char * getMD5(){ return "48a040827e1322073d78ece5a497029c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/diagnostic_msgs/AddDiagnostics.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/diagnostic_msgs/AddDiagnostics.h new file mode 100644 index 0000000000000000000000000000000000000000..4180098fdab258ea2b6702ab40c39ee263fe8372 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/diagnostic_msgs/AddDiagnostics.h @@ -0,0 +1,122 @@ +#ifndef _ROS_SERVICE_AddDiagnostics_h +#define _ROS_SERVICE_AddDiagnostics_h +#include +#include +#include +#include "ros/msg.h" + +namespace diagnostic_msgs +{ + +static const char ADDDIAGNOSTICS[] = "diagnostic_msgs/AddDiagnostics"; + + class AddDiagnosticsRequest : public ros::Msg + { + public: + typedef const char* _load_namespace_type; + _load_namespace_type load_namespace; + + AddDiagnosticsRequest(): + load_namespace("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_load_namespace = strlen(this->load_namespace); + varToArr(outbuffer + offset, length_load_namespace); + offset += 4; + memcpy(outbuffer + offset, this->load_namespace, length_load_namespace); + offset += length_load_namespace; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_load_namespace; + arrToVar(length_load_namespace, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_load_namespace; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_load_namespace-1]=0; + this->load_namespace = (char *)(inbuffer + offset-1); + offset += length_load_namespace; + return offset; + } + + const char * getType(){ return ADDDIAGNOSTICS; }; + const char * getMD5(){ return "c26cf6e164288fbc6050d74f838bcdf0"; }; + + }; + + class AddDiagnosticsResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _message_type; + _message_type message; + + AddDiagnosticsResponse(): + success(0), + message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_message = strlen(this->message); + varToArr(outbuffer + offset, length_message); + offset += 4; + memcpy(outbuffer + offset, this->message, length_message); + offset += length_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_message; + arrToVar(length_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message-1]=0; + this->message = (char *)(inbuffer + offset-1); + offset += length_message; + return offset; + } + + const char * getType(){ return ADDDIAGNOSTICS; }; + const char * getMD5(){ return "937c9679a518e3a18d831e57125ea522"; }; + + }; + + class AddDiagnostics { + public: + typedef AddDiagnosticsRequest Request; + typedef AddDiagnosticsResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/diagnostic_msgs/DiagnosticArray.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/diagnostic_msgs/DiagnosticArray.h new file mode 100644 index 0000000000000000000000000000000000000000..1deb7430badb176efcd39ebbd3265bc02d7fead8 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/diagnostic_msgs/DiagnosticArray.h @@ -0,0 +1,70 @@ +#ifndef _ROS_diagnostic_msgs_DiagnosticArray_h +#define _ROS_diagnostic_msgs_DiagnosticArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "diagnostic_msgs/DiagnosticStatus.h" + +namespace diagnostic_msgs +{ + + class DiagnosticArray : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t status_length; + typedef diagnostic_msgs::DiagnosticStatus _status_type; + _status_type st_status; + _status_type * status; + + DiagnosticArray(): + header(), + status_length(0), status(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->status_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->status_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->status_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->status_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->status_length); + for( uint32_t i = 0; i < status_length; i++){ + offset += this->status[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t status_lengthT = ((uint32_t) (*(inbuffer + offset))); + status_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + status_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + status_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->status_length); + if(status_lengthT > status_length) + this->status = (diagnostic_msgs::DiagnosticStatus*)realloc(this->status, status_lengthT * sizeof(diagnostic_msgs::DiagnosticStatus)); + status_length = status_lengthT; + for( uint32_t i = 0; i < status_length; i++){ + offset += this->st_status.deserialize(inbuffer + offset); + memcpy( &(this->status[i]), &(this->st_status), sizeof(diagnostic_msgs::DiagnosticStatus)); + } + return offset; + } + + const char * getType(){ return "diagnostic_msgs/DiagnosticArray"; }; + const char * getMD5(){ return "60810da900de1dd6ddd437c3503511da"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/diagnostic_msgs/DiagnosticStatus.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/diagnostic_msgs/DiagnosticStatus.h new file mode 100644 index 0000000000000000000000000000000000000000..490c16337ff4d1ca2cc5d0bc7fd497bc0010e0a7 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/diagnostic_msgs/DiagnosticStatus.h @@ -0,0 +1,137 @@ +#ifndef _ROS_diagnostic_msgs_DiagnosticStatus_h +#define _ROS_diagnostic_msgs_DiagnosticStatus_h + +#include +#include +#include +#include "ros/msg.h" +#include "diagnostic_msgs/KeyValue.h" + +namespace diagnostic_msgs +{ + + class DiagnosticStatus : public ros::Msg + { + public: + typedef int8_t _level_type; + _level_type level; + typedef const char* _name_type; + _name_type name; + typedef const char* _message_type; + _message_type message; + typedef const char* _hardware_id_type; + _hardware_id_type hardware_id; + uint32_t values_length; + typedef diagnostic_msgs::KeyValue _values_type; + _values_type st_values; + _values_type * values; + enum { OK = 0 }; + enum { WARN = 1 }; + enum { ERROR = 2 }; + enum { STALE = 3 }; + + DiagnosticStatus(): + level(0), + name(""), + message(""), + hardware_id(""), + values_length(0), values(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_level; + u_level.real = this->level; + *(outbuffer + offset + 0) = (u_level.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->level); + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_message = strlen(this->message); + varToArr(outbuffer + offset, length_message); + offset += 4; + memcpy(outbuffer + offset, this->message, length_message); + offset += length_message; + uint32_t length_hardware_id = strlen(this->hardware_id); + varToArr(outbuffer + offset, length_hardware_id); + offset += 4; + memcpy(outbuffer + offset, this->hardware_id, length_hardware_id); + offset += length_hardware_id; + *(outbuffer + offset + 0) = (this->values_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->values_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->values_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->values_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->values_length); + for( uint32_t i = 0; i < values_length; i++){ + offset += this->values[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_level; + u_level.base = 0; + u_level.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->level = u_level.real; + offset += sizeof(this->level); + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_message; + arrToVar(length_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message-1]=0; + this->message = (char *)(inbuffer + offset-1); + offset += length_message; + uint32_t length_hardware_id; + arrToVar(length_hardware_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_hardware_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_hardware_id-1]=0; + this->hardware_id = (char *)(inbuffer + offset-1); + offset += length_hardware_id; + uint32_t values_lengthT = ((uint32_t) (*(inbuffer + offset))); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->values_length); + if(values_lengthT > values_length) + this->values = (diagnostic_msgs::KeyValue*)realloc(this->values, values_lengthT * sizeof(diagnostic_msgs::KeyValue)); + values_length = values_lengthT; + for( uint32_t i = 0; i < values_length; i++){ + offset += this->st_values.deserialize(inbuffer + offset); + memcpy( &(this->values[i]), &(this->st_values), sizeof(diagnostic_msgs::KeyValue)); + } + return offset; + } + + const char * getType(){ return "diagnostic_msgs/DiagnosticStatus"; }; + const char * getMD5(){ return "d0ce08bc6e5ba34c7754f563a9cabaf1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/diagnostic_msgs/KeyValue.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/diagnostic_msgs/KeyValue.h new file mode 100644 index 0000000000000000000000000000000000000000..e94dd76ca667140b5d33d0c1ceffa3b2b774ca1f --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/diagnostic_msgs/KeyValue.h @@ -0,0 +1,72 @@ +#ifndef _ROS_diagnostic_msgs_KeyValue_h +#define _ROS_diagnostic_msgs_KeyValue_h + +#include +#include +#include +#include "ros/msg.h" + +namespace diagnostic_msgs +{ + + class KeyValue : public ros::Msg + { + public: + typedef const char* _key_type; + _key_type key; + typedef const char* _value_type; + _value_type value; + + KeyValue(): + key(""), + value("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_key = strlen(this->key); + varToArr(outbuffer + offset, length_key); + offset += 4; + memcpy(outbuffer + offset, this->key, length_key); + offset += length_key; + uint32_t length_value = strlen(this->value); + varToArr(outbuffer + offset, length_value); + offset += 4; + memcpy(outbuffer + offset, this->value, length_value); + offset += length_value; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_key; + arrToVar(length_key, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_key; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_key-1]=0; + this->key = (char *)(inbuffer + offset-1); + offset += length_key; + uint32_t length_value; + arrToVar(length_value, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_value; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_value-1]=0; + this->value = (char *)(inbuffer + offset-1); + offset += length_value; + return offset; + } + + const char * getType(){ return "diagnostic_msgs/KeyValue"; }; + const char * getMD5(){ return "cf57fdc6617a881a88c16e768132149c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/diagnostic_msgs/SelfTest.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/diagnostic_msgs/SelfTest.h new file mode 100644 index 0000000000000000000000000000000000000000..6687c6bea86789648733b0f1a1ff572b9b2b09db --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/diagnostic_msgs/SelfTest.h @@ -0,0 +1,131 @@ +#ifndef _ROS_SERVICE_SelfTest_h +#define _ROS_SERVICE_SelfTest_h +#include +#include +#include +#include "ros/msg.h" +#include "diagnostic_msgs/DiagnosticStatus.h" + +namespace diagnostic_msgs +{ + +static const char SELFTEST[] = "diagnostic_msgs/SelfTest"; + + class SelfTestRequest : public ros::Msg + { + public: + + SelfTestRequest() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return SELFTEST; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class SelfTestResponse : public ros::Msg + { + public: + typedef const char* _id_type; + _id_type id; + typedef int8_t _passed_type; + _passed_type passed; + uint32_t status_length; + typedef diagnostic_msgs::DiagnosticStatus _status_type; + _status_type st_status; + _status_type * status; + + SelfTestResponse(): + id(""), + passed(0), + status_length(0), status(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_id = strlen(this->id); + varToArr(outbuffer + offset, length_id); + offset += 4; + memcpy(outbuffer + offset, this->id, length_id); + offset += length_id; + union { + int8_t real; + uint8_t base; + } u_passed; + u_passed.real = this->passed; + *(outbuffer + offset + 0) = (u_passed.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->passed); + *(outbuffer + offset + 0) = (this->status_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->status_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->status_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->status_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->status_length); + for( uint32_t i = 0; i < status_length; i++){ + offset += this->status[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_id; + arrToVar(length_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_id-1]=0; + this->id = (char *)(inbuffer + offset-1); + offset += length_id; + union { + int8_t real; + uint8_t base; + } u_passed; + u_passed.base = 0; + u_passed.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->passed = u_passed.real; + offset += sizeof(this->passed); + uint32_t status_lengthT = ((uint32_t) (*(inbuffer + offset))); + status_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + status_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + status_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->status_length); + if(status_lengthT > status_length) + this->status = (diagnostic_msgs::DiagnosticStatus*)realloc(this->status, status_lengthT * sizeof(diagnostic_msgs::DiagnosticStatus)); + status_length = status_lengthT; + for( uint32_t i = 0; i < status_length; i++){ + offset += this->st_status.deserialize(inbuffer + offset); + memcpy( &(this->status[i]), &(this->st_status), sizeof(diagnostic_msgs::DiagnosticStatus)); + } + return offset; + } + + const char * getType(){ return SELFTEST; }; + const char * getMD5(){ return "ac21b1bab7ab17546986536c22eb34e9"; }; + + }; + + class SelfTest { + public: + typedef SelfTestRequest Request; + typedef SelfTestResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/duration.cpp b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/duration.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d2dfdd6f3f669a1c7712740c940bb64e7de2c4c4 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/duration.cpp @@ -0,0 +1,83 @@ +/* + * 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. + */ + +#include +#include "ros/duration.h" + +namespace ros +{ +void normalizeSecNSecSigned(int32_t &sec, int32_t &nsec) +{ + int32_t nsec_part = nsec; + int32_t sec_part = sec; + + while (nsec_part > 1000000000L) + { + nsec_part -= 1000000000L; + ++sec_part; + } + while (nsec_part < 0) + { + nsec_part += 1000000000L; + --sec_part; + } + sec = sec_part; + nsec = nsec_part; +} + +Duration& Duration::operator+=(const Duration &rhs) +{ + sec += rhs.sec; + nsec += rhs.nsec; + normalizeSecNSecSigned(sec, nsec); + return *this; +} + +Duration& Duration::operator-=(const Duration &rhs) +{ + sec += -rhs.sec; + nsec += -rhs.nsec; + normalizeSecNSecSigned(sec, nsec); + return *this; +} + +Duration& Duration::operator*=(double scale) +{ + sec *= scale; + nsec *= scale; + normalizeSecNSecSigned(sec, nsec); + return *this; +} + +} diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/BoolParameter.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/BoolParameter.h new file mode 100644 index 0000000000000000000000000000000000000000..902548616470ad81ad65b7bc2a79a1fa57342413 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/BoolParameter.h @@ -0,0 +1,73 @@ +#ifndef _ROS_dynamic_reconfigure_BoolParameter_h +#define _ROS_dynamic_reconfigure_BoolParameter_h + +#include +#include +#include +#include "ros/msg.h" + +namespace dynamic_reconfigure +{ + + class BoolParameter : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef bool _value_type; + _value_type value; + + BoolParameter(): + name(""), + value(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + union { + bool real; + uint8_t base; + } u_value; + u_value.real = this->value; + *(outbuffer + offset + 0) = (u_value.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->value); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + union { + bool real; + uint8_t base; + } u_value; + u_value.base = 0; + u_value.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->value = u_value.real; + offset += sizeof(this->value); + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/BoolParameter"; }; + const char * getMD5(){ return "23f05028c1a699fb83e22401228c3a9e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/Config.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/Config.h new file mode 100644 index 0000000000000000000000000000000000000000..e5aca14f64f064b82c96ced2e08df716ddaf575c --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/Config.h @@ -0,0 +1,168 @@ +#ifndef _ROS_dynamic_reconfigure_Config_h +#define _ROS_dynamic_reconfigure_Config_h + +#include +#include +#include +#include "ros/msg.h" +#include "dynamic_reconfigure/BoolParameter.h" +#include "dynamic_reconfigure/IntParameter.h" +#include "dynamic_reconfigure/StrParameter.h" +#include "dynamic_reconfigure/DoubleParameter.h" +#include "dynamic_reconfigure/GroupState.h" + +namespace dynamic_reconfigure +{ + + class Config : public ros::Msg + { + public: + uint32_t bools_length; + typedef dynamic_reconfigure::BoolParameter _bools_type; + _bools_type st_bools; + _bools_type * bools; + uint32_t ints_length; + typedef dynamic_reconfigure::IntParameter _ints_type; + _ints_type st_ints; + _ints_type * ints; + uint32_t strs_length; + typedef dynamic_reconfigure::StrParameter _strs_type; + _strs_type st_strs; + _strs_type * strs; + uint32_t doubles_length; + typedef dynamic_reconfigure::DoubleParameter _doubles_type; + _doubles_type st_doubles; + _doubles_type * doubles; + uint32_t groups_length; + typedef dynamic_reconfigure::GroupState _groups_type; + _groups_type st_groups; + _groups_type * groups; + + Config(): + bools_length(0), bools(NULL), + ints_length(0), ints(NULL), + strs_length(0), strs(NULL), + doubles_length(0), doubles(NULL), + groups_length(0), groups(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->bools_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->bools_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->bools_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->bools_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->bools_length); + for( uint32_t i = 0; i < bools_length; i++){ + offset += this->bools[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->ints_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->ints_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->ints_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->ints_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->ints_length); + for( uint32_t i = 0; i < ints_length; i++){ + offset += this->ints[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->strs_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->strs_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->strs_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->strs_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->strs_length); + for( uint32_t i = 0; i < strs_length; i++){ + offset += this->strs[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->doubles_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->doubles_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->doubles_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->doubles_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->doubles_length); + for( uint32_t i = 0; i < doubles_length; i++){ + offset += this->doubles[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->groups_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->groups_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->groups_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->groups_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->groups_length); + for( uint32_t i = 0; i < groups_length; i++){ + offset += this->groups[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t bools_lengthT = ((uint32_t) (*(inbuffer + offset))); + bools_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + bools_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + bools_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->bools_length); + if(bools_lengthT > bools_length) + this->bools = (dynamic_reconfigure::BoolParameter*)realloc(this->bools, bools_lengthT * sizeof(dynamic_reconfigure::BoolParameter)); + bools_length = bools_lengthT; + for( uint32_t i = 0; i < bools_length; i++){ + offset += this->st_bools.deserialize(inbuffer + offset); + memcpy( &(this->bools[i]), &(this->st_bools), sizeof(dynamic_reconfigure::BoolParameter)); + } + uint32_t ints_lengthT = ((uint32_t) (*(inbuffer + offset))); + ints_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + ints_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + ints_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->ints_length); + if(ints_lengthT > ints_length) + this->ints = (dynamic_reconfigure::IntParameter*)realloc(this->ints, ints_lengthT * sizeof(dynamic_reconfigure::IntParameter)); + ints_length = ints_lengthT; + for( uint32_t i = 0; i < ints_length; i++){ + offset += this->st_ints.deserialize(inbuffer + offset); + memcpy( &(this->ints[i]), &(this->st_ints), sizeof(dynamic_reconfigure::IntParameter)); + } + uint32_t strs_lengthT = ((uint32_t) (*(inbuffer + offset))); + strs_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + strs_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + strs_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->strs_length); + if(strs_lengthT > strs_length) + this->strs = (dynamic_reconfigure::StrParameter*)realloc(this->strs, strs_lengthT * sizeof(dynamic_reconfigure::StrParameter)); + strs_length = strs_lengthT; + for( uint32_t i = 0; i < strs_length; i++){ + offset += this->st_strs.deserialize(inbuffer + offset); + memcpy( &(this->strs[i]), &(this->st_strs), sizeof(dynamic_reconfigure::StrParameter)); + } + uint32_t doubles_lengthT = ((uint32_t) (*(inbuffer + offset))); + doubles_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + doubles_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + doubles_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->doubles_length); + if(doubles_lengthT > doubles_length) + this->doubles = (dynamic_reconfigure::DoubleParameter*)realloc(this->doubles, doubles_lengthT * sizeof(dynamic_reconfigure::DoubleParameter)); + doubles_length = doubles_lengthT; + for( uint32_t i = 0; i < doubles_length; i++){ + offset += this->st_doubles.deserialize(inbuffer + offset); + memcpy( &(this->doubles[i]), &(this->st_doubles), sizeof(dynamic_reconfigure::DoubleParameter)); + } + uint32_t groups_lengthT = ((uint32_t) (*(inbuffer + offset))); + groups_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + groups_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + groups_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->groups_length); + if(groups_lengthT > groups_length) + this->groups = (dynamic_reconfigure::GroupState*)realloc(this->groups, groups_lengthT * sizeof(dynamic_reconfigure::GroupState)); + groups_length = groups_lengthT; + for( uint32_t i = 0; i < groups_length; i++){ + offset += this->st_groups.deserialize(inbuffer + offset); + memcpy( &(this->groups[i]), &(this->st_groups), sizeof(dynamic_reconfigure::GroupState)); + } + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/Config"; }; + const char * getMD5(){ return "958f16a05573709014982821e6822580"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/ConfigDescription.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/ConfigDescription.h new file mode 100644 index 0000000000000000000000000000000000000000..4563bb7e6d4f692f5f21e30bc1905674d3e6f538 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/ConfigDescription.h @@ -0,0 +1,80 @@ +#ifndef _ROS_dynamic_reconfigure_ConfigDescription_h +#define _ROS_dynamic_reconfigure_ConfigDescription_h + +#include +#include +#include +#include "ros/msg.h" +#include "dynamic_reconfigure/Group.h" +#include "dynamic_reconfigure/Config.h" + +namespace dynamic_reconfigure +{ + + class ConfigDescription : public ros::Msg + { + public: + uint32_t groups_length; + typedef dynamic_reconfigure::Group _groups_type; + _groups_type st_groups; + _groups_type * groups; + typedef dynamic_reconfigure::Config _max_type; + _max_type max; + typedef dynamic_reconfigure::Config _min_type; + _min_type min; + typedef dynamic_reconfigure::Config _dflt_type; + _dflt_type dflt; + + ConfigDescription(): + groups_length(0), groups(NULL), + max(), + min(), + dflt() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->groups_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->groups_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->groups_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->groups_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->groups_length); + for( uint32_t i = 0; i < groups_length; i++){ + offset += this->groups[i].serialize(outbuffer + offset); + } + offset += this->max.serialize(outbuffer + offset); + offset += this->min.serialize(outbuffer + offset); + offset += this->dflt.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t groups_lengthT = ((uint32_t) (*(inbuffer + offset))); + groups_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + groups_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + groups_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->groups_length); + if(groups_lengthT > groups_length) + this->groups = (dynamic_reconfigure::Group*)realloc(this->groups, groups_lengthT * sizeof(dynamic_reconfigure::Group)); + groups_length = groups_lengthT; + for( uint32_t i = 0; i < groups_length; i++){ + offset += this->st_groups.deserialize(inbuffer + offset); + memcpy( &(this->groups[i]), &(this->st_groups), sizeof(dynamic_reconfigure::Group)); + } + offset += this->max.deserialize(inbuffer + offset); + offset += this->min.deserialize(inbuffer + offset); + offset += this->dflt.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/ConfigDescription"; }; + const char * getMD5(){ return "757ce9d44ba8ddd801bb30bc456f946f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/DoubleParameter.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/DoubleParameter.h new file mode 100644 index 0000000000000000000000000000000000000000..6f62e20fc2d12ab6dbcb306cad72dad51840b36f --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/DoubleParameter.h @@ -0,0 +1,87 @@ +#ifndef _ROS_dynamic_reconfigure_DoubleParameter_h +#define _ROS_dynamic_reconfigure_DoubleParameter_h + +#include +#include +#include +#include "ros/msg.h" + +namespace dynamic_reconfigure +{ + + class DoubleParameter : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef double _value_type; + _value_type value; + + DoubleParameter(): + name(""), + value(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + union { + double real; + uint64_t base; + } u_value; + u_value.real = this->value; + *(outbuffer + offset + 0) = (u_value.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_value.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_value.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_value.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_value.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_value.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_value.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_value.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->value); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + union { + double real; + uint64_t base; + } u_value; + u_value.base = 0; + u_value.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_value.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_value.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_value.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_value.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_value.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_value.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_value.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->value = u_value.real; + offset += sizeof(this->value); + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/DoubleParameter"; }; + const char * getMD5(){ return "d8512f27253c0f65f928a67c329cd658"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/Group.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/Group.h new file mode 100644 index 0000000000000000000000000000000000000000..6f116acbe3aebe2dee140a1e5cee49ecd2974da1 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/Group.h @@ -0,0 +1,146 @@ +#ifndef _ROS_dynamic_reconfigure_Group_h +#define _ROS_dynamic_reconfigure_Group_h + +#include +#include +#include +#include "ros/msg.h" +#include "dynamic_reconfigure/ParamDescription.h" + +namespace dynamic_reconfigure +{ + + class Group : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _type_type; + _type_type type; + uint32_t parameters_length; + typedef dynamic_reconfigure::ParamDescription _parameters_type; + _parameters_type st_parameters; + _parameters_type * parameters; + typedef int32_t _parent_type; + _parent_type parent; + typedef int32_t _id_type; + _id_type id; + + Group(): + name(""), + type(""), + parameters_length(0), parameters(NULL), + parent(0), + id(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_type = strlen(this->type); + varToArr(outbuffer + offset, length_type); + offset += 4; + memcpy(outbuffer + offset, this->type, length_type); + offset += length_type; + *(outbuffer + offset + 0) = (this->parameters_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->parameters_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->parameters_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->parameters_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->parameters_length); + for( uint32_t i = 0; i < parameters_length; i++){ + offset += this->parameters[i].serialize(outbuffer + offset); + } + union { + int32_t real; + uint32_t base; + } u_parent; + u_parent.real = this->parent; + *(outbuffer + offset + 0) = (u_parent.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_parent.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_parent.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_parent.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->parent); + union { + int32_t real; + uint32_t base; + } u_id; + u_id.real = this->id; + *(outbuffer + offset + 0) = (u_id.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_id.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_id.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_id.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->id); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_type; + arrToVar(length_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type-1]=0; + this->type = (char *)(inbuffer + offset-1); + offset += length_type; + uint32_t parameters_lengthT = ((uint32_t) (*(inbuffer + offset))); + parameters_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + parameters_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + parameters_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->parameters_length); + if(parameters_lengthT > parameters_length) + this->parameters = (dynamic_reconfigure::ParamDescription*)realloc(this->parameters, parameters_lengthT * sizeof(dynamic_reconfigure::ParamDescription)); + parameters_length = parameters_lengthT; + for( uint32_t i = 0; i < parameters_length; i++){ + offset += this->st_parameters.deserialize(inbuffer + offset); + memcpy( &(this->parameters[i]), &(this->st_parameters), sizeof(dynamic_reconfigure::ParamDescription)); + } + union { + int32_t real; + uint32_t base; + } u_parent; + u_parent.base = 0; + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->parent = u_parent.real; + offset += sizeof(this->parent); + union { + int32_t real; + uint32_t base; + } u_id; + u_id.base = 0; + u_id.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->id = u_id.real; + offset += sizeof(this->id); + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/Group"; }; + const char * getMD5(){ return "9e8cd9e9423c94823db3614dd8b1cf7a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/GroupState.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/GroupState.h new file mode 100644 index 0000000000000000000000000000000000000000..7988eacd5109d754f8e3188be894d6cb31d81bf7 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/GroupState.h @@ -0,0 +1,121 @@ +#ifndef _ROS_dynamic_reconfigure_GroupState_h +#define _ROS_dynamic_reconfigure_GroupState_h + +#include +#include +#include +#include "ros/msg.h" + +namespace dynamic_reconfigure +{ + + class GroupState : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef bool _state_type; + _state_type state; + typedef int32_t _id_type; + _id_type id; + typedef int32_t _parent_type; + _parent_type parent; + + GroupState(): + name(""), + state(0), + id(0), + parent(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + union { + bool real; + uint8_t base; + } u_state; + u_state.real = this->state; + *(outbuffer + offset + 0) = (u_state.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->state); + union { + int32_t real; + uint32_t base; + } u_id; + u_id.real = this->id; + *(outbuffer + offset + 0) = (u_id.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_id.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_id.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_id.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->id); + union { + int32_t real; + uint32_t base; + } u_parent; + u_parent.real = this->parent; + *(outbuffer + offset + 0) = (u_parent.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_parent.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_parent.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_parent.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->parent); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + union { + bool real; + uint8_t base; + } u_state; + u_state.base = 0; + u_state.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->state = u_state.real; + offset += sizeof(this->state); + union { + int32_t real; + uint32_t base; + } u_id; + u_id.base = 0; + u_id.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->id = u_id.real; + offset += sizeof(this->id); + union { + int32_t real; + uint32_t base; + } u_parent; + u_parent.base = 0; + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->parent = u_parent.real; + offset += sizeof(this->parent); + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/GroupState"; }; + const char * getMD5(){ return "a2d87f51dc22930325041a2f8b1571f8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/IntParameter.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/IntParameter.h new file mode 100644 index 0000000000000000000000000000000000000000..aab415807a89489816d4c0b2cb1792a4ff0c4f1a --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/IntParameter.h @@ -0,0 +1,79 @@ +#ifndef _ROS_dynamic_reconfigure_IntParameter_h +#define _ROS_dynamic_reconfigure_IntParameter_h + +#include +#include +#include +#include "ros/msg.h" + +namespace dynamic_reconfigure +{ + + class IntParameter : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef int32_t _value_type; + _value_type value; + + IntParameter(): + name(""), + value(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + union { + int32_t real; + uint32_t base; + } u_value; + u_value.real = this->value; + *(outbuffer + offset + 0) = (u_value.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_value.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_value.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_value.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->value); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + union { + int32_t real; + uint32_t base; + } u_value; + u_value.base = 0; + u_value.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_value.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_value.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_value.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->value = u_value.real; + offset += sizeof(this->value); + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/IntParameter"; }; + const char * getMD5(){ return "65fedc7a0cbfb8db035e46194a350bf1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/ParamDescription.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/ParamDescription.h new file mode 100644 index 0000000000000000000000000000000000000000..00ac5ba79e5bd27e410baa7b60efc86f855997f0 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/ParamDescription.h @@ -0,0 +1,119 @@ +#ifndef _ROS_dynamic_reconfigure_ParamDescription_h +#define _ROS_dynamic_reconfigure_ParamDescription_h + +#include +#include +#include +#include "ros/msg.h" + +namespace dynamic_reconfigure +{ + + class ParamDescription : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _type_type; + _type_type type; + typedef uint32_t _level_type; + _level_type level; + typedef const char* _description_type; + _description_type description; + typedef const char* _edit_method_type; + _edit_method_type edit_method; + + ParamDescription(): + name(""), + type(""), + level(0), + description(""), + edit_method("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_type = strlen(this->type); + varToArr(outbuffer + offset, length_type); + offset += 4; + memcpy(outbuffer + offset, this->type, length_type); + offset += length_type; + *(outbuffer + offset + 0) = (this->level >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->level >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->level >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->level >> (8 * 3)) & 0xFF; + offset += sizeof(this->level); + uint32_t length_description = strlen(this->description); + varToArr(outbuffer + offset, length_description); + offset += 4; + memcpy(outbuffer + offset, this->description, length_description); + offset += length_description; + uint32_t length_edit_method = strlen(this->edit_method); + varToArr(outbuffer + offset, length_edit_method); + offset += 4; + memcpy(outbuffer + offset, this->edit_method, length_edit_method); + offset += length_edit_method; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_type; + arrToVar(length_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type-1]=0; + this->type = (char *)(inbuffer + offset-1); + offset += length_type; + this->level = ((uint32_t) (*(inbuffer + offset))); + this->level |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->level |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->level |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->level); + uint32_t length_description; + arrToVar(length_description, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_description; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_description-1]=0; + this->description = (char *)(inbuffer + offset-1); + offset += length_description; + uint32_t length_edit_method; + arrToVar(length_edit_method, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_edit_method; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_edit_method-1]=0; + this->edit_method = (char *)(inbuffer + offset-1); + offset += length_edit_method; + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/ParamDescription"; }; + const char * getMD5(){ return "7434fcb9348c13054e0c3b267c8cb34d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/Reconfigure.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/Reconfigure.h new file mode 100644 index 0000000000000000000000000000000000000000..e4e6b79b6a9ee136fece2ec1726cc358d0e63a19 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/Reconfigure.h @@ -0,0 +1,81 @@ +#ifndef _ROS_SERVICE_Reconfigure_h +#define _ROS_SERVICE_Reconfigure_h +#include +#include +#include +#include "ros/msg.h" +#include "dynamic_reconfigure/Config.h" + +namespace dynamic_reconfigure +{ + +static const char RECONFIGURE[] = "dynamic_reconfigure/Reconfigure"; + + class ReconfigureRequest : public ros::Msg + { + public: + typedef dynamic_reconfigure::Config _config_type; + _config_type config; + + ReconfigureRequest(): + config() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->config.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->config.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return RECONFIGURE; }; + const char * getMD5(){ return "ac41a77620a4a0348b7001641796a8a1"; }; + + }; + + class ReconfigureResponse : public ros::Msg + { + public: + typedef dynamic_reconfigure::Config _config_type; + _config_type config; + + ReconfigureResponse(): + config() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->config.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->config.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return RECONFIGURE; }; + const char * getMD5(){ return "ac41a77620a4a0348b7001641796a8a1"; }; + + }; + + class Reconfigure { + public: + typedef ReconfigureRequest Request; + typedef ReconfigureResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/SensorLevels.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/SensorLevels.h new file mode 100644 index 0000000000000000000000000000000000000000..8f85722eb104533806d61336418a60120f3fbe0f --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/SensorLevels.h @@ -0,0 +1,41 @@ +#ifndef _ROS_dynamic_reconfigure_SensorLevels_h +#define _ROS_dynamic_reconfigure_SensorLevels_h + +#include +#include +#include +#include "ros/msg.h" + +namespace dynamic_reconfigure +{ + + class SensorLevels : public ros::Msg + { + public: + enum { RECONFIGURE_CLOSE = 3 }; + enum { RECONFIGURE_STOP = 1 }; + enum { RECONFIGURE_RUNNING = 0 }; + + SensorLevels() + { + } + + 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 "dynamic_reconfigure/SensorLevels"; }; + const char * getMD5(){ return "6322637bee96d5489db6e2127c47602c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/StrParameter.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/StrParameter.h new file mode 100644 index 0000000000000000000000000000000000000000..2e743f0346531a0d0948dd3dc0dd2d63d6976b29 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/dynamic_reconfigure/StrParameter.h @@ -0,0 +1,72 @@ +#ifndef _ROS_dynamic_reconfigure_StrParameter_h +#define _ROS_dynamic_reconfigure_StrParameter_h + +#include +#include +#include +#include "ros/msg.h" + +namespace dynamic_reconfigure +{ + + class StrParameter : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _value_type; + _value_type value; + + StrParameter(): + name(""), + value("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_value = strlen(this->value); + varToArr(outbuffer + offset, length_value); + offset += 4; + memcpy(outbuffer + offset, this->value, length_value); + offset += length_value; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_value; + arrToVar(length_value, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_value; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_value-1]=0; + this->value = (char *)(inbuffer + offset-1); + offset += length_value; + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/StrParameter"; }; + const char * getMD5(){ return "bc6ccc4a57f61779c8eaae61e9f422e0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/embedded_linux_comms.c b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/embedded_linux_comms.c new file mode 100644 index 0000000000000000000000000000000000000000..bde6e3776ca83f73433679dc51fc06219f4fde30 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/embedded_linux_comms.c @@ -0,0 +1,208 @@ +/* + * Software License Agreement (BSD License) + * + * Copyright (c) 2012, Paul Bouchier + * 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_EMBEDDED_LINUX_COMMS_H +#define ROS_EMBEDDED_LINUX_COMMS_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DEFAULT_PORTNUM 11411 + +void error(const char *msg) +{ + perror(msg); + exit(0); +} + +void set_nonblock(int socket) +{ + int flags; + flags = fcntl(socket, F_GETFL, 0); + assert(flags != -1); + fcntl(socket, F_SETFL, flags | O_NONBLOCK); +} + +int elCommInit(const char *portName, int baud) +{ + struct termios options; + int fd; + int sockfd; + struct sockaddr_in serv_addr; + struct hostent *server; + int rv; + + if (*portName == '/') // linux serial port names always begin with /dev + { + printf("Opening serial port %s\n", portName); + + fd = open(portName, O_RDWR | O_NOCTTY | O_NDELAY); + + if (fd == -1) + { + // Could not open the port. + perror("init(): Unable to open serial port - "); + } + else + { + // Sets the read() function to return NOW and not wait for data to enter + // buffer if there isn't anything there. + fcntl(fd, F_SETFL, FNDELAY); + + // Configure port for 8N1 transmission, 57600 baud, SW flow control. + tcgetattr(fd, &options); + cfsetispeed(&options, B57600); + cfsetospeed(&options, B57600); + options.c_cflag |= (CLOCAL | CREAD); + options.c_cflag &= ~PARENB; + options.c_cflag &= ~CSTOPB; + options.c_cflag &= ~CSIZE; + options.c_cflag |= CS8; + options.c_cflag &= ~CRTSCTS; + options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); + options.c_iflag &= ~(IXON | IXOFF | IXANY); + options.c_oflag &= ~OPOST; + + // Set the new options for the port "NOW" + tcsetattr(fd, TCSANOW, &options); + } + return fd; + } + else + { + // Split connection string into IP address and port. + const char* tcpPortNumString = strchr(portName, ':'); + long int tcpPortNum; + char ip[16]; + if (!tcpPortNumString) + { + tcpPortNum = DEFAULT_PORTNUM; + strncpy(ip, portName, 16); + } + else + { + tcpPortNum = strtol(tcpPortNumString + 1, NULL, 10); + strncpy(ip, portName, tcpPortNumString - portName); + } + + printf("Connecting to TCP server at %s:%ld....\n", ip, tcpPortNum); + + // Create the socket. + sockfd = socket(AF_INET, SOCK_STREAM, 0); + if (sockfd < 0) + { + error("ERROR opening socket"); + exit(-1); + } + + // Disable the Nagle (TCP No Delay) algorithm. + int flag = 1; + rv = setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(flag)); + if (rv == -1) + { + printf("Couldn't setsockopt(TCP_NODELAY)\n"); + exit(-1); + } + + // Connect to the server + server = gethostbyname(ip); + if (server == NULL) + { + fprintf(stderr, "ERROR, no such host\n"); + exit(0); + } + bzero((char *) &serv_addr, sizeof(serv_addr)); + serv_addr.sin_family = AF_INET; + bcopy((char *)server->h_addr, + (char *)&serv_addr.sin_addr.s_addr, + server->h_length); + serv_addr.sin_port = htons(tcpPortNum); + if (connect(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) + error("ERROR connecting"); + set_nonblock(sockfd); + printf("connected to server\n"); + return sockfd; + } + return -1; +} + +int elCommRead(int fd) +{ + unsigned char c; + unsigned int i; + int rv; + rv = read(fd, &c, 1); // read one byte + i = c; // convert byte to an int for return + if (rv > 0) + return i; // return the character read + if (rv < 0) + { + if ((errno != EAGAIN) && (errno != EWOULDBLOCK)) + perror("elCommRead() error:"); + } + + // return -1 or 0 either if we read nothing, or if read returned negative + return rv; +} + +int elCommWrite(int fd, uint8_t* data, int len) +{ + int rv = 0; + int length = len; + int totalsent = 0; + while (totalsent < length) + { + rv = write(fd, data + totalsent, length); + if (rv < 0) + perror("write(): error writing - trying again - "); + else + totalsent += rv; + } + return rv; +} + +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/embedded_linux_hardware.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/embedded_linux_hardware.h new file mode 100644 index 0000000000000000000000000000000000000000..fff1b462f088c376b3b2586e76831ada593d6267 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/embedded_linux_hardware.h @@ -0,0 +1,172 @@ +/* + * 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_EMBEDDED_LINUX_HARDWARE_H_ +#define ROS_EMBEDDED_LINUX_HARDWARE_H_ + +#include + +#ifdef BUILD_LIBROSSERIALEMBEDDEDLINUX +extern "C" int elCommInit(char *portName, int baud); +extern "C" int elCommRead(int fd); +extern "C" elCommWrite(int fd, uint8_t* data, int length); +#endif + +#ifdef __linux__ +#include +#endif + +// Includes necessary to support time on OS X. +#ifdef __MACH__ +#include +#include +static mach_timebase_info_data_t sTimebaseInfo; +#endif + +#define DEFAULT_PORT "/dev/ttyAM1" + +class EmbeddedLinuxHardware +{ +public: + EmbeddedLinuxHardware(const char *pn, long baud = 57600) + { + strncpy(portName, pn, 30); + baud_ = baud; + } + + EmbeddedLinuxHardware() + { + const char *envPortName = getenv("ROSSERIAL_PORT"); + if (envPortName == NULL) + strcpy(portName, DEFAULT_PORT); + else + strncpy(portName, envPortName, 29); + portName[29] = '\0'; // in case user gave us too long a port name + baud_ = 57600; + } + + void setBaud(long baud) + { + this->baud_ = baud; + } + + int getBaud() + { + return baud_; + } + + void init() + { + fd = elCommInit(portName, baud_); + if (fd < 0) + { + std::cout << "Exiting" << std::endl; + exit(-1); + } + std::cout << "EmbeddedHardware.h: opened serial port successfully\n"; + + initTime(); + } + + void init(const char *pName) + { + fd = elCommInit(pName, baud_); + if (fd < 0) + { + std::cout << "Exiting" << std::endl; + exit(-1); + } + std::cout << "EmbeddedHardware.h: opened comm port successfully\n"; + + initTime(); + } + + int read() + { + int c = elCommRead(fd); + return c; + } + + void write(uint8_t* data, int length) + { + elCommWrite(fd, data, length); + } + +#ifdef __linux__ + void initTime() + { + clock_gettime(CLOCK_MONOTONIC, &start); + } + + unsigned long time() + { + struct timespec end; + long seconds, nseconds; + + clock_gettime(CLOCK_MONOTONIC, &end); + + seconds = end.tv_sec - start.tv_sec; + nseconds = end.tv_nsec - start.tv_nsec; + + return ((seconds) * 1000 + nseconds / 1000000.0) + 0.5; + } + +#elif __MACH__ + void initTime() + { + start = mach_absolute_time(); + mach_timebase_info(&sTimebaseInfo); + } + + unsigned long time() + { + // See: https://developer.apple.com/library/mac/qa/qa1398/_index.html + uint64_t elapsed = mach_absolute_time() - start; + return elapsed * sTimebaseInfo.numer / (sTimebaseInfo.denom * 1000000); + } +#endif + +protected: + int fd; + char portName[30]; + long baud_; + +#ifdef __linux__ + struct timespec start; +#elif __MACH__ + uint64_t start; +#endif +}; + +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ApplyBodyWrench.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ApplyBodyWrench.h new file mode 100644 index 0000000000000000000000000000000000000000..e7af6bbb789592d719eb564ce4ad246a15968df7 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ApplyBodyWrench.h @@ -0,0 +1,199 @@ +#ifndef _ROS_SERVICE_ApplyBodyWrench_h +#define _ROS_SERVICE_ApplyBodyWrench_h +#include +#include +#include +#include "ros/msg.h" +#include "ros/duration.h" +#include "geometry_msgs/Wrench.h" +#include "ros/time.h" +#include "geometry_msgs/Point.h" + +namespace gazebo_msgs +{ + +static const char APPLYBODYWRENCH[] = "gazebo_msgs/ApplyBodyWrench"; + + class ApplyBodyWrenchRequest : public ros::Msg + { + public: + typedef const char* _body_name_type; + _body_name_type body_name; + typedef const char* _reference_frame_type; + _reference_frame_type reference_frame; + typedef geometry_msgs::Point _reference_point_type; + _reference_point_type reference_point; + typedef geometry_msgs::Wrench _wrench_type; + _wrench_type wrench; + typedef ros::Time _start_time_type; + _start_time_type start_time; + typedef ros::Duration _duration_type; + _duration_type duration; + + ApplyBodyWrenchRequest(): + body_name(""), + reference_frame(""), + reference_point(), + wrench(), + start_time(), + duration() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_body_name = strlen(this->body_name); + varToArr(outbuffer + offset, length_body_name); + offset += 4; + memcpy(outbuffer + offset, this->body_name, length_body_name); + offset += length_body_name; + uint32_t length_reference_frame = strlen(this->reference_frame); + varToArr(outbuffer + offset, length_reference_frame); + offset += 4; + memcpy(outbuffer + offset, this->reference_frame, length_reference_frame); + offset += length_reference_frame; + offset += this->reference_point.serialize(outbuffer + offset); + offset += this->wrench.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->start_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->start_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->start_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->start_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->start_time.sec); + *(outbuffer + offset + 0) = (this->start_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->start_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->start_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->start_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->start_time.nsec); + *(outbuffer + offset + 0) = (this->duration.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->duration.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->duration.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->duration.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->duration.sec); + *(outbuffer + offset + 0) = (this->duration.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->duration.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->duration.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->duration.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->duration.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_body_name; + arrToVar(length_body_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_body_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_body_name-1]=0; + this->body_name = (char *)(inbuffer + offset-1); + offset += length_body_name; + uint32_t length_reference_frame; + arrToVar(length_reference_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_reference_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_reference_frame-1]=0; + this->reference_frame = (char *)(inbuffer + offset-1); + offset += length_reference_frame; + offset += this->reference_point.deserialize(inbuffer + offset); + offset += this->wrench.deserialize(inbuffer + offset); + this->start_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->start_time.sec); + this->start_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->start_time.nsec); + this->duration.sec = ((uint32_t) (*(inbuffer + offset))); + this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->duration.sec); + this->duration.nsec = ((uint32_t) (*(inbuffer + offset))); + this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->duration.nsec); + return offset; + } + + const char * getType(){ return APPLYBODYWRENCH; }; + const char * getMD5(){ return "e37e6adf97eba5095baa77dffb71e5bd"; }; + + }; + + class ApplyBodyWrenchResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + ApplyBodyWrenchResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return APPLYBODYWRENCH; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class ApplyBodyWrench { + public: + typedef ApplyBodyWrenchRequest Request; + typedef ApplyBodyWrenchResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ApplyJointEffort.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ApplyJointEffort.h new file mode 100644 index 0000000000000000000000000000000000000000..636084fdbf4f32c068d8087772503b40063758a3 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ApplyJointEffort.h @@ -0,0 +1,202 @@ +#ifndef _ROS_SERVICE_ApplyJointEffort_h +#define _ROS_SERVICE_ApplyJointEffort_h +#include +#include +#include +#include "ros/msg.h" +#include "ros/duration.h" +#include "ros/time.h" + +namespace gazebo_msgs +{ + +static const char APPLYJOINTEFFORT[] = "gazebo_msgs/ApplyJointEffort"; + + class ApplyJointEffortRequest : public ros::Msg + { + public: + typedef const char* _joint_name_type; + _joint_name_type joint_name; + typedef double _effort_type; + _effort_type effort; + typedef ros::Time _start_time_type; + _start_time_type start_time; + typedef ros::Duration _duration_type; + _duration_type duration; + + ApplyJointEffortRequest(): + joint_name(""), + effort(0), + start_time(), + duration() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_joint_name = strlen(this->joint_name); + varToArr(outbuffer + offset, length_joint_name); + offset += 4; + memcpy(outbuffer + offset, this->joint_name, length_joint_name); + offset += length_joint_name; + union { + double real; + uint64_t base; + } u_effort; + u_effort.real = this->effort; + *(outbuffer + offset + 0) = (u_effort.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_effort.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_effort.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_effort.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_effort.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_effort.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_effort.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_effort.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->effort); + *(outbuffer + offset + 0) = (this->start_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->start_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->start_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->start_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->start_time.sec); + *(outbuffer + offset + 0) = (this->start_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->start_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->start_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->start_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->start_time.nsec); + *(outbuffer + offset + 0) = (this->duration.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->duration.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->duration.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->duration.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->duration.sec); + *(outbuffer + offset + 0) = (this->duration.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->duration.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->duration.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->duration.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->duration.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_joint_name; + arrToVar(length_joint_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_joint_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_joint_name-1]=0; + this->joint_name = (char *)(inbuffer + offset-1); + offset += length_joint_name; + union { + double real; + uint64_t base; + } u_effort; + u_effort.base = 0; + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->effort = u_effort.real; + offset += sizeof(this->effort); + this->start_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->start_time.sec); + this->start_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->start_time.nsec); + this->duration.sec = ((uint32_t) (*(inbuffer + offset))); + this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->duration.sec); + this->duration.nsec = ((uint32_t) (*(inbuffer + offset))); + this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->duration.nsec); + return offset; + } + + const char * getType(){ return APPLYJOINTEFFORT; }; + const char * getMD5(){ return "2c3396ab9af67a509ecd2167a8fe41a2"; }; + + }; + + class ApplyJointEffortResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + ApplyJointEffortResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return APPLYJOINTEFFORT; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class ApplyJointEffort { + public: + typedef ApplyJointEffortRequest Request; + typedef ApplyJointEffortResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/BodyRequest.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/BodyRequest.h new file mode 100644 index 0000000000000000000000000000000000000000..bb2106d9c836e8b5e3e59fba9b6aee7f8f4cf023 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/BodyRequest.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_BodyRequest_h +#define _ROS_SERVICE_BodyRequest_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char BODYREQUEST[] = "gazebo_msgs/BodyRequest"; + + class BodyRequestRequest : public ros::Msg + { + public: + typedef const char* _body_name_type; + _body_name_type body_name; + + BodyRequestRequest(): + body_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_body_name = strlen(this->body_name); + varToArr(outbuffer + offset, length_body_name); + offset += 4; + memcpy(outbuffer + offset, this->body_name, length_body_name); + offset += length_body_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_body_name; + arrToVar(length_body_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_body_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_body_name-1]=0; + this->body_name = (char *)(inbuffer + offset-1); + offset += length_body_name; + return offset; + } + + const char * getType(){ return BODYREQUEST; }; + const char * getMD5(){ return "5eade9afe7f232d78005bd0cafeab755"; }; + + }; + + class BodyRequestResponse : public ros::Msg + { + public: + + BodyRequestResponse() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return BODYREQUEST; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class BodyRequest { + public: + typedef BodyRequestRequest Request; + typedef BodyRequestResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ContactState.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ContactState.h new file mode 100644 index 0000000000000000000000000000000000000000..a3d852d889430da110c29dc463f6e54b6b0e5e3e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ContactState.h @@ -0,0 +1,223 @@ +#ifndef _ROS_gazebo_msgs_ContactState_h +#define _ROS_gazebo_msgs_ContactState_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Wrench.h" +#include "geometry_msgs/Vector3.h" + +namespace gazebo_msgs +{ + + class ContactState : public ros::Msg + { + public: + typedef const char* _info_type; + _info_type info; + typedef const char* _collision1_name_type; + _collision1_name_type collision1_name; + typedef const char* _collision2_name_type; + _collision2_name_type collision2_name; + uint32_t wrenches_length; + typedef geometry_msgs::Wrench _wrenches_type; + _wrenches_type st_wrenches; + _wrenches_type * wrenches; + typedef geometry_msgs::Wrench _total_wrench_type; + _total_wrench_type total_wrench; + uint32_t contact_positions_length; + typedef geometry_msgs::Vector3 _contact_positions_type; + _contact_positions_type st_contact_positions; + _contact_positions_type * contact_positions; + uint32_t contact_normals_length; + typedef geometry_msgs::Vector3 _contact_normals_type; + _contact_normals_type st_contact_normals; + _contact_normals_type * contact_normals; + uint32_t depths_length; + typedef double _depths_type; + _depths_type st_depths; + _depths_type * depths; + + ContactState(): + info(""), + collision1_name(""), + collision2_name(""), + wrenches_length(0), wrenches(NULL), + total_wrench(), + contact_positions_length(0), contact_positions(NULL), + contact_normals_length(0), contact_normals(NULL), + depths_length(0), depths(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_info = strlen(this->info); + varToArr(outbuffer + offset, length_info); + offset += 4; + memcpy(outbuffer + offset, this->info, length_info); + offset += length_info; + uint32_t length_collision1_name = strlen(this->collision1_name); + varToArr(outbuffer + offset, length_collision1_name); + offset += 4; + memcpy(outbuffer + offset, this->collision1_name, length_collision1_name); + offset += length_collision1_name; + uint32_t length_collision2_name = strlen(this->collision2_name); + varToArr(outbuffer + offset, length_collision2_name); + offset += 4; + memcpy(outbuffer + offset, this->collision2_name, length_collision2_name); + offset += length_collision2_name; + *(outbuffer + offset + 0) = (this->wrenches_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->wrenches_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->wrenches_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->wrenches_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->wrenches_length); + for( uint32_t i = 0; i < wrenches_length; i++){ + offset += this->wrenches[i].serialize(outbuffer + offset); + } + offset += this->total_wrench.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->contact_positions_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->contact_positions_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->contact_positions_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->contact_positions_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->contact_positions_length); + for( uint32_t i = 0; i < contact_positions_length; i++){ + offset += this->contact_positions[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->contact_normals_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->contact_normals_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->contact_normals_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->contact_normals_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->contact_normals_length); + for( uint32_t i = 0; i < contact_normals_length; i++){ + offset += this->contact_normals[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->depths_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->depths_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->depths_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->depths_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->depths_length); + for( uint32_t i = 0; i < depths_length; i++){ + union { + double real; + uint64_t base; + } u_depthsi; + u_depthsi.real = this->depths[i]; + *(outbuffer + offset + 0) = (u_depthsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_depthsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_depthsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_depthsi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_depthsi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_depthsi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_depthsi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_depthsi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->depths[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_info; + arrToVar(length_info, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_info; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_info-1]=0; + this->info = (char *)(inbuffer + offset-1); + offset += length_info; + uint32_t length_collision1_name; + arrToVar(length_collision1_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_collision1_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_collision1_name-1]=0; + this->collision1_name = (char *)(inbuffer + offset-1); + offset += length_collision1_name; + uint32_t length_collision2_name; + arrToVar(length_collision2_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_collision2_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_collision2_name-1]=0; + this->collision2_name = (char *)(inbuffer + offset-1); + offset += length_collision2_name; + uint32_t wrenches_lengthT = ((uint32_t) (*(inbuffer + offset))); + wrenches_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + wrenches_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + wrenches_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->wrenches_length); + if(wrenches_lengthT > wrenches_length) + this->wrenches = (geometry_msgs::Wrench*)realloc(this->wrenches, wrenches_lengthT * sizeof(geometry_msgs::Wrench)); + wrenches_length = wrenches_lengthT; + for( uint32_t i = 0; i < wrenches_length; i++){ + offset += this->st_wrenches.deserialize(inbuffer + offset); + memcpy( &(this->wrenches[i]), &(this->st_wrenches), sizeof(geometry_msgs::Wrench)); + } + offset += this->total_wrench.deserialize(inbuffer + offset); + uint32_t contact_positions_lengthT = ((uint32_t) (*(inbuffer + offset))); + contact_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + contact_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + contact_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->contact_positions_length); + if(contact_positions_lengthT > contact_positions_length) + this->contact_positions = (geometry_msgs::Vector3*)realloc(this->contact_positions, contact_positions_lengthT * sizeof(geometry_msgs::Vector3)); + contact_positions_length = contact_positions_lengthT; + for( uint32_t i = 0; i < contact_positions_length; i++){ + offset += this->st_contact_positions.deserialize(inbuffer + offset); + memcpy( &(this->contact_positions[i]), &(this->st_contact_positions), sizeof(geometry_msgs::Vector3)); + } + uint32_t contact_normals_lengthT = ((uint32_t) (*(inbuffer + offset))); + contact_normals_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + contact_normals_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + contact_normals_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->contact_normals_length); + if(contact_normals_lengthT > contact_normals_length) + this->contact_normals = (geometry_msgs::Vector3*)realloc(this->contact_normals, contact_normals_lengthT * sizeof(geometry_msgs::Vector3)); + contact_normals_length = contact_normals_lengthT; + for( uint32_t i = 0; i < contact_normals_length; i++){ + offset += this->st_contact_normals.deserialize(inbuffer + offset); + memcpy( &(this->contact_normals[i]), &(this->st_contact_normals), sizeof(geometry_msgs::Vector3)); + } + uint32_t depths_lengthT = ((uint32_t) (*(inbuffer + offset))); + depths_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + depths_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + depths_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->depths_length); + if(depths_lengthT > depths_length) + this->depths = (double*)realloc(this->depths, depths_lengthT * sizeof(double)); + depths_length = depths_lengthT; + for( uint32_t i = 0; i < depths_length; i++){ + union { + double real; + uint64_t base; + } u_st_depths; + u_st_depths.base = 0; + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_depths = u_st_depths.real; + offset += sizeof(this->st_depths); + memcpy( &(this->depths[i]), &(this->st_depths), sizeof(double)); + } + return offset; + } + + const char * getType(){ return "gazebo_msgs/ContactState"; }; + const char * getMD5(){ return "48c0ffb054b8c444f870cecea1ee50d9"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ContactsState.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ContactsState.h new file mode 100644 index 0000000000000000000000000000000000000000..9af62c0236887b6eccde24e0194839a949971e06 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ContactsState.h @@ -0,0 +1,70 @@ +#ifndef _ROS_gazebo_msgs_ContactsState_h +#define _ROS_gazebo_msgs_ContactsState_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "gazebo_msgs/ContactState.h" + +namespace gazebo_msgs +{ + + class ContactsState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t states_length; + typedef gazebo_msgs::ContactState _states_type; + _states_type st_states; + _states_type * states; + + ContactsState(): + header(), + states_length(0), states(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->states_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->states_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->states_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->states_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->states_length); + for( uint32_t i = 0; i < states_length; i++){ + offset += this->states[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t states_lengthT = ((uint32_t) (*(inbuffer + offset))); + states_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + states_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + states_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->states_length); + if(states_lengthT > states_length) + this->states = (gazebo_msgs::ContactState*)realloc(this->states, states_lengthT * sizeof(gazebo_msgs::ContactState)); + states_length = states_lengthT; + for( uint32_t i = 0; i < states_length; i++){ + offset += this->st_states.deserialize(inbuffer + offset); + memcpy( &(this->states[i]), &(this->st_states), sizeof(gazebo_msgs::ContactState)); + } + return offset; + } + + const char * getType(){ return "gazebo_msgs/ContactsState"; }; + const char * getMD5(){ return "acbcb1601a8e525bf72509f18e6f668d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/DeleteLight.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/DeleteLight.h new file mode 100644 index 0000000000000000000000000000000000000000..54a9c5d84c9d82134892db1ce2f485b30c05e73a --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/DeleteLight.h @@ -0,0 +1,122 @@ +#ifndef _ROS_SERVICE_DeleteLight_h +#define _ROS_SERVICE_DeleteLight_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char DELETELIGHT[] = "gazebo_msgs/DeleteLight"; + + class DeleteLightRequest : public ros::Msg + { + public: + typedef const char* _light_name_type; + _light_name_type light_name; + + DeleteLightRequest(): + light_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_light_name = strlen(this->light_name); + varToArr(outbuffer + offset, length_light_name); + offset += 4; + memcpy(outbuffer + offset, this->light_name, length_light_name); + offset += length_light_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_light_name; + arrToVar(length_light_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_light_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_light_name-1]=0; + this->light_name = (char *)(inbuffer + offset-1); + offset += length_light_name; + return offset; + } + + const char * getType(){ return DELETELIGHT; }; + const char * getMD5(){ return "4fb676dfb4741fc866365702a859441c"; }; + + }; + + class DeleteLightResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + DeleteLightResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return DELETELIGHT; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class DeleteLight { + public: + typedef DeleteLightRequest Request; + typedef DeleteLightResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/DeleteModel.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/DeleteModel.h new file mode 100644 index 0000000000000000000000000000000000000000..00da12dc6f6bd7c40f0c2203308dfd8b568a01e6 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/DeleteModel.h @@ -0,0 +1,122 @@ +#ifndef _ROS_SERVICE_DeleteModel_h +#define _ROS_SERVICE_DeleteModel_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char DELETEMODEL[] = "gazebo_msgs/DeleteModel"; + + class DeleteModelRequest : public ros::Msg + { + public: + typedef const char* _model_name_type; + _model_name_type model_name; + + DeleteModelRequest(): + model_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_model_name = strlen(this->model_name); + varToArr(outbuffer + offset, length_model_name); + offset += 4; + memcpy(outbuffer + offset, this->model_name, length_model_name); + offset += length_model_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_model_name; + arrToVar(length_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_name-1]=0; + this->model_name = (char *)(inbuffer + offset-1); + offset += length_model_name; + return offset; + } + + const char * getType(){ return DELETEMODEL; }; + const char * getMD5(){ return "ea31c8eab6fc401383cf528a7c0984ba"; }; + + }; + + class DeleteModelResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + DeleteModelResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return DELETEMODEL; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class DeleteModel { + public: + typedef DeleteModelRequest Request; + typedef DeleteModelResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetJointProperties.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetJointProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..6ad0fe916cd4b0cb385017204bb8deabbb27965c --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetJointProperties.h @@ -0,0 +1,291 @@ +#ifndef _ROS_SERVICE_GetJointProperties_h +#define _ROS_SERVICE_GetJointProperties_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char GETJOINTPROPERTIES[] = "gazebo_msgs/GetJointProperties"; + + class GetJointPropertiesRequest : public ros::Msg + { + public: + typedef const char* _joint_name_type; + _joint_name_type joint_name; + + GetJointPropertiesRequest(): + joint_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_joint_name = strlen(this->joint_name); + varToArr(outbuffer + offset, length_joint_name); + offset += 4; + memcpy(outbuffer + offset, this->joint_name, length_joint_name); + offset += length_joint_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_joint_name; + arrToVar(length_joint_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_joint_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_joint_name-1]=0; + this->joint_name = (char *)(inbuffer + offset-1); + offset += length_joint_name; + return offset; + } + + const char * getType(){ return GETJOINTPROPERTIES; }; + const char * getMD5(){ return "0be1351618e1dc030eb7959d9a4902de"; }; + + }; + + class GetJointPropertiesResponse : public ros::Msg + { + public: + typedef uint8_t _type_type; + _type_type type; + uint32_t damping_length; + typedef double _damping_type; + _damping_type st_damping; + _damping_type * damping; + uint32_t position_length; + typedef double _position_type; + _position_type st_position; + _position_type * position; + uint32_t rate_length; + typedef double _rate_type; + _rate_type st_rate; + _rate_type * rate; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + enum { REVOLUTE = 0 }; + enum { CONTINUOUS = 1 }; + enum { PRISMATIC = 2 }; + enum { FIXED = 3 }; + enum { BALL = 4 }; + enum { UNIVERSAL = 5 }; + + GetJointPropertiesResponse(): + type(0), + damping_length(0), damping(NULL), + position_length(0), position(NULL), + rate_length(0), rate(NULL), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->type >> (8 * 0)) & 0xFF; + offset += sizeof(this->type); + *(outbuffer + offset + 0) = (this->damping_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->damping_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->damping_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->damping_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->damping_length); + for( uint32_t i = 0; i < damping_length; i++){ + union { + double real; + uint64_t base; + } u_dampingi; + u_dampingi.real = this->damping[i]; + *(outbuffer + offset + 0) = (u_dampingi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_dampingi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_dampingi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_dampingi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_dampingi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_dampingi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_dampingi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_dampingi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->damping[i]); + } + *(outbuffer + offset + 0) = (this->position_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->position_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->position_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->position_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->position_length); + for( uint32_t i = 0; i < position_length; i++){ + union { + double real; + uint64_t base; + } u_positioni; + u_positioni.real = this->position[i]; + *(outbuffer + offset + 0) = (u_positioni.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_positioni.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_positioni.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_positioni.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_positioni.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_positioni.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_positioni.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_positioni.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position[i]); + } + *(outbuffer + offset + 0) = (this->rate_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->rate_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->rate_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->rate_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->rate_length); + for( uint32_t i = 0; i < rate_length; i++){ + union { + double real; + uint64_t base; + } u_ratei; + u_ratei.real = this->rate[i]; + *(outbuffer + offset + 0) = (u_ratei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ratei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ratei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ratei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ratei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ratei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ratei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ratei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->rate[i]); + } + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->type); + uint32_t damping_lengthT = ((uint32_t) (*(inbuffer + offset))); + damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->damping_length); + if(damping_lengthT > damping_length) + this->damping = (double*)realloc(this->damping, damping_lengthT * sizeof(double)); + damping_length = damping_lengthT; + for( uint32_t i = 0; i < damping_length; i++){ + union { + double real; + uint64_t base; + } u_st_damping; + u_st_damping.base = 0; + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_damping = u_st_damping.real; + offset += sizeof(this->st_damping); + memcpy( &(this->damping[i]), &(this->st_damping), sizeof(double)); + } + uint32_t position_lengthT = ((uint32_t) (*(inbuffer + offset))); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->position_length); + if(position_lengthT > position_length) + this->position = (double*)realloc(this->position, position_lengthT * sizeof(double)); + position_length = position_lengthT; + for( uint32_t i = 0; i < position_length; i++){ + union { + double real; + uint64_t base; + } u_st_position; + u_st_position.base = 0; + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_position = u_st_position.real; + offset += sizeof(this->st_position); + memcpy( &(this->position[i]), &(this->st_position), sizeof(double)); + } + uint32_t rate_lengthT = ((uint32_t) (*(inbuffer + offset))); + rate_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + rate_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + rate_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->rate_length); + if(rate_lengthT > rate_length) + this->rate = (double*)realloc(this->rate, rate_lengthT * sizeof(double)); + rate_length = rate_lengthT; + for( uint32_t i = 0; i < rate_length; i++){ + union { + double real; + uint64_t base; + } u_st_rate; + u_st_rate.base = 0; + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_rate = u_st_rate.real; + offset += sizeof(this->st_rate); + memcpy( &(this->rate[i]), &(this->st_rate), sizeof(double)); + } + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETJOINTPROPERTIES; }; + const char * getMD5(){ return "cd7b30a39faa372283dc94c5f6457f82"; }; + + }; + + class GetJointProperties { + public: + typedef GetJointPropertiesRequest Request; + typedef GetJointPropertiesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetLightProperties.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetLightProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..721018679f449cfe5622c08c1036fc42d693bfec --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetLightProperties.h @@ -0,0 +1,224 @@ +#ifndef _ROS_SERVICE_GetLightProperties_h +#define _ROS_SERVICE_GetLightProperties_h +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/ColorRGBA.h" + +namespace gazebo_msgs +{ + +static const char GETLIGHTPROPERTIES[] = "gazebo_msgs/GetLightProperties"; + + class GetLightPropertiesRequest : public ros::Msg + { + public: + typedef const char* _light_name_type; + _light_name_type light_name; + + GetLightPropertiesRequest(): + light_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_light_name = strlen(this->light_name); + varToArr(outbuffer + offset, length_light_name); + offset += 4; + memcpy(outbuffer + offset, this->light_name, length_light_name); + offset += length_light_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_light_name; + arrToVar(length_light_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_light_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_light_name-1]=0; + this->light_name = (char *)(inbuffer + offset-1); + offset += length_light_name; + return offset; + } + + const char * getType(){ return GETLIGHTPROPERTIES; }; + const char * getMD5(){ return "4fb676dfb4741fc866365702a859441c"; }; + + }; + + class GetLightPropertiesResponse : public ros::Msg + { + public: + typedef std_msgs::ColorRGBA _diffuse_type; + _diffuse_type diffuse; + typedef double _attenuation_constant_type; + _attenuation_constant_type attenuation_constant; + typedef double _attenuation_linear_type; + _attenuation_linear_type attenuation_linear; + typedef double _attenuation_quadratic_type; + _attenuation_quadratic_type attenuation_quadratic; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + GetLightPropertiesResponse(): + diffuse(), + attenuation_constant(0), + attenuation_linear(0), + attenuation_quadratic(0), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->diffuse.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_attenuation_constant; + u_attenuation_constant.real = this->attenuation_constant; + *(outbuffer + offset + 0) = (u_attenuation_constant.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_attenuation_constant.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_attenuation_constant.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_attenuation_constant.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_attenuation_constant.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_attenuation_constant.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_attenuation_constant.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_attenuation_constant.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->attenuation_constant); + union { + double real; + uint64_t base; + } u_attenuation_linear; + u_attenuation_linear.real = this->attenuation_linear; + *(outbuffer + offset + 0) = (u_attenuation_linear.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_attenuation_linear.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_attenuation_linear.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_attenuation_linear.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_attenuation_linear.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_attenuation_linear.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_attenuation_linear.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_attenuation_linear.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->attenuation_linear); + union { + double real; + uint64_t base; + } u_attenuation_quadratic; + u_attenuation_quadratic.real = this->attenuation_quadratic; + *(outbuffer + offset + 0) = (u_attenuation_quadratic.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_attenuation_quadratic.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_attenuation_quadratic.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_attenuation_quadratic.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_attenuation_quadratic.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_attenuation_quadratic.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_attenuation_quadratic.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_attenuation_quadratic.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->attenuation_quadratic); + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->diffuse.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_attenuation_constant; + u_attenuation_constant.base = 0; + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->attenuation_constant = u_attenuation_constant.real; + offset += sizeof(this->attenuation_constant); + union { + double real; + uint64_t base; + } u_attenuation_linear; + u_attenuation_linear.base = 0; + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->attenuation_linear = u_attenuation_linear.real; + offset += sizeof(this->attenuation_linear); + union { + double real; + uint64_t base; + } u_attenuation_quadratic; + u_attenuation_quadratic.base = 0; + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->attenuation_quadratic = u_attenuation_quadratic.real; + offset += sizeof(this->attenuation_quadratic); + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETLIGHTPROPERTIES; }; + const char * getMD5(){ return "9a19ddd5aab4c13b7643d1722c709f1f"; }; + + }; + + class GetLightProperties { + public: + typedef GetLightPropertiesRequest Request; + typedef GetLightPropertiesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetLinkProperties.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetLinkProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..0d4173f2dff8fe46df53949d2edb244ed55c95a0 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetLinkProperties.h @@ -0,0 +1,370 @@ +#ifndef _ROS_SERVICE_GetLinkProperties_h +#define _ROS_SERVICE_GetLinkProperties_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" + +namespace gazebo_msgs +{ + +static const char GETLINKPROPERTIES[] = "gazebo_msgs/GetLinkProperties"; + + class GetLinkPropertiesRequest : public ros::Msg + { + public: + typedef const char* _link_name_type; + _link_name_type link_name; + + GetLinkPropertiesRequest(): + link_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_link_name = strlen(this->link_name); + varToArr(outbuffer + offset, length_link_name); + offset += 4; + memcpy(outbuffer + offset, this->link_name, length_link_name); + offset += length_link_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_link_name; + arrToVar(length_link_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_link_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_link_name-1]=0; + this->link_name = (char *)(inbuffer + offset-1); + offset += length_link_name; + return offset; + } + + const char * getType(){ return GETLINKPROPERTIES; }; + const char * getMD5(){ return "7d82d60381f1b66a30f2157f60884345"; }; + + }; + + class GetLinkPropertiesResponse : public ros::Msg + { + public: + typedef geometry_msgs::Pose _com_type; + _com_type com; + typedef bool _gravity_mode_type; + _gravity_mode_type gravity_mode; + typedef double _mass_type; + _mass_type mass; + typedef double _ixx_type; + _ixx_type ixx; + typedef double _ixy_type; + _ixy_type ixy; + typedef double _ixz_type; + _ixz_type ixz; + typedef double _iyy_type; + _iyy_type iyy; + typedef double _iyz_type; + _iyz_type iyz; + typedef double _izz_type; + _izz_type izz; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + GetLinkPropertiesResponse(): + com(), + gravity_mode(0), + mass(0), + ixx(0), + ixy(0), + ixz(0), + iyy(0), + iyz(0), + izz(0), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->com.serialize(outbuffer + offset); + union { + bool real; + uint8_t base; + } u_gravity_mode; + u_gravity_mode.real = this->gravity_mode; + *(outbuffer + offset + 0) = (u_gravity_mode.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->gravity_mode); + union { + double real; + uint64_t base; + } u_mass; + u_mass.real = this->mass; + *(outbuffer + offset + 0) = (u_mass.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_mass.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_mass.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_mass.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_mass.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_mass.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_mass.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_mass.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->mass); + union { + double real; + uint64_t base; + } u_ixx; + u_ixx.real = this->ixx; + *(outbuffer + offset + 0) = (u_ixx.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixx.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixx.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixx.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixx.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixx.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixx.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixx.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixx); + union { + double real; + uint64_t base; + } u_ixy; + u_ixy.real = this->ixy; + *(outbuffer + offset + 0) = (u_ixy.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixy.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixy.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixy.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixy.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixy.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixy.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixy.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixy); + union { + double real; + uint64_t base; + } u_ixz; + u_ixz.real = this->ixz; + *(outbuffer + offset + 0) = (u_ixz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixz); + union { + double real; + uint64_t base; + } u_iyy; + u_iyy.real = this->iyy; + *(outbuffer + offset + 0) = (u_iyy.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_iyy.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_iyy.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_iyy.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_iyy.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_iyy.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_iyy.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_iyy.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->iyy); + union { + double real; + uint64_t base; + } u_iyz; + u_iyz.real = this->iyz; + *(outbuffer + offset + 0) = (u_iyz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_iyz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_iyz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_iyz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_iyz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_iyz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_iyz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_iyz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->iyz); + union { + double real; + uint64_t base; + } u_izz; + u_izz.real = this->izz; + *(outbuffer + offset + 0) = (u_izz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_izz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_izz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_izz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_izz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_izz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_izz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_izz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->izz); + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->com.deserialize(inbuffer + offset); + union { + bool real; + uint8_t base; + } u_gravity_mode; + u_gravity_mode.base = 0; + u_gravity_mode.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->gravity_mode = u_gravity_mode.real; + offset += sizeof(this->gravity_mode); + union { + double real; + uint64_t base; + } u_mass; + u_mass.base = 0; + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->mass = u_mass.real; + offset += sizeof(this->mass); + union { + double real; + uint64_t base; + } u_ixx; + u_ixx.base = 0; + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixx = u_ixx.real; + offset += sizeof(this->ixx); + union { + double real; + uint64_t base; + } u_ixy; + u_ixy.base = 0; + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixy = u_ixy.real; + offset += sizeof(this->ixy); + union { + double real; + uint64_t base; + } u_ixz; + u_ixz.base = 0; + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixz = u_ixz.real; + offset += sizeof(this->ixz); + union { + double real; + uint64_t base; + } u_iyy; + u_iyy.base = 0; + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->iyy = u_iyy.real; + offset += sizeof(this->iyy); + union { + double real; + uint64_t base; + } u_iyz; + u_iyz.base = 0; + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->iyz = u_iyz.real; + offset += sizeof(this->iyz); + union { + double real; + uint64_t base; + } u_izz; + u_izz.base = 0; + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->izz = u_izz.real; + offset += sizeof(this->izz); + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETLINKPROPERTIES; }; + const char * getMD5(){ return "a8619f92d17cfcc3958c0fd13299443d"; }; + + }; + + class GetLinkProperties { + public: + typedef GetLinkPropertiesRequest Request; + typedef GetLinkPropertiesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetLinkState.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetLinkState.h new file mode 100644 index 0000000000000000000000000000000000000000..5e207644d5cc22860ea7d7a241ce2fef7be86791 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetLinkState.h @@ -0,0 +1,145 @@ +#ifndef _ROS_SERVICE_GetLinkState_h +#define _ROS_SERVICE_GetLinkState_h +#include +#include +#include +#include "ros/msg.h" +#include "gazebo_msgs/LinkState.h" + +namespace gazebo_msgs +{ + +static const char GETLINKSTATE[] = "gazebo_msgs/GetLinkState"; + + class GetLinkStateRequest : public ros::Msg + { + public: + typedef const char* _link_name_type; + _link_name_type link_name; + typedef const char* _reference_frame_type; + _reference_frame_type reference_frame; + + GetLinkStateRequest(): + link_name(""), + reference_frame("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_link_name = strlen(this->link_name); + varToArr(outbuffer + offset, length_link_name); + offset += 4; + memcpy(outbuffer + offset, this->link_name, length_link_name); + offset += length_link_name; + uint32_t length_reference_frame = strlen(this->reference_frame); + varToArr(outbuffer + offset, length_reference_frame); + offset += 4; + memcpy(outbuffer + offset, this->reference_frame, length_reference_frame); + offset += length_reference_frame; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_link_name; + arrToVar(length_link_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_link_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_link_name-1]=0; + this->link_name = (char *)(inbuffer + offset-1); + offset += length_link_name; + uint32_t length_reference_frame; + arrToVar(length_reference_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_reference_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_reference_frame-1]=0; + this->reference_frame = (char *)(inbuffer + offset-1); + offset += length_reference_frame; + return offset; + } + + const char * getType(){ return GETLINKSTATE; }; + const char * getMD5(){ return "7551675c30aaa71f7c288d4864552001"; }; + + }; + + class GetLinkStateResponse : public ros::Msg + { + public: + typedef gazebo_msgs::LinkState _link_state_type; + _link_state_type link_state; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + GetLinkStateResponse(): + link_state(), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->link_state.serialize(outbuffer + offset); + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->link_state.deserialize(inbuffer + offset); + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETLINKSTATE; }; + const char * getMD5(){ return "8ba55ad34f9c072e75c0de57b089753b"; }; + + }; + + class GetLinkState { + public: + typedef GetLinkStateRequest Request; + typedef GetLinkStateResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetModelProperties.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetModelProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..082e688b3134dad92c29f9e3038770afb33dda9e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetModelProperties.h @@ -0,0 +1,322 @@ +#ifndef _ROS_SERVICE_GetModelProperties_h +#define _ROS_SERVICE_GetModelProperties_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char GETMODELPROPERTIES[] = "gazebo_msgs/GetModelProperties"; + + class GetModelPropertiesRequest : public ros::Msg + { + public: + typedef const char* _model_name_type; + _model_name_type model_name; + + GetModelPropertiesRequest(): + model_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_model_name = strlen(this->model_name); + varToArr(outbuffer + offset, length_model_name); + offset += 4; + memcpy(outbuffer + offset, this->model_name, length_model_name); + offset += length_model_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_model_name; + arrToVar(length_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_name-1]=0; + this->model_name = (char *)(inbuffer + offset-1); + offset += length_model_name; + return offset; + } + + const char * getType(){ return GETMODELPROPERTIES; }; + const char * getMD5(){ return "ea31c8eab6fc401383cf528a7c0984ba"; }; + + }; + + class GetModelPropertiesResponse : public ros::Msg + { + public: + typedef const char* _parent_model_name_type; + _parent_model_name_type parent_model_name; + typedef const char* _canonical_body_name_type; + _canonical_body_name_type canonical_body_name; + uint32_t body_names_length; + typedef char* _body_names_type; + _body_names_type st_body_names; + _body_names_type * body_names; + uint32_t geom_names_length; + typedef char* _geom_names_type; + _geom_names_type st_geom_names; + _geom_names_type * geom_names; + uint32_t joint_names_length; + typedef char* _joint_names_type; + _joint_names_type st_joint_names; + _joint_names_type * joint_names; + uint32_t child_model_names_length; + typedef char* _child_model_names_type; + _child_model_names_type st_child_model_names; + _child_model_names_type * child_model_names; + typedef bool _is_static_type; + _is_static_type is_static; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + GetModelPropertiesResponse(): + parent_model_name(""), + canonical_body_name(""), + body_names_length(0), body_names(NULL), + geom_names_length(0), geom_names(NULL), + joint_names_length(0), joint_names(NULL), + child_model_names_length(0), child_model_names(NULL), + is_static(0), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_parent_model_name = strlen(this->parent_model_name); + varToArr(outbuffer + offset, length_parent_model_name); + offset += 4; + memcpy(outbuffer + offset, this->parent_model_name, length_parent_model_name); + offset += length_parent_model_name; + uint32_t length_canonical_body_name = strlen(this->canonical_body_name); + varToArr(outbuffer + offset, length_canonical_body_name); + offset += 4; + memcpy(outbuffer + offset, this->canonical_body_name, length_canonical_body_name); + offset += length_canonical_body_name; + *(outbuffer + offset + 0) = (this->body_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->body_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->body_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->body_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->body_names_length); + for( uint32_t i = 0; i < body_names_length; i++){ + uint32_t length_body_namesi = strlen(this->body_names[i]); + varToArr(outbuffer + offset, length_body_namesi); + offset += 4; + memcpy(outbuffer + offset, this->body_names[i], length_body_namesi); + offset += length_body_namesi; + } + *(outbuffer + offset + 0) = (this->geom_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->geom_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->geom_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->geom_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->geom_names_length); + for( uint32_t i = 0; i < geom_names_length; i++){ + uint32_t length_geom_namesi = strlen(this->geom_names[i]); + varToArr(outbuffer + offset, length_geom_namesi); + offset += 4; + memcpy(outbuffer + offset, this->geom_names[i], length_geom_namesi); + offset += length_geom_namesi; + } + *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_names_length); + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_joint_namesi = strlen(this->joint_names[i]); + varToArr(outbuffer + offset, length_joint_namesi); + offset += 4; + memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); + offset += length_joint_namesi; + } + *(outbuffer + offset + 0) = (this->child_model_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->child_model_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->child_model_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->child_model_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->child_model_names_length); + for( uint32_t i = 0; i < child_model_names_length; i++){ + uint32_t length_child_model_namesi = strlen(this->child_model_names[i]); + varToArr(outbuffer + offset, length_child_model_namesi); + offset += 4; + memcpy(outbuffer + offset, this->child_model_names[i], length_child_model_namesi); + offset += length_child_model_namesi; + } + union { + bool real; + uint8_t base; + } u_is_static; + u_is_static.real = this->is_static; + *(outbuffer + offset + 0) = (u_is_static.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->is_static); + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_parent_model_name; + arrToVar(length_parent_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_parent_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_parent_model_name-1]=0; + this->parent_model_name = (char *)(inbuffer + offset-1); + offset += length_parent_model_name; + uint32_t length_canonical_body_name; + arrToVar(length_canonical_body_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_canonical_body_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_canonical_body_name-1]=0; + this->canonical_body_name = (char *)(inbuffer + offset-1); + offset += length_canonical_body_name; + uint32_t body_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + body_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + body_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + body_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->body_names_length); + if(body_names_lengthT > body_names_length) + this->body_names = (char**)realloc(this->body_names, body_names_lengthT * sizeof(char*)); + body_names_length = body_names_lengthT; + for( uint32_t i = 0; i < body_names_length; i++){ + uint32_t length_st_body_names; + arrToVar(length_st_body_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_body_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_body_names-1]=0; + this->st_body_names = (char *)(inbuffer + offset-1); + offset += length_st_body_names; + memcpy( &(this->body_names[i]), &(this->st_body_names), sizeof(char*)); + } + uint32_t geom_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + geom_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + geom_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + geom_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->geom_names_length); + if(geom_names_lengthT > geom_names_length) + this->geom_names = (char**)realloc(this->geom_names, geom_names_lengthT * sizeof(char*)); + geom_names_length = geom_names_lengthT; + for( uint32_t i = 0; i < geom_names_length; i++){ + uint32_t length_st_geom_names; + arrToVar(length_st_geom_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_geom_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_geom_names-1]=0; + this->st_geom_names = (char *)(inbuffer + offset-1); + offset += length_st_geom_names; + memcpy( &(this->geom_names[i]), &(this->st_geom_names), sizeof(char*)); + } + uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_names_length); + if(joint_names_lengthT > joint_names_length) + this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); + joint_names_length = joint_names_lengthT; + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_st_joint_names; + arrToVar(length_st_joint_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_joint_names-1]=0; + this->st_joint_names = (char *)(inbuffer + offset-1); + offset += length_st_joint_names; + memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); + } + uint32_t child_model_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + child_model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + child_model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + child_model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->child_model_names_length); + if(child_model_names_lengthT > child_model_names_length) + this->child_model_names = (char**)realloc(this->child_model_names, child_model_names_lengthT * sizeof(char*)); + child_model_names_length = child_model_names_lengthT; + for( uint32_t i = 0; i < child_model_names_length; i++){ + uint32_t length_st_child_model_names; + arrToVar(length_st_child_model_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_child_model_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_child_model_names-1]=0; + this->st_child_model_names = (char *)(inbuffer + offset-1); + offset += length_st_child_model_names; + memcpy( &(this->child_model_names[i]), &(this->st_child_model_names), sizeof(char*)); + } + union { + bool real; + uint8_t base; + } u_is_static; + u_is_static.base = 0; + u_is_static.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->is_static = u_is_static.real; + offset += sizeof(this->is_static); + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETMODELPROPERTIES; }; + const char * getMD5(){ return "b7f370938ef77b464b95f1bab3ec5028"; }; + + }; + + class GetModelProperties { + public: + typedef GetModelPropertiesRequest Request; + typedef GetModelPropertiesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetModelState.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetModelState.h new file mode 100644 index 0000000000000000000000000000000000000000..0dbcc8159b968dfc167caef10fb7f1cf93306a13 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetModelState.h @@ -0,0 +1,157 @@ +#ifndef _ROS_SERVICE_GetModelState_h +#define _ROS_SERVICE_GetModelState_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Twist.h" +#include "std_msgs/Header.h" + +namespace gazebo_msgs +{ + +static const char GETMODELSTATE[] = "gazebo_msgs/GetModelState"; + + class GetModelStateRequest : public ros::Msg + { + public: + typedef const char* _model_name_type; + _model_name_type model_name; + typedef const char* _relative_entity_name_type; + _relative_entity_name_type relative_entity_name; + + GetModelStateRequest(): + model_name(""), + relative_entity_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_model_name = strlen(this->model_name); + varToArr(outbuffer + offset, length_model_name); + offset += 4; + memcpy(outbuffer + offset, this->model_name, length_model_name); + offset += length_model_name; + uint32_t length_relative_entity_name = strlen(this->relative_entity_name); + varToArr(outbuffer + offset, length_relative_entity_name); + offset += 4; + memcpy(outbuffer + offset, this->relative_entity_name, length_relative_entity_name); + offset += length_relative_entity_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_model_name; + arrToVar(length_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_name-1]=0; + this->model_name = (char *)(inbuffer + offset-1); + offset += length_model_name; + uint32_t length_relative_entity_name; + arrToVar(length_relative_entity_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_relative_entity_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_relative_entity_name-1]=0; + this->relative_entity_name = (char *)(inbuffer + offset-1); + offset += length_relative_entity_name; + return offset; + } + + const char * getType(){ return GETMODELSTATE; }; + const char * getMD5(){ return "19d412713cefe4a67437e17a951e759e"; }; + + }; + + class GetModelStateResponse : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + typedef geometry_msgs::Twist _twist_type; + _twist_type twist; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + GetModelStateResponse(): + header(), + pose(), + twist(), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->pose.serialize(outbuffer + offset); + offset += this->twist.serialize(outbuffer + offset); + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->pose.deserialize(inbuffer + offset); + offset += this->twist.deserialize(inbuffer + offset); + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETMODELSTATE; }; + const char * getMD5(){ return "ccd51739bb00f0141629e87b792e92b9"; }; + + }; + + class GetModelState { + public: + typedef GetModelStateRequest Request; + typedef GetModelStateResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetPhysicsProperties.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetPhysicsProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..f79bc89a80fd67ea2fba10b24660b6cc49785e16 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetPhysicsProperties.h @@ -0,0 +1,199 @@ +#ifndef _ROS_SERVICE_GetPhysicsProperties_h +#define _ROS_SERVICE_GetPhysicsProperties_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Vector3.h" +#include "gazebo_msgs/ODEPhysics.h" + +namespace gazebo_msgs +{ + +static const char GETPHYSICSPROPERTIES[] = "gazebo_msgs/GetPhysicsProperties"; + + class GetPhysicsPropertiesRequest : public ros::Msg + { + public: + + GetPhysicsPropertiesRequest() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return GETPHYSICSPROPERTIES; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetPhysicsPropertiesResponse : public ros::Msg + { + public: + typedef double _time_step_type; + _time_step_type time_step; + typedef bool _pause_type; + _pause_type pause; + typedef double _max_update_rate_type; + _max_update_rate_type max_update_rate; + typedef geometry_msgs::Vector3 _gravity_type; + _gravity_type gravity; + typedef gazebo_msgs::ODEPhysics _ode_config_type; + _ode_config_type ode_config; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + GetPhysicsPropertiesResponse(): + time_step(0), + pause(0), + max_update_rate(0), + gravity(), + ode_config(), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_time_step; + u_time_step.real = this->time_step; + *(outbuffer + offset + 0) = (u_time_step.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_time_step.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_time_step.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_time_step.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_time_step.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_time_step.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_time_step.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_time_step.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->time_step); + union { + bool real; + uint8_t base; + } u_pause; + u_pause.real = this->pause; + *(outbuffer + offset + 0) = (u_pause.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->pause); + union { + double real; + uint64_t base; + } u_max_update_rate; + u_max_update_rate.real = this->max_update_rate; + *(outbuffer + offset + 0) = (u_max_update_rate.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_update_rate.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_update_rate.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_update_rate.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max_update_rate.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max_update_rate.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max_update_rate.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max_update_rate.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max_update_rate); + offset += this->gravity.serialize(outbuffer + offset); + offset += this->ode_config.serialize(outbuffer + offset); + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_time_step; + u_time_step.base = 0; + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->time_step = u_time_step.real; + offset += sizeof(this->time_step); + union { + bool real; + uint8_t base; + } u_pause; + u_pause.base = 0; + u_pause.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->pause = u_pause.real; + offset += sizeof(this->pause); + union { + double real; + uint64_t base; + } u_max_update_rate; + u_max_update_rate.base = 0; + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max_update_rate = u_max_update_rate.real; + offset += sizeof(this->max_update_rate); + offset += this->gravity.deserialize(inbuffer + offset); + offset += this->ode_config.deserialize(inbuffer + offset); + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETPHYSICSPROPERTIES; }; + const char * getMD5(){ return "575a5e74786981b7df2e3afc567693a6"; }; + + }; + + class GetPhysicsProperties { + public: + typedef GetPhysicsPropertiesRequest Request; + typedef GetPhysicsPropertiesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetWorldProperties.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetWorldProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..e9170e76633f1f313b6bfb7c74b705ab29853099 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/GetWorldProperties.h @@ -0,0 +1,192 @@ +#ifndef _ROS_SERVICE_GetWorldProperties_h +#define _ROS_SERVICE_GetWorldProperties_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char GETWORLDPROPERTIES[] = "gazebo_msgs/GetWorldProperties"; + + class GetWorldPropertiesRequest : public ros::Msg + { + public: + + GetWorldPropertiesRequest() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return GETWORLDPROPERTIES; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetWorldPropertiesResponse : public ros::Msg + { + public: + typedef double _sim_time_type; + _sim_time_type sim_time; + uint32_t model_names_length; + typedef char* _model_names_type; + _model_names_type st_model_names; + _model_names_type * model_names; + typedef bool _rendering_enabled_type; + _rendering_enabled_type rendering_enabled; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + GetWorldPropertiesResponse(): + sim_time(0), + model_names_length(0), model_names(NULL), + rendering_enabled(0), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_sim_time; + u_sim_time.real = this->sim_time; + *(outbuffer + offset + 0) = (u_sim_time.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_sim_time.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_sim_time.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_sim_time.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_sim_time.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_sim_time.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_sim_time.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_sim_time.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->sim_time); + *(outbuffer + offset + 0) = (this->model_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->model_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->model_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->model_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->model_names_length); + for( uint32_t i = 0; i < model_names_length; i++){ + uint32_t length_model_namesi = strlen(this->model_names[i]); + varToArr(outbuffer + offset, length_model_namesi); + offset += 4; + memcpy(outbuffer + offset, this->model_names[i], length_model_namesi); + offset += length_model_namesi; + } + union { + bool real; + uint8_t base; + } u_rendering_enabled; + u_rendering_enabled.real = this->rendering_enabled; + *(outbuffer + offset + 0) = (u_rendering_enabled.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->rendering_enabled); + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_sim_time; + u_sim_time.base = 0; + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->sim_time = u_sim_time.real; + offset += sizeof(this->sim_time); + uint32_t model_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->model_names_length); + if(model_names_lengthT > model_names_length) + this->model_names = (char**)realloc(this->model_names, model_names_lengthT * sizeof(char*)); + model_names_length = model_names_lengthT; + for( uint32_t i = 0; i < model_names_length; i++){ + uint32_t length_st_model_names; + arrToVar(length_st_model_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_model_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_model_names-1]=0; + this->st_model_names = (char *)(inbuffer + offset-1); + offset += length_st_model_names; + memcpy( &(this->model_names[i]), &(this->st_model_names), sizeof(char*)); + } + union { + bool real; + uint8_t base; + } u_rendering_enabled; + u_rendering_enabled.base = 0; + u_rendering_enabled.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->rendering_enabled = u_rendering_enabled.real; + offset += sizeof(this->rendering_enabled); + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETWORLDPROPERTIES; }; + const char * getMD5(){ return "36bb0f2eccf4d8be971410c22818ba3f"; }; + + }; + + class GetWorldProperties { + public: + typedef GetWorldPropertiesRequest Request; + typedef GetWorldPropertiesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/JointRequest.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/JointRequest.h new file mode 100644 index 0000000000000000000000000000000000000000..6c2c13ede645be8153c7e0d208e74d41170d1b71 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/JointRequest.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_JointRequest_h +#define _ROS_SERVICE_JointRequest_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char JOINTREQUEST[] = "gazebo_msgs/JointRequest"; + + class JointRequestRequest : public ros::Msg + { + public: + typedef const char* _joint_name_type; + _joint_name_type joint_name; + + JointRequestRequest(): + joint_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_joint_name = strlen(this->joint_name); + varToArr(outbuffer + offset, length_joint_name); + offset += 4; + memcpy(outbuffer + offset, this->joint_name, length_joint_name); + offset += length_joint_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_joint_name; + arrToVar(length_joint_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_joint_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_joint_name-1]=0; + this->joint_name = (char *)(inbuffer + offset-1); + offset += length_joint_name; + return offset; + } + + const char * getType(){ return JOINTREQUEST; }; + const char * getMD5(){ return "0be1351618e1dc030eb7959d9a4902de"; }; + + }; + + class JointRequestResponse : public ros::Msg + { + public: + + JointRequestResponse() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return JOINTREQUEST; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class JointRequest { + public: + typedef JointRequestRequest Request; + typedef JointRequestResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/LinkState.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/LinkState.h new file mode 100644 index 0000000000000000000000000000000000000000..cd2684b3c3f42b2925475aca9a746a9ff0f8ea7a --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/LinkState.h @@ -0,0 +1,84 @@ +#ifndef _ROS_gazebo_msgs_LinkState_h +#define _ROS_gazebo_msgs_LinkState_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Twist.h" + +namespace gazebo_msgs +{ + + class LinkState : public ros::Msg + { + public: + typedef const char* _link_name_type; + _link_name_type link_name; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + typedef geometry_msgs::Twist _twist_type; + _twist_type twist; + typedef const char* _reference_frame_type; + _reference_frame_type reference_frame; + + LinkState(): + link_name(""), + pose(), + twist(), + reference_frame("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_link_name = strlen(this->link_name); + varToArr(outbuffer + offset, length_link_name); + offset += 4; + memcpy(outbuffer + offset, this->link_name, length_link_name); + offset += length_link_name; + offset += this->pose.serialize(outbuffer + offset); + offset += this->twist.serialize(outbuffer + offset); + uint32_t length_reference_frame = strlen(this->reference_frame); + varToArr(outbuffer + offset, length_reference_frame); + offset += 4; + memcpy(outbuffer + offset, this->reference_frame, length_reference_frame); + offset += length_reference_frame; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_link_name; + arrToVar(length_link_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_link_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_link_name-1]=0; + this->link_name = (char *)(inbuffer + offset-1); + offset += length_link_name; + offset += this->pose.deserialize(inbuffer + offset); + offset += this->twist.deserialize(inbuffer + offset); + uint32_t length_reference_frame; + arrToVar(length_reference_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_reference_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_reference_frame-1]=0; + this->reference_frame = (char *)(inbuffer + offset-1); + offset += length_reference_frame; + return offset; + } + + const char * getType(){ return "gazebo_msgs/LinkState"; }; + const char * getMD5(){ return "0818ebbf28ce3a08d48ab1eaa7309ebe"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/LinkStates.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/LinkStates.h new file mode 100644 index 0000000000000000000000000000000000000000..8ec738d0e941ad881121e02f1f8bfdf390c11b6a --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/LinkStates.h @@ -0,0 +1,127 @@ +#ifndef _ROS_gazebo_msgs_LinkStates_h +#define _ROS_gazebo_msgs_LinkStates_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Twist.h" + +namespace gazebo_msgs +{ + + class LinkStates : public ros::Msg + { + public: + uint32_t name_length; + typedef char* _name_type; + _name_type st_name; + _name_type * name; + uint32_t pose_length; + typedef geometry_msgs::Pose _pose_type; + _pose_type st_pose; + _pose_type * pose; + uint32_t twist_length; + typedef geometry_msgs::Twist _twist_type; + _twist_type st_twist; + _twist_type * twist; + + LinkStates(): + name_length(0), name(NULL), + pose_length(0), pose(NULL), + twist_length(0), twist(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->name_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->name_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->name_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->name_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->name_length); + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_namei = strlen(this->name[i]); + varToArr(outbuffer + offset, length_namei); + offset += 4; + memcpy(outbuffer + offset, this->name[i], length_namei); + offset += length_namei; + } + *(outbuffer + offset + 0) = (this->pose_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->pose_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->pose_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->pose_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->pose_length); + for( uint32_t i = 0; i < pose_length; i++){ + offset += this->pose[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->twist_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->twist_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->twist_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->twist_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->twist_length); + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->twist[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t name_lengthT = ((uint32_t) (*(inbuffer + offset))); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->name_length); + if(name_lengthT > name_length) + this->name = (char**)realloc(this->name, name_lengthT * sizeof(char*)); + name_length = name_lengthT; + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_st_name; + arrToVar(length_st_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_name-1]=0; + this->st_name = (char *)(inbuffer + offset-1); + offset += length_st_name; + memcpy( &(this->name[i]), &(this->st_name), sizeof(char*)); + } + uint32_t pose_lengthT = ((uint32_t) (*(inbuffer + offset))); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->pose_length); + if(pose_lengthT > pose_length) + this->pose = (geometry_msgs::Pose*)realloc(this->pose, pose_lengthT * sizeof(geometry_msgs::Pose)); + pose_length = pose_lengthT; + for( uint32_t i = 0; i < pose_length; i++){ + offset += this->st_pose.deserialize(inbuffer + offset); + memcpy( &(this->pose[i]), &(this->st_pose), sizeof(geometry_msgs::Pose)); + } + uint32_t twist_lengthT = ((uint32_t) (*(inbuffer + offset))); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->twist_length); + if(twist_lengthT > twist_length) + this->twist = (geometry_msgs::Twist*)realloc(this->twist, twist_lengthT * sizeof(geometry_msgs::Twist)); + twist_length = twist_lengthT; + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->st_twist.deserialize(inbuffer + offset); + memcpy( &(this->twist[i]), &(this->st_twist), sizeof(geometry_msgs::Twist)); + } + return offset; + } + + const char * getType(){ return "gazebo_msgs/LinkStates"; }; + const char * getMD5(){ return "48c080191eb15c41858319b4d8a609c2"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ModelState.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ModelState.h new file mode 100644 index 0000000000000000000000000000000000000000..4a3cfd1cf72bcefa02bee32c00c6720558e954de --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ModelState.h @@ -0,0 +1,84 @@ +#ifndef _ROS_gazebo_msgs_ModelState_h +#define _ROS_gazebo_msgs_ModelState_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Twist.h" + +namespace gazebo_msgs +{ + + class ModelState : public ros::Msg + { + public: + typedef const char* _model_name_type; + _model_name_type model_name; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + typedef geometry_msgs::Twist _twist_type; + _twist_type twist; + typedef const char* _reference_frame_type; + _reference_frame_type reference_frame; + + ModelState(): + model_name(""), + pose(), + twist(), + reference_frame("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_model_name = strlen(this->model_name); + varToArr(outbuffer + offset, length_model_name); + offset += 4; + memcpy(outbuffer + offset, this->model_name, length_model_name); + offset += length_model_name; + offset += this->pose.serialize(outbuffer + offset); + offset += this->twist.serialize(outbuffer + offset); + uint32_t length_reference_frame = strlen(this->reference_frame); + varToArr(outbuffer + offset, length_reference_frame); + offset += 4; + memcpy(outbuffer + offset, this->reference_frame, length_reference_frame); + offset += length_reference_frame; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_model_name; + arrToVar(length_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_name-1]=0; + this->model_name = (char *)(inbuffer + offset-1); + offset += length_model_name; + offset += this->pose.deserialize(inbuffer + offset); + offset += this->twist.deserialize(inbuffer + offset); + uint32_t length_reference_frame; + arrToVar(length_reference_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_reference_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_reference_frame-1]=0; + this->reference_frame = (char *)(inbuffer + offset-1); + offset += length_reference_frame; + return offset; + } + + const char * getType(){ return "gazebo_msgs/ModelState"; }; + const char * getMD5(){ return "9330fd35f2fcd82d457e54bd54e10593"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ModelStates.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ModelStates.h new file mode 100644 index 0000000000000000000000000000000000000000..f6c66d5297004ff1c06a9ab8acc4346900a1dffb --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ModelStates.h @@ -0,0 +1,127 @@ +#ifndef _ROS_gazebo_msgs_ModelStates_h +#define _ROS_gazebo_msgs_ModelStates_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Twist.h" + +namespace gazebo_msgs +{ + + class ModelStates : public ros::Msg + { + public: + uint32_t name_length; + typedef char* _name_type; + _name_type st_name; + _name_type * name; + uint32_t pose_length; + typedef geometry_msgs::Pose _pose_type; + _pose_type st_pose; + _pose_type * pose; + uint32_t twist_length; + typedef geometry_msgs::Twist _twist_type; + _twist_type st_twist; + _twist_type * twist; + + ModelStates(): + name_length(0), name(NULL), + pose_length(0), pose(NULL), + twist_length(0), twist(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->name_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->name_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->name_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->name_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->name_length); + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_namei = strlen(this->name[i]); + varToArr(outbuffer + offset, length_namei); + offset += 4; + memcpy(outbuffer + offset, this->name[i], length_namei); + offset += length_namei; + } + *(outbuffer + offset + 0) = (this->pose_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->pose_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->pose_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->pose_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->pose_length); + for( uint32_t i = 0; i < pose_length; i++){ + offset += this->pose[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->twist_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->twist_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->twist_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->twist_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->twist_length); + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->twist[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t name_lengthT = ((uint32_t) (*(inbuffer + offset))); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->name_length); + if(name_lengthT > name_length) + this->name = (char**)realloc(this->name, name_lengthT * sizeof(char*)); + name_length = name_lengthT; + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_st_name; + arrToVar(length_st_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_name-1]=0; + this->st_name = (char *)(inbuffer + offset-1); + offset += length_st_name; + memcpy( &(this->name[i]), &(this->st_name), sizeof(char*)); + } + uint32_t pose_lengthT = ((uint32_t) (*(inbuffer + offset))); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->pose_length); + if(pose_lengthT > pose_length) + this->pose = (geometry_msgs::Pose*)realloc(this->pose, pose_lengthT * sizeof(geometry_msgs::Pose)); + pose_length = pose_lengthT; + for( uint32_t i = 0; i < pose_length; i++){ + offset += this->st_pose.deserialize(inbuffer + offset); + memcpy( &(this->pose[i]), &(this->st_pose), sizeof(geometry_msgs::Pose)); + } + uint32_t twist_lengthT = ((uint32_t) (*(inbuffer + offset))); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->twist_length); + if(twist_lengthT > twist_length) + this->twist = (geometry_msgs::Twist*)realloc(this->twist, twist_lengthT * sizeof(geometry_msgs::Twist)); + twist_length = twist_lengthT; + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->st_twist.deserialize(inbuffer + offset); + memcpy( &(this->twist[i]), &(this->st_twist), sizeof(geometry_msgs::Twist)); + } + return offset; + } + + const char * getType(){ return "gazebo_msgs/ModelStates"; }; + const char * getMD5(){ return "48c080191eb15c41858319b4d8a609c2"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ODEJointProperties.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ODEJointProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..c3fba20a3ad1338c1c9bab3efc688e8215c526a2 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ODEJointProperties.h @@ -0,0 +1,558 @@ +#ifndef _ROS_gazebo_msgs_ODEJointProperties_h +#define _ROS_gazebo_msgs_ODEJointProperties_h + +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + + class ODEJointProperties : public ros::Msg + { + public: + uint32_t damping_length; + typedef double _damping_type; + _damping_type st_damping; + _damping_type * damping; + uint32_t hiStop_length; + typedef double _hiStop_type; + _hiStop_type st_hiStop; + _hiStop_type * hiStop; + uint32_t loStop_length; + typedef double _loStop_type; + _loStop_type st_loStop; + _loStop_type * loStop; + uint32_t erp_length; + typedef double _erp_type; + _erp_type st_erp; + _erp_type * erp; + uint32_t cfm_length; + typedef double _cfm_type; + _cfm_type st_cfm; + _cfm_type * cfm; + uint32_t stop_erp_length; + typedef double _stop_erp_type; + _stop_erp_type st_stop_erp; + _stop_erp_type * stop_erp; + uint32_t stop_cfm_length; + typedef double _stop_cfm_type; + _stop_cfm_type st_stop_cfm; + _stop_cfm_type * stop_cfm; + uint32_t fudge_factor_length; + typedef double _fudge_factor_type; + _fudge_factor_type st_fudge_factor; + _fudge_factor_type * fudge_factor; + uint32_t fmax_length; + typedef double _fmax_type; + _fmax_type st_fmax; + _fmax_type * fmax; + uint32_t vel_length; + typedef double _vel_type; + _vel_type st_vel; + _vel_type * vel; + + ODEJointProperties(): + damping_length(0), damping(NULL), + hiStop_length(0), hiStop(NULL), + loStop_length(0), loStop(NULL), + erp_length(0), erp(NULL), + cfm_length(0), cfm(NULL), + stop_erp_length(0), stop_erp(NULL), + stop_cfm_length(0), stop_cfm(NULL), + fudge_factor_length(0), fudge_factor(NULL), + fmax_length(0), fmax(NULL), + vel_length(0), vel(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->damping_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->damping_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->damping_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->damping_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->damping_length); + for( uint32_t i = 0; i < damping_length; i++){ + union { + double real; + uint64_t base; + } u_dampingi; + u_dampingi.real = this->damping[i]; + *(outbuffer + offset + 0) = (u_dampingi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_dampingi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_dampingi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_dampingi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_dampingi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_dampingi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_dampingi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_dampingi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->damping[i]); + } + *(outbuffer + offset + 0) = (this->hiStop_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->hiStop_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->hiStop_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->hiStop_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->hiStop_length); + for( uint32_t i = 0; i < hiStop_length; i++){ + union { + double real; + uint64_t base; + } u_hiStopi; + u_hiStopi.real = this->hiStop[i]; + *(outbuffer + offset + 0) = (u_hiStopi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_hiStopi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_hiStopi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_hiStopi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_hiStopi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_hiStopi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_hiStopi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_hiStopi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->hiStop[i]); + } + *(outbuffer + offset + 0) = (this->loStop_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->loStop_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->loStop_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->loStop_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->loStop_length); + for( uint32_t i = 0; i < loStop_length; i++){ + union { + double real; + uint64_t base; + } u_loStopi; + u_loStopi.real = this->loStop[i]; + *(outbuffer + offset + 0) = (u_loStopi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_loStopi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_loStopi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_loStopi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_loStopi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_loStopi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_loStopi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_loStopi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->loStop[i]); + } + *(outbuffer + offset + 0) = (this->erp_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->erp_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->erp_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->erp_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->erp_length); + for( uint32_t i = 0; i < erp_length; i++){ + union { + double real; + uint64_t base; + } u_erpi; + u_erpi.real = this->erp[i]; + *(outbuffer + offset + 0) = (u_erpi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_erpi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_erpi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_erpi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_erpi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_erpi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_erpi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_erpi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->erp[i]); + } + *(outbuffer + offset + 0) = (this->cfm_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->cfm_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->cfm_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->cfm_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->cfm_length); + for( uint32_t i = 0; i < cfm_length; i++){ + union { + double real; + uint64_t base; + } u_cfmi; + u_cfmi.real = this->cfm[i]; + *(outbuffer + offset + 0) = (u_cfmi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_cfmi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_cfmi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_cfmi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_cfmi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_cfmi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_cfmi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_cfmi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->cfm[i]); + } + *(outbuffer + offset + 0) = (this->stop_erp_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stop_erp_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stop_erp_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stop_erp_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->stop_erp_length); + for( uint32_t i = 0; i < stop_erp_length; i++){ + union { + double real; + uint64_t base; + } u_stop_erpi; + u_stop_erpi.real = this->stop_erp[i]; + *(outbuffer + offset + 0) = (u_stop_erpi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_stop_erpi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_stop_erpi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_stop_erpi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_stop_erpi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_stop_erpi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_stop_erpi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_stop_erpi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->stop_erp[i]); + } + *(outbuffer + offset + 0) = (this->stop_cfm_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stop_cfm_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stop_cfm_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stop_cfm_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->stop_cfm_length); + for( uint32_t i = 0; i < stop_cfm_length; i++){ + union { + double real; + uint64_t base; + } u_stop_cfmi; + u_stop_cfmi.real = this->stop_cfm[i]; + *(outbuffer + offset + 0) = (u_stop_cfmi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_stop_cfmi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_stop_cfmi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_stop_cfmi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_stop_cfmi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_stop_cfmi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_stop_cfmi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_stop_cfmi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->stop_cfm[i]); + } + *(outbuffer + offset + 0) = (this->fudge_factor_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->fudge_factor_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->fudge_factor_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->fudge_factor_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->fudge_factor_length); + for( uint32_t i = 0; i < fudge_factor_length; i++){ + union { + double real; + uint64_t base; + } u_fudge_factori; + u_fudge_factori.real = this->fudge_factor[i]; + *(outbuffer + offset + 0) = (u_fudge_factori.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_fudge_factori.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_fudge_factori.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_fudge_factori.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_fudge_factori.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_fudge_factori.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_fudge_factori.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_fudge_factori.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->fudge_factor[i]); + } + *(outbuffer + offset + 0) = (this->fmax_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->fmax_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->fmax_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->fmax_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->fmax_length); + for( uint32_t i = 0; i < fmax_length; i++){ + union { + double real; + uint64_t base; + } u_fmaxi; + u_fmaxi.real = this->fmax[i]; + *(outbuffer + offset + 0) = (u_fmaxi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_fmaxi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_fmaxi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_fmaxi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_fmaxi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_fmaxi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_fmaxi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_fmaxi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->fmax[i]); + } + *(outbuffer + offset + 0) = (this->vel_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->vel_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->vel_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->vel_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->vel_length); + for( uint32_t i = 0; i < vel_length; i++){ + union { + double real; + uint64_t base; + } u_veli; + u_veli.real = this->vel[i]; + *(outbuffer + offset + 0) = (u_veli.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_veli.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_veli.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_veli.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_veli.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_veli.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_veli.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_veli.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->vel[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t damping_lengthT = ((uint32_t) (*(inbuffer + offset))); + damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->damping_length); + if(damping_lengthT > damping_length) + this->damping = (double*)realloc(this->damping, damping_lengthT * sizeof(double)); + damping_length = damping_lengthT; + for( uint32_t i = 0; i < damping_length; i++){ + union { + double real; + uint64_t base; + } u_st_damping; + u_st_damping.base = 0; + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_damping = u_st_damping.real; + offset += sizeof(this->st_damping); + memcpy( &(this->damping[i]), &(this->st_damping), sizeof(double)); + } + uint32_t hiStop_lengthT = ((uint32_t) (*(inbuffer + offset))); + hiStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + hiStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + hiStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->hiStop_length); + if(hiStop_lengthT > hiStop_length) + this->hiStop = (double*)realloc(this->hiStop, hiStop_lengthT * sizeof(double)); + hiStop_length = hiStop_lengthT; + for( uint32_t i = 0; i < hiStop_length; i++){ + union { + double real; + uint64_t base; + } u_st_hiStop; + u_st_hiStop.base = 0; + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_hiStop = u_st_hiStop.real; + offset += sizeof(this->st_hiStop); + memcpy( &(this->hiStop[i]), &(this->st_hiStop), sizeof(double)); + } + uint32_t loStop_lengthT = ((uint32_t) (*(inbuffer + offset))); + loStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + loStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + loStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->loStop_length); + if(loStop_lengthT > loStop_length) + this->loStop = (double*)realloc(this->loStop, loStop_lengthT * sizeof(double)); + loStop_length = loStop_lengthT; + for( uint32_t i = 0; i < loStop_length; i++){ + union { + double real; + uint64_t base; + } u_st_loStop; + u_st_loStop.base = 0; + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_loStop = u_st_loStop.real; + offset += sizeof(this->st_loStop); + memcpy( &(this->loStop[i]), &(this->st_loStop), sizeof(double)); + } + uint32_t erp_lengthT = ((uint32_t) (*(inbuffer + offset))); + erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->erp_length); + if(erp_lengthT > erp_length) + this->erp = (double*)realloc(this->erp, erp_lengthT * sizeof(double)); + erp_length = erp_lengthT; + for( uint32_t i = 0; i < erp_length; i++){ + union { + double real; + uint64_t base; + } u_st_erp; + u_st_erp.base = 0; + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_erp = u_st_erp.real; + offset += sizeof(this->st_erp); + memcpy( &(this->erp[i]), &(this->st_erp), sizeof(double)); + } + uint32_t cfm_lengthT = ((uint32_t) (*(inbuffer + offset))); + cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->cfm_length); + if(cfm_lengthT > cfm_length) + this->cfm = (double*)realloc(this->cfm, cfm_lengthT * sizeof(double)); + cfm_length = cfm_lengthT; + for( uint32_t i = 0; i < cfm_length; i++){ + union { + double real; + uint64_t base; + } u_st_cfm; + u_st_cfm.base = 0; + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_cfm = u_st_cfm.real; + offset += sizeof(this->st_cfm); + memcpy( &(this->cfm[i]), &(this->st_cfm), sizeof(double)); + } + uint32_t stop_erp_lengthT = ((uint32_t) (*(inbuffer + offset))); + stop_erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + stop_erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + stop_erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stop_erp_length); + if(stop_erp_lengthT > stop_erp_length) + this->stop_erp = (double*)realloc(this->stop_erp, stop_erp_lengthT * sizeof(double)); + stop_erp_length = stop_erp_lengthT; + for( uint32_t i = 0; i < stop_erp_length; i++){ + union { + double real; + uint64_t base; + } u_st_stop_erp; + u_st_stop_erp.base = 0; + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_stop_erp = u_st_stop_erp.real; + offset += sizeof(this->st_stop_erp); + memcpy( &(this->stop_erp[i]), &(this->st_stop_erp), sizeof(double)); + } + uint32_t stop_cfm_lengthT = ((uint32_t) (*(inbuffer + offset))); + stop_cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + stop_cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + stop_cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stop_cfm_length); + if(stop_cfm_lengthT > stop_cfm_length) + this->stop_cfm = (double*)realloc(this->stop_cfm, stop_cfm_lengthT * sizeof(double)); + stop_cfm_length = stop_cfm_lengthT; + for( uint32_t i = 0; i < stop_cfm_length; i++){ + union { + double real; + uint64_t base; + } u_st_stop_cfm; + u_st_stop_cfm.base = 0; + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_stop_cfm = u_st_stop_cfm.real; + offset += sizeof(this->st_stop_cfm); + memcpy( &(this->stop_cfm[i]), &(this->st_stop_cfm), sizeof(double)); + } + uint32_t fudge_factor_lengthT = ((uint32_t) (*(inbuffer + offset))); + fudge_factor_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + fudge_factor_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + fudge_factor_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->fudge_factor_length); + if(fudge_factor_lengthT > fudge_factor_length) + this->fudge_factor = (double*)realloc(this->fudge_factor, fudge_factor_lengthT * sizeof(double)); + fudge_factor_length = fudge_factor_lengthT; + for( uint32_t i = 0; i < fudge_factor_length; i++){ + union { + double real; + uint64_t base; + } u_st_fudge_factor; + u_st_fudge_factor.base = 0; + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_fudge_factor = u_st_fudge_factor.real; + offset += sizeof(this->st_fudge_factor); + memcpy( &(this->fudge_factor[i]), &(this->st_fudge_factor), sizeof(double)); + } + uint32_t fmax_lengthT = ((uint32_t) (*(inbuffer + offset))); + fmax_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + fmax_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + fmax_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->fmax_length); + if(fmax_lengthT > fmax_length) + this->fmax = (double*)realloc(this->fmax, fmax_lengthT * sizeof(double)); + fmax_length = fmax_lengthT; + for( uint32_t i = 0; i < fmax_length; i++){ + union { + double real; + uint64_t base; + } u_st_fmax; + u_st_fmax.base = 0; + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_fmax = u_st_fmax.real; + offset += sizeof(this->st_fmax); + memcpy( &(this->fmax[i]), &(this->st_fmax), sizeof(double)); + } + uint32_t vel_lengthT = ((uint32_t) (*(inbuffer + offset))); + vel_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + vel_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + vel_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->vel_length); + if(vel_lengthT > vel_length) + this->vel = (double*)realloc(this->vel, vel_lengthT * sizeof(double)); + vel_length = vel_lengthT; + for( uint32_t i = 0; i < vel_length; i++){ + union { + double real; + uint64_t base; + } u_st_vel; + u_st_vel.base = 0; + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_vel = u_st_vel.real; + offset += sizeof(this->st_vel); + memcpy( &(this->vel[i]), &(this->st_vel), sizeof(double)); + } + return offset; + } + + const char * getType(){ return "gazebo_msgs/ODEJointProperties"; }; + const char * getMD5(){ return "1b744c32a920af979f53afe2f9c3511f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ODEPhysics.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ODEPhysics.h new file mode 100644 index 0000000000000000000000000000000000000000..dcb60385b640e945e55415f0defbfbea881eaac1 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/ODEPhysics.h @@ -0,0 +1,287 @@ +#ifndef _ROS_gazebo_msgs_ODEPhysics_h +#define _ROS_gazebo_msgs_ODEPhysics_h + +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + + class ODEPhysics : public ros::Msg + { + public: + typedef bool _auto_disable_bodies_type; + _auto_disable_bodies_type auto_disable_bodies; + typedef uint32_t _sor_pgs_precon_iters_type; + _sor_pgs_precon_iters_type sor_pgs_precon_iters; + typedef uint32_t _sor_pgs_iters_type; + _sor_pgs_iters_type sor_pgs_iters; + typedef double _sor_pgs_w_type; + _sor_pgs_w_type sor_pgs_w; + typedef double _sor_pgs_rms_error_tol_type; + _sor_pgs_rms_error_tol_type sor_pgs_rms_error_tol; + typedef double _contact_surface_layer_type; + _contact_surface_layer_type contact_surface_layer; + typedef double _contact_max_correcting_vel_type; + _contact_max_correcting_vel_type contact_max_correcting_vel; + typedef double _cfm_type; + _cfm_type cfm; + typedef double _erp_type; + _erp_type erp; + typedef uint32_t _max_contacts_type; + _max_contacts_type max_contacts; + + ODEPhysics(): + auto_disable_bodies(0), + sor_pgs_precon_iters(0), + sor_pgs_iters(0), + sor_pgs_w(0), + sor_pgs_rms_error_tol(0), + contact_surface_layer(0), + contact_max_correcting_vel(0), + cfm(0), + erp(0), + max_contacts(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_auto_disable_bodies; + u_auto_disable_bodies.real = this->auto_disable_bodies; + *(outbuffer + offset + 0) = (u_auto_disable_bodies.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->auto_disable_bodies); + *(outbuffer + offset + 0) = (this->sor_pgs_precon_iters >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->sor_pgs_precon_iters >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->sor_pgs_precon_iters >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->sor_pgs_precon_iters >> (8 * 3)) & 0xFF; + offset += sizeof(this->sor_pgs_precon_iters); + *(outbuffer + offset + 0) = (this->sor_pgs_iters >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->sor_pgs_iters >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->sor_pgs_iters >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->sor_pgs_iters >> (8 * 3)) & 0xFF; + offset += sizeof(this->sor_pgs_iters); + union { + double real; + uint64_t base; + } u_sor_pgs_w; + u_sor_pgs_w.real = this->sor_pgs_w; + *(outbuffer + offset + 0) = (u_sor_pgs_w.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_sor_pgs_w.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_sor_pgs_w.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_sor_pgs_w.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_sor_pgs_w.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_sor_pgs_w.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_sor_pgs_w.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_sor_pgs_w.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->sor_pgs_w); + union { + double real; + uint64_t base; + } u_sor_pgs_rms_error_tol; + u_sor_pgs_rms_error_tol.real = this->sor_pgs_rms_error_tol; + *(outbuffer + offset + 0) = (u_sor_pgs_rms_error_tol.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_sor_pgs_rms_error_tol.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_sor_pgs_rms_error_tol.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_sor_pgs_rms_error_tol.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_sor_pgs_rms_error_tol.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_sor_pgs_rms_error_tol.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_sor_pgs_rms_error_tol.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_sor_pgs_rms_error_tol.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->sor_pgs_rms_error_tol); + union { + double real; + uint64_t base; + } u_contact_surface_layer; + u_contact_surface_layer.real = this->contact_surface_layer; + *(outbuffer + offset + 0) = (u_contact_surface_layer.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_contact_surface_layer.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_contact_surface_layer.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_contact_surface_layer.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_contact_surface_layer.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_contact_surface_layer.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_contact_surface_layer.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_contact_surface_layer.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->contact_surface_layer); + union { + double real; + uint64_t base; + } u_contact_max_correcting_vel; + u_contact_max_correcting_vel.real = this->contact_max_correcting_vel; + *(outbuffer + offset + 0) = (u_contact_max_correcting_vel.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_contact_max_correcting_vel.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_contact_max_correcting_vel.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_contact_max_correcting_vel.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_contact_max_correcting_vel.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_contact_max_correcting_vel.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_contact_max_correcting_vel.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_contact_max_correcting_vel.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->contact_max_correcting_vel); + union { + double real; + uint64_t base; + } u_cfm; + u_cfm.real = this->cfm; + *(outbuffer + offset + 0) = (u_cfm.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_cfm.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_cfm.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_cfm.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_cfm.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_cfm.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_cfm.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_cfm.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->cfm); + union { + double real; + uint64_t base; + } u_erp; + u_erp.real = this->erp; + *(outbuffer + offset + 0) = (u_erp.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_erp.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_erp.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_erp.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_erp.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_erp.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_erp.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_erp.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->erp); + *(outbuffer + offset + 0) = (this->max_contacts >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->max_contacts >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->max_contacts >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->max_contacts >> (8 * 3)) & 0xFF; + offset += sizeof(this->max_contacts); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_auto_disable_bodies; + u_auto_disable_bodies.base = 0; + u_auto_disable_bodies.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->auto_disable_bodies = u_auto_disable_bodies.real; + offset += sizeof(this->auto_disable_bodies); + this->sor_pgs_precon_iters = ((uint32_t) (*(inbuffer + offset))); + this->sor_pgs_precon_iters |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->sor_pgs_precon_iters |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->sor_pgs_precon_iters |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->sor_pgs_precon_iters); + this->sor_pgs_iters = ((uint32_t) (*(inbuffer + offset))); + this->sor_pgs_iters |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->sor_pgs_iters |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->sor_pgs_iters |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->sor_pgs_iters); + union { + double real; + uint64_t base; + } u_sor_pgs_w; + u_sor_pgs_w.base = 0; + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->sor_pgs_w = u_sor_pgs_w.real; + offset += sizeof(this->sor_pgs_w); + union { + double real; + uint64_t base; + } u_sor_pgs_rms_error_tol; + u_sor_pgs_rms_error_tol.base = 0; + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->sor_pgs_rms_error_tol = u_sor_pgs_rms_error_tol.real; + offset += sizeof(this->sor_pgs_rms_error_tol); + union { + double real; + uint64_t base; + } u_contact_surface_layer; + u_contact_surface_layer.base = 0; + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->contact_surface_layer = u_contact_surface_layer.real; + offset += sizeof(this->contact_surface_layer); + union { + double real; + uint64_t base; + } u_contact_max_correcting_vel; + u_contact_max_correcting_vel.base = 0; + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->contact_max_correcting_vel = u_contact_max_correcting_vel.real; + offset += sizeof(this->contact_max_correcting_vel); + union { + double real; + uint64_t base; + } u_cfm; + u_cfm.base = 0; + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->cfm = u_cfm.real; + offset += sizeof(this->cfm); + union { + double real; + uint64_t base; + } u_erp; + u_erp.base = 0; + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->erp = u_erp.real; + offset += sizeof(this->erp); + this->max_contacts = ((uint32_t) (*(inbuffer + offset))); + this->max_contacts |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->max_contacts |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->max_contacts |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->max_contacts); + return offset; + } + + const char * getType(){ return "gazebo_msgs/ODEPhysics"; }; + const char * getMD5(){ return "667d56ddbd547918c32d1934503dc335"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetJointProperties.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetJointProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..981853d9daa0042f81fc76cfaf033feb2208f60c --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetJointProperties.h @@ -0,0 +1,128 @@ +#ifndef _ROS_SERVICE_SetJointProperties_h +#define _ROS_SERVICE_SetJointProperties_h +#include +#include +#include +#include "ros/msg.h" +#include "gazebo_msgs/ODEJointProperties.h" + +namespace gazebo_msgs +{ + +static const char SETJOINTPROPERTIES[] = "gazebo_msgs/SetJointProperties"; + + class SetJointPropertiesRequest : public ros::Msg + { + public: + typedef const char* _joint_name_type; + _joint_name_type joint_name; + typedef gazebo_msgs::ODEJointProperties _ode_joint_config_type; + _ode_joint_config_type ode_joint_config; + + SetJointPropertiesRequest(): + joint_name(""), + ode_joint_config() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_joint_name = strlen(this->joint_name); + varToArr(outbuffer + offset, length_joint_name); + offset += 4; + memcpy(outbuffer + offset, this->joint_name, length_joint_name); + offset += length_joint_name; + offset += this->ode_joint_config.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_joint_name; + arrToVar(length_joint_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_joint_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_joint_name-1]=0; + this->joint_name = (char *)(inbuffer + offset-1); + offset += length_joint_name; + offset += this->ode_joint_config.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return SETJOINTPROPERTIES; }; + const char * getMD5(){ return "331fd8f35fd27e3c1421175590258e26"; }; + + }; + + class SetJointPropertiesResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetJointPropertiesResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETJOINTPROPERTIES; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetJointProperties { + public: + typedef SetJointPropertiesRequest Request; + typedef SetJointPropertiesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetJointTrajectory.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetJointTrajectory.h new file mode 100644 index 0000000000000000000000000000000000000000..81146cee35e5c4bcdd166110d2595a9dea4c2465 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetJointTrajectory.h @@ -0,0 +1,170 @@ +#ifndef _ROS_SERVICE_SetJointTrajectory_h +#define _ROS_SERVICE_SetJointTrajectory_h +#include +#include +#include +#include "ros/msg.h" +#include "trajectory_msgs/JointTrajectory.h" +#include "geometry_msgs/Pose.h" + +namespace gazebo_msgs +{ + +static const char SETJOINTTRAJECTORY[] = "gazebo_msgs/SetJointTrajectory"; + + class SetJointTrajectoryRequest : public ros::Msg + { + public: + typedef const char* _model_name_type; + _model_name_type model_name; + typedef trajectory_msgs::JointTrajectory _joint_trajectory_type; + _joint_trajectory_type joint_trajectory; + typedef geometry_msgs::Pose _model_pose_type; + _model_pose_type model_pose; + typedef bool _set_model_pose_type; + _set_model_pose_type set_model_pose; + typedef bool _disable_physics_updates_type; + _disable_physics_updates_type disable_physics_updates; + + SetJointTrajectoryRequest(): + model_name(""), + joint_trajectory(), + model_pose(), + set_model_pose(0), + disable_physics_updates(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_model_name = strlen(this->model_name); + varToArr(outbuffer + offset, length_model_name); + offset += 4; + memcpy(outbuffer + offset, this->model_name, length_model_name); + offset += length_model_name; + offset += this->joint_trajectory.serialize(outbuffer + offset); + offset += this->model_pose.serialize(outbuffer + offset); + union { + bool real; + uint8_t base; + } u_set_model_pose; + u_set_model_pose.real = this->set_model_pose; + *(outbuffer + offset + 0) = (u_set_model_pose.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->set_model_pose); + union { + bool real; + uint8_t base; + } u_disable_physics_updates; + u_disable_physics_updates.real = this->disable_physics_updates; + *(outbuffer + offset + 0) = (u_disable_physics_updates.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->disable_physics_updates); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_model_name; + arrToVar(length_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_name-1]=0; + this->model_name = (char *)(inbuffer + offset-1); + offset += length_model_name; + offset += this->joint_trajectory.deserialize(inbuffer + offset); + offset += this->model_pose.deserialize(inbuffer + offset); + union { + bool real; + uint8_t base; + } u_set_model_pose; + u_set_model_pose.base = 0; + u_set_model_pose.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->set_model_pose = u_set_model_pose.real; + offset += sizeof(this->set_model_pose); + union { + bool real; + uint8_t base; + } u_disable_physics_updates; + u_disable_physics_updates.base = 0; + u_disable_physics_updates.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->disable_physics_updates = u_disable_physics_updates.real; + offset += sizeof(this->disable_physics_updates); + return offset; + } + + const char * getType(){ return SETJOINTTRAJECTORY; }; + const char * getMD5(){ return "649dd2eba5ffd358069238825f9f85ab"; }; + + }; + + class SetJointTrajectoryResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetJointTrajectoryResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETJOINTTRAJECTORY; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetJointTrajectory { + public: + typedef SetJointTrajectoryRequest Request; + typedef SetJointTrajectoryResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetLightProperties.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetLightProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..5243ae2861430a90990205de9f42d420844a7416 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetLightProperties.h @@ -0,0 +1,224 @@ +#ifndef _ROS_SERVICE_SetLightProperties_h +#define _ROS_SERVICE_SetLightProperties_h +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/ColorRGBA.h" + +namespace gazebo_msgs +{ + +static const char SETLIGHTPROPERTIES[] = "gazebo_msgs/SetLightProperties"; + + class SetLightPropertiesRequest : public ros::Msg + { + public: + typedef const char* _light_name_type; + _light_name_type light_name; + typedef std_msgs::ColorRGBA _diffuse_type; + _diffuse_type diffuse; + typedef double _attenuation_constant_type; + _attenuation_constant_type attenuation_constant; + typedef double _attenuation_linear_type; + _attenuation_linear_type attenuation_linear; + typedef double _attenuation_quadratic_type; + _attenuation_quadratic_type attenuation_quadratic; + + SetLightPropertiesRequest(): + light_name(""), + diffuse(), + attenuation_constant(0), + attenuation_linear(0), + attenuation_quadratic(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_light_name = strlen(this->light_name); + varToArr(outbuffer + offset, length_light_name); + offset += 4; + memcpy(outbuffer + offset, this->light_name, length_light_name); + offset += length_light_name; + offset += this->diffuse.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_attenuation_constant; + u_attenuation_constant.real = this->attenuation_constant; + *(outbuffer + offset + 0) = (u_attenuation_constant.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_attenuation_constant.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_attenuation_constant.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_attenuation_constant.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_attenuation_constant.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_attenuation_constant.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_attenuation_constant.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_attenuation_constant.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->attenuation_constant); + union { + double real; + uint64_t base; + } u_attenuation_linear; + u_attenuation_linear.real = this->attenuation_linear; + *(outbuffer + offset + 0) = (u_attenuation_linear.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_attenuation_linear.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_attenuation_linear.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_attenuation_linear.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_attenuation_linear.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_attenuation_linear.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_attenuation_linear.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_attenuation_linear.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->attenuation_linear); + union { + double real; + uint64_t base; + } u_attenuation_quadratic; + u_attenuation_quadratic.real = this->attenuation_quadratic; + *(outbuffer + offset + 0) = (u_attenuation_quadratic.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_attenuation_quadratic.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_attenuation_quadratic.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_attenuation_quadratic.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_attenuation_quadratic.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_attenuation_quadratic.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_attenuation_quadratic.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_attenuation_quadratic.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->attenuation_quadratic); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_light_name; + arrToVar(length_light_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_light_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_light_name-1]=0; + this->light_name = (char *)(inbuffer + offset-1); + offset += length_light_name; + offset += this->diffuse.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_attenuation_constant; + u_attenuation_constant.base = 0; + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->attenuation_constant = u_attenuation_constant.real; + offset += sizeof(this->attenuation_constant); + union { + double real; + uint64_t base; + } u_attenuation_linear; + u_attenuation_linear.base = 0; + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->attenuation_linear = u_attenuation_linear.real; + offset += sizeof(this->attenuation_linear); + union { + double real; + uint64_t base; + } u_attenuation_quadratic; + u_attenuation_quadratic.base = 0; + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->attenuation_quadratic = u_attenuation_quadratic.real; + offset += sizeof(this->attenuation_quadratic); + return offset; + } + + const char * getType(){ return SETLIGHTPROPERTIES; }; + const char * getMD5(){ return "73ad1ac5e9e312ddf7c74f38ad843f34"; }; + + }; + + class SetLightPropertiesResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetLightPropertiesResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETLIGHTPROPERTIES; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetLightProperties { + public: + typedef SetLightPropertiesRequest Request; + typedef SetLightPropertiesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetLinkProperties.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetLinkProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..3b0ae61ccfde44f78cb0f6730ecd8a20da16a0f6 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetLinkProperties.h @@ -0,0 +1,370 @@ +#ifndef _ROS_SERVICE_SetLinkProperties_h +#define _ROS_SERVICE_SetLinkProperties_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" + +namespace gazebo_msgs +{ + +static const char SETLINKPROPERTIES[] = "gazebo_msgs/SetLinkProperties"; + + class SetLinkPropertiesRequest : public ros::Msg + { + public: + typedef const char* _link_name_type; + _link_name_type link_name; + typedef geometry_msgs::Pose _com_type; + _com_type com; + typedef bool _gravity_mode_type; + _gravity_mode_type gravity_mode; + typedef double _mass_type; + _mass_type mass; + typedef double _ixx_type; + _ixx_type ixx; + typedef double _ixy_type; + _ixy_type ixy; + typedef double _ixz_type; + _ixz_type ixz; + typedef double _iyy_type; + _iyy_type iyy; + typedef double _iyz_type; + _iyz_type iyz; + typedef double _izz_type; + _izz_type izz; + + SetLinkPropertiesRequest(): + link_name(""), + com(), + gravity_mode(0), + mass(0), + ixx(0), + ixy(0), + ixz(0), + iyy(0), + iyz(0), + izz(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_link_name = strlen(this->link_name); + varToArr(outbuffer + offset, length_link_name); + offset += 4; + memcpy(outbuffer + offset, this->link_name, length_link_name); + offset += length_link_name; + offset += this->com.serialize(outbuffer + offset); + union { + bool real; + uint8_t base; + } u_gravity_mode; + u_gravity_mode.real = this->gravity_mode; + *(outbuffer + offset + 0) = (u_gravity_mode.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->gravity_mode); + union { + double real; + uint64_t base; + } u_mass; + u_mass.real = this->mass; + *(outbuffer + offset + 0) = (u_mass.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_mass.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_mass.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_mass.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_mass.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_mass.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_mass.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_mass.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->mass); + union { + double real; + uint64_t base; + } u_ixx; + u_ixx.real = this->ixx; + *(outbuffer + offset + 0) = (u_ixx.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixx.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixx.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixx.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixx.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixx.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixx.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixx.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixx); + union { + double real; + uint64_t base; + } u_ixy; + u_ixy.real = this->ixy; + *(outbuffer + offset + 0) = (u_ixy.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixy.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixy.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixy.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixy.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixy.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixy.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixy.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixy); + union { + double real; + uint64_t base; + } u_ixz; + u_ixz.real = this->ixz; + *(outbuffer + offset + 0) = (u_ixz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixz); + union { + double real; + uint64_t base; + } u_iyy; + u_iyy.real = this->iyy; + *(outbuffer + offset + 0) = (u_iyy.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_iyy.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_iyy.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_iyy.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_iyy.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_iyy.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_iyy.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_iyy.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->iyy); + union { + double real; + uint64_t base; + } u_iyz; + u_iyz.real = this->iyz; + *(outbuffer + offset + 0) = (u_iyz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_iyz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_iyz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_iyz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_iyz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_iyz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_iyz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_iyz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->iyz); + union { + double real; + uint64_t base; + } u_izz; + u_izz.real = this->izz; + *(outbuffer + offset + 0) = (u_izz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_izz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_izz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_izz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_izz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_izz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_izz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_izz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->izz); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_link_name; + arrToVar(length_link_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_link_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_link_name-1]=0; + this->link_name = (char *)(inbuffer + offset-1); + offset += length_link_name; + offset += this->com.deserialize(inbuffer + offset); + union { + bool real; + uint8_t base; + } u_gravity_mode; + u_gravity_mode.base = 0; + u_gravity_mode.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->gravity_mode = u_gravity_mode.real; + offset += sizeof(this->gravity_mode); + union { + double real; + uint64_t base; + } u_mass; + u_mass.base = 0; + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->mass = u_mass.real; + offset += sizeof(this->mass); + union { + double real; + uint64_t base; + } u_ixx; + u_ixx.base = 0; + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixx = u_ixx.real; + offset += sizeof(this->ixx); + union { + double real; + uint64_t base; + } u_ixy; + u_ixy.base = 0; + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixy = u_ixy.real; + offset += sizeof(this->ixy); + union { + double real; + uint64_t base; + } u_ixz; + u_ixz.base = 0; + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixz = u_ixz.real; + offset += sizeof(this->ixz); + union { + double real; + uint64_t base; + } u_iyy; + u_iyy.base = 0; + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->iyy = u_iyy.real; + offset += sizeof(this->iyy); + union { + double real; + uint64_t base; + } u_iyz; + u_iyz.base = 0; + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->iyz = u_iyz.real; + offset += sizeof(this->iyz); + union { + double real; + uint64_t base; + } u_izz; + u_izz.base = 0; + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->izz = u_izz.real; + offset += sizeof(this->izz); + return offset; + } + + const char * getType(){ return SETLINKPROPERTIES; }; + const char * getMD5(){ return "68ac74a4be01b165bc305b5ccdc45e91"; }; + + }; + + class SetLinkPropertiesResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetLinkPropertiesResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETLINKPROPERTIES; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetLinkProperties { + public: + typedef SetLinkPropertiesRequest Request; + typedef SetLinkPropertiesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetLinkState.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetLinkState.h new file mode 100644 index 0000000000000000000000000000000000000000..f089492a4d235b7cee253d91bfeb9504b18063f6 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetLinkState.h @@ -0,0 +1,111 @@ +#ifndef _ROS_SERVICE_SetLinkState_h +#define _ROS_SERVICE_SetLinkState_h +#include +#include +#include +#include "ros/msg.h" +#include "gazebo_msgs/LinkState.h" + +namespace gazebo_msgs +{ + +static const char SETLINKSTATE[] = "gazebo_msgs/SetLinkState"; + + class SetLinkStateRequest : public ros::Msg + { + public: + typedef gazebo_msgs::LinkState _link_state_type; + _link_state_type link_state; + + SetLinkStateRequest(): + link_state() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->link_state.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->link_state.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return SETLINKSTATE; }; + const char * getMD5(){ return "22a2c757d56911b6f27868159e9a872d"; }; + + }; + + class SetLinkStateResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetLinkStateResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETLINKSTATE; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetLinkState { + public: + typedef SetLinkStateRequest Request; + typedef SetLinkStateResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetModelConfiguration.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetModelConfiguration.h new file mode 100644 index 0000000000000000000000000000000000000000..d2da91bea16de1fc1c9b3a7ce30423754adfb9b7 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetModelConfiguration.h @@ -0,0 +1,228 @@ +#ifndef _ROS_SERVICE_SetModelConfiguration_h +#define _ROS_SERVICE_SetModelConfiguration_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char SETMODELCONFIGURATION[] = "gazebo_msgs/SetModelConfiguration"; + + class SetModelConfigurationRequest : public ros::Msg + { + public: + typedef const char* _model_name_type; + _model_name_type model_name; + typedef const char* _urdf_param_name_type; + _urdf_param_name_type urdf_param_name; + uint32_t joint_names_length; + typedef char* _joint_names_type; + _joint_names_type st_joint_names; + _joint_names_type * joint_names; + uint32_t joint_positions_length; + typedef double _joint_positions_type; + _joint_positions_type st_joint_positions; + _joint_positions_type * joint_positions; + + SetModelConfigurationRequest(): + model_name(""), + urdf_param_name(""), + joint_names_length(0), joint_names(NULL), + joint_positions_length(0), joint_positions(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_model_name = strlen(this->model_name); + varToArr(outbuffer + offset, length_model_name); + offset += 4; + memcpy(outbuffer + offset, this->model_name, length_model_name); + offset += length_model_name; + uint32_t length_urdf_param_name = strlen(this->urdf_param_name); + varToArr(outbuffer + offset, length_urdf_param_name); + offset += 4; + memcpy(outbuffer + offset, this->urdf_param_name, length_urdf_param_name); + offset += length_urdf_param_name; + *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_names_length); + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_joint_namesi = strlen(this->joint_names[i]); + varToArr(outbuffer + offset, length_joint_namesi); + offset += 4; + memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); + offset += length_joint_namesi; + } + *(outbuffer + offset + 0) = (this->joint_positions_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_positions_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_positions_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_positions_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_positions_length); + for( uint32_t i = 0; i < joint_positions_length; i++){ + union { + double real; + uint64_t base; + } u_joint_positionsi; + u_joint_positionsi.real = this->joint_positions[i]; + *(outbuffer + offset + 0) = (u_joint_positionsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_joint_positionsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_joint_positionsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_joint_positionsi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_joint_positionsi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_joint_positionsi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_joint_positionsi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_joint_positionsi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->joint_positions[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_model_name; + arrToVar(length_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_name-1]=0; + this->model_name = (char *)(inbuffer + offset-1); + offset += length_model_name; + uint32_t length_urdf_param_name; + arrToVar(length_urdf_param_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_urdf_param_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_urdf_param_name-1]=0; + this->urdf_param_name = (char *)(inbuffer + offset-1); + offset += length_urdf_param_name; + uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_names_length); + if(joint_names_lengthT > joint_names_length) + this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); + joint_names_length = joint_names_lengthT; + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_st_joint_names; + arrToVar(length_st_joint_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_joint_names-1]=0; + this->st_joint_names = (char *)(inbuffer + offset-1); + offset += length_st_joint_names; + memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); + } + uint32_t joint_positions_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_positions_length); + if(joint_positions_lengthT > joint_positions_length) + this->joint_positions = (double*)realloc(this->joint_positions, joint_positions_lengthT * sizeof(double)); + joint_positions_length = joint_positions_lengthT; + for( uint32_t i = 0; i < joint_positions_length; i++){ + union { + double real; + uint64_t base; + } u_st_joint_positions; + u_st_joint_positions.base = 0; + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_joint_positions = u_st_joint_positions.real; + offset += sizeof(this->st_joint_positions); + memcpy( &(this->joint_positions[i]), &(this->st_joint_positions), sizeof(double)); + } + return offset; + } + + const char * getType(){ return SETMODELCONFIGURATION; }; + const char * getMD5(){ return "160eae60f51fabff255480c70afa289f"; }; + + }; + + class SetModelConfigurationResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetModelConfigurationResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETMODELCONFIGURATION; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetModelConfiguration { + public: + typedef SetModelConfigurationRequest Request; + typedef SetModelConfigurationResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetModelState.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetModelState.h new file mode 100644 index 0000000000000000000000000000000000000000..ef251ad6309c0bf01685417fae3b06e0011e5b71 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetModelState.h @@ -0,0 +1,111 @@ +#ifndef _ROS_SERVICE_SetModelState_h +#define _ROS_SERVICE_SetModelState_h +#include +#include +#include +#include "ros/msg.h" +#include "gazebo_msgs/ModelState.h" + +namespace gazebo_msgs +{ + +static const char SETMODELSTATE[] = "gazebo_msgs/SetModelState"; + + class SetModelStateRequest : public ros::Msg + { + public: + typedef gazebo_msgs::ModelState _model_state_type; + _model_state_type model_state; + + SetModelStateRequest(): + model_state() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->model_state.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->model_state.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return SETMODELSTATE; }; + const char * getMD5(){ return "cb042b0e91880f4661b29ea5b6234350"; }; + + }; + + class SetModelStateResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetModelStateResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETMODELSTATE; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetModelState { + public: + typedef SetModelStateRequest Request; + typedef SetModelStateResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetPhysicsProperties.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetPhysicsProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..ea160b5142063181af9639cbbb91d3811a40178d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SetPhysicsProperties.h @@ -0,0 +1,181 @@ +#ifndef _ROS_SERVICE_SetPhysicsProperties_h +#define _ROS_SERVICE_SetPhysicsProperties_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Vector3.h" +#include "gazebo_msgs/ODEPhysics.h" + +namespace gazebo_msgs +{ + +static const char SETPHYSICSPROPERTIES[] = "gazebo_msgs/SetPhysicsProperties"; + + class SetPhysicsPropertiesRequest : public ros::Msg + { + public: + typedef double _time_step_type; + _time_step_type time_step; + typedef double _max_update_rate_type; + _max_update_rate_type max_update_rate; + typedef geometry_msgs::Vector3 _gravity_type; + _gravity_type gravity; + typedef gazebo_msgs::ODEPhysics _ode_config_type; + _ode_config_type ode_config; + + SetPhysicsPropertiesRequest(): + time_step(0), + max_update_rate(0), + gravity(), + ode_config() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_time_step; + u_time_step.real = this->time_step; + *(outbuffer + offset + 0) = (u_time_step.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_time_step.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_time_step.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_time_step.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_time_step.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_time_step.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_time_step.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_time_step.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->time_step); + union { + double real; + uint64_t base; + } u_max_update_rate; + u_max_update_rate.real = this->max_update_rate; + *(outbuffer + offset + 0) = (u_max_update_rate.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_update_rate.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_update_rate.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_update_rate.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max_update_rate.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max_update_rate.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max_update_rate.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max_update_rate.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max_update_rate); + offset += this->gravity.serialize(outbuffer + offset); + offset += this->ode_config.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_time_step; + u_time_step.base = 0; + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->time_step = u_time_step.real; + offset += sizeof(this->time_step); + union { + double real; + uint64_t base; + } u_max_update_rate; + u_max_update_rate.base = 0; + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max_update_rate = u_max_update_rate.real; + offset += sizeof(this->max_update_rate); + offset += this->gravity.deserialize(inbuffer + offset); + offset += this->ode_config.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return SETPHYSICSPROPERTIES; }; + const char * getMD5(){ return "abd9f82732b52b92e9d6bb36e6a82452"; }; + + }; + + class SetPhysicsPropertiesResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetPhysicsPropertiesResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETPHYSICSPROPERTIES; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetPhysicsProperties { + public: + typedef SetPhysicsPropertiesRequest Request; + typedef SetPhysicsPropertiesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SpawnModel.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SpawnModel.h new file mode 100644 index 0000000000000000000000000000000000000000..215b0019d671282b0eed7b1e2f31f5e66f750885 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/SpawnModel.h @@ -0,0 +1,179 @@ +#ifndef _ROS_SERVICE_SpawnModel_h +#define _ROS_SERVICE_SpawnModel_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" + +namespace gazebo_msgs +{ + +static const char SPAWNMODEL[] = "gazebo_msgs/SpawnModel"; + + class SpawnModelRequest : public ros::Msg + { + public: + typedef const char* _model_name_type; + _model_name_type model_name; + typedef const char* _model_xml_type; + _model_xml_type model_xml; + typedef const char* _robot_namespace_type; + _robot_namespace_type robot_namespace; + typedef geometry_msgs::Pose _initial_pose_type; + _initial_pose_type initial_pose; + typedef const char* _reference_frame_type; + _reference_frame_type reference_frame; + + SpawnModelRequest(): + model_name(""), + model_xml(""), + robot_namespace(""), + initial_pose(), + reference_frame("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_model_name = strlen(this->model_name); + varToArr(outbuffer + offset, length_model_name); + offset += 4; + memcpy(outbuffer + offset, this->model_name, length_model_name); + offset += length_model_name; + uint32_t length_model_xml = strlen(this->model_xml); + varToArr(outbuffer + offset, length_model_xml); + offset += 4; + memcpy(outbuffer + offset, this->model_xml, length_model_xml); + offset += length_model_xml; + uint32_t length_robot_namespace = strlen(this->robot_namespace); + varToArr(outbuffer + offset, length_robot_namespace); + offset += 4; + memcpy(outbuffer + offset, this->robot_namespace, length_robot_namespace); + offset += length_robot_namespace; + offset += this->initial_pose.serialize(outbuffer + offset); + uint32_t length_reference_frame = strlen(this->reference_frame); + varToArr(outbuffer + offset, length_reference_frame); + offset += 4; + memcpy(outbuffer + offset, this->reference_frame, length_reference_frame); + offset += length_reference_frame; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_model_name; + arrToVar(length_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_name-1]=0; + this->model_name = (char *)(inbuffer + offset-1); + offset += length_model_name; + uint32_t length_model_xml; + arrToVar(length_model_xml, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_xml; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_xml-1]=0; + this->model_xml = (char *)(inbuffer + offset-1); + offset += length_model_xml; + uint32_t length_robot_namespace; + arrToVar(length_robot_namespace, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_robot_namespace; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_robot_namespace-1]=0; + this->robot_namespace = (char *)(inbuffer + offset-1); + offset += length_robot_namespace; + offset += this->initial_pose.deserialize(inbuffer + offset); + uint32_t length_reference_frame; + arrToVar(length_reference_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_reference_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_reference_frame-1]=0; + this->reference_frame = (char *)(inbuffer + offset-1); + offset += length_reference_frame; + return offset; + } + + const char * getType(){ return SPAWNMODEL; }; + const char * getMD5(){ return "6d0eba5753761cd57e6263a056b79930"; }; + + }; + + class SpawnModelResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SpawnModelResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SPAWNMODEL; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SpawnModel { + public: + typedef SpawnModelRequest Request; + typedef SpawnModelResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/WorldState.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/WorldState.h new file mode 100644 index 0000000000000000000000000000000000000000..43eb25694281ccda142d0b3eaddc6648e9d8b776 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/gazebo_msgs/WorldState.h @@ -0,0 +1,159 @@ +#ifndef _ROS_gazebo_msgs_WorldState_h +#define _ROS_gazebo_msgs_WorldState_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Twist.h" +#include "geometry_msgs/Wrench.h" + +namespace gazebo_msgs +{ + + class WorldState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t name_length; + typedef char* _name_type; + _name_type st_name; + _name_type * name; + uint32_t pose_length; + typedef geometry_msgs::Pose _pose_type; + _pose_type st_pose; + _pose_type * pose; + uint32_t twist_length; + typedef geometry_msgs::Twist _twist_type; + _twist_type st_twist; + _twist_type * twist; + uint32_t wrench_length; + typedef geometry_msgs::Wrench _wrench_type; + _wrench_type st_wrench; + _wrench_type * wrench; + + WorldState(): + header(), + name_length(0), name(NULL), + pose_length(0), pose(NULL), + twist_length(0), twist(NULL), + wrench_length(0), wrench(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->name_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->name_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->name_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->name_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->name_length); + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_namei = strlen(this->name[i]); + varToArr(outbuffer + offset, length_namei); + offset += 4; + memcpy(outbuffer + offset, this->name[i], length_namei); + offset += length_namei; + } + *(outbuffer + offset + 0) = (this->pose_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->pose_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->pose_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->pose_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->pose_length); + for( uint32_t i = 0; i < pose_length; i++){ + offset += this->pose[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->twist_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->twist_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->twist_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->twist_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->twist_length); + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->twist[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->wrench_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->wrench_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->wrench_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->wrench_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->wrench_length); + for( uint32_t i = 0; i < wrench_length; i++){ + offset += this->wrench[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t name_lengthT = ((uint32_t) (*(inbuffer + offset))); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->name_length); + if(name_lengthT > name_length) + this->name = (char**)realloc(this->name, name_lengthT * sizeof(char*)); + name_length = name_lengthT; + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_st_name; + arrToVar(length_st_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_name-1]=0; + this->st_name = (char *)(inbuffer + offset-1); + offset += length_st_name; + memcpy( &(this->name[i]), &(this->st_name), sizeof(char*)); + } + uint32_t pose_lengthT = ((uint32_t) (*(inbuffer + offset))); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->pose_length); + if(pose_lengthT > pose_length) + this->pose = (geometry_msgs::Pose*)realloc(this->pose, pose_lengthT * sizeof(geometry_msgs::Pose)); + pose_length = pose_lengthT; + for( uint32_t i = 0; i < pose_length; i++){ + offset += this->st_pose.deserialize(inbuffer + offset); + memcpy( &(this->pose[i]), &(this->st_pose), sizeof(geometry_msgs::Pose)); + } + uint32_t twist_lengthT = ((uint32_t) (*(inbuffer + offset))); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->twist_length); + if(twist_lengthT > twist_length) + this->twist = (geometry_msgs::Twist*)realloc(this->twist, twist_lengthT * sizeof(geometry_msgs::Twist)); + twist_length = twist_lengthT; + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->st_twist.deserialize(inbuffer + offset); + memcpy( &(this->twist[i]), &(this->st_twist), sizeof(geometry_msgs::Twist)); + } + uint32_t wrench_lengthT = ((uint32_t) (*(inbuffer + offset))); + wrench_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + wrench_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + wrench_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->wrench_length); + if(wrench_lengthT > wrench_length) + this->wrench = (geometry_msgs::Wrench*)realloc(this->wrench, wrench_lengthT * sizeof(geometry_msgs::Wrench)); + wrench_length = wrench_lengthT; + for( uint32_t i = 0; i < wrench_length; i++){ + offset += this->st_wrench.deserialize(inbuffer + offset); + memcpy( &(this->wrench[i]), &(this->st_wrench), sizeof(geometry_msgs::Wrench)); + } + return offset; + } + + const char * getType(){ return "gazebo_msgs/WorldState"; }; + const char * getMD5(){ return "de1a9de3ab7ba97ac0e9ec01a4eb481e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Accel.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Accel.h new file mode 100644 index 0000000000000000000000000000000000000000..b5931f673cd76fbc030e42a02f9364752ecc5726 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Accel.h @@ -0,0 +1,49 @@ +#ifndef _ROS_geometry_msgs_Accel_h +#define _ROS_geometry_msgs_Accel_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Vector3.h" + +namespace geometry_msgs +{ + + class Accel : public ros::Msg + { + public: + typedef geometry_msgs::Vector3 _linear_type; + _linear_type linear; + typedef geometry_msgs::Vector3 _angular_type; + _angular_type angular; + + Accel(): + linear(), + angular() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->linear.serialize(outbuffer + offset); + offset += this->angular.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->linear.deserialize(inbuffer + offset); + offset += this->angular.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Accel"; }; + const char * getMD5(){ return "9f195f881246fdfa2798d1d3eebca84a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/AccelStamped.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/AccelStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..d7f785804e678ba810707dafe0dc99b222d19467 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/AccelStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_AccelStamped_h +#define _ROS_geometry_msgs_AccelStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Accel.h" + +namespace geometry_msgs +{ + + class AccelStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Accel _accel_type; + _accel_type accel; + + AccelStamped(): + header(), + accel() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->accel.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->accel.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/AccelStamped"; }; + const char * getMD5(){ return "d8a98a5d81351b6eb0578c78557e7659"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/AccelWithCovariance.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/AccelWithCovariance.h new file mode 100644 index 0000000000000000000000000000000000000000..9ce6ca28726a3552d0d3476940e4d393ea2264ec --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/AccelWithCovariance.h @@ -0,0 +1,79 @@ +#ifndef _ROS_geometry_msgs_AccelWithCovariance_h +#define _ROS_geometry_msgs_AccelWithCovariance_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Accel.h" + +namespace geometry_msgs +{ + + class AccelWithCovariance : public ros::Msg + { + public: + typedef geometry_msgs::Accel _accel_type; + _accel_type accel; + double covariance[36]; + + AccelWithCovariance(): + accel(), + covariance() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->accel.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.real = this->covariance[i]; + *(outbuffer + offset + 0) = (u_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->accel.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.base = 0; + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->covariance[i] = u_covariancei.real; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + const char * getType(){ return "geometry_msgs/AccelWithCovariance"; }; + const char * getMD5(){ return "ad5a718d699c6be72a02b8d6a139f334"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/AccelWithCovarianceStamped.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/AccelWithCovarianceStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..3153d39bc160828858eff4e2b7b5a0f3a469cbeb --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/AccelWithCovarianceStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_AccelWithCovarianceStamped_h +#define _ROS_geometry_msgs_AccelWithCovarianceStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/AccelWithCovariance.h" + +namespace geometry_msgs +{ + + class AccelWithCovarianceStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::AccelWithCovariance _accel_type; + _accel_type accel; + + AccelWithCovarianceStamped(): + header(), + accel() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->accel.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->accel.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/AccelWithCovarianceStamped"; }; + const char * getMD5(){ return "96adb295225031ec8d57fb4251b0a886"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Inertia.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Inertia.h new file mode 100644 index 0000000000000000000000000000000000000000..4c487c058aea418012129d671de5eb64d1def7e9 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Inertia.h @@ -0,0 +1,268 @@ +#ifndef _ROS_geometry_msgs_Inertia_h +#define _ROS_geometry_msgs_Inertia_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Vector3.h" + +namespace geometry_msgs +{ + + class Inertia : public ros::Msg + { + public: + typedef double _m_type; + _m_type m; + typedef geometry_msgs::Vector3 _com_type; + _com_type com; + typedef double _ixx_type; + _ixx_type ixx; + typedef double _ixy_type; + _ixy_type ixy; + typedef double _ixz_type; + _ixz_type ixz; + typedef double _iyy_type; + _iyy_type iyy; + typedef double _iyz_type; + _iyz_type iyz; + typedef double _izz_type; + _izz_type izz; + + Inertia(): + m(0), + com(), + ixx(0), + ixy(0), + ixz(0), + iyy(0), + iyz(0), + izz(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_m; + u_m.real = this->m; + *(outbuffer + offset + 0) = (u_m.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_m.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_m.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_m.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_m.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_m.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_m.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_m.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->m); + offset += this->com.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_ixx; + u_ixx.real = this->ixx; + *(outbuffer + offset + 0) = (u_ixx.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixx.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixx.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixx.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixx.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixx.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixx.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixx.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixx); + union { + double real; + uint64_t base; + } u_ixy; + u_ixy.real = this->ixy; + *(outbuffer + offset + 0) = (u_ixy.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixy.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixy.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixy.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixy.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixy.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixy.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixy.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixy); + union { + double real; + uint64_t base; + } u_ixz; + u_ixz.real = this->ixz; + *(outbuffer + offset + 0) = (u_ixz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixz); + union { + double real; + uint64_t base; + } u_iyy; + u_iyy.real = this->iyy; + *(outbuffer + offset + 0) = (u_iyy.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_iyy.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_iyy.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_iyy.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_iyy.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_iyy.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_iyy.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_iyy.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->iyy); + union { + double real; + uint64_t base; + } u_iyz; + u_iyz.real = this->iyz; + *(outbuffer + offset + 0) = (u_iyz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_iyz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_iyz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_iyz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_iyz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_iyz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_iyz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_iyz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->iyz); + union { + double real; + uint64_t base; + } u_izz; + u_izz.real = this->izz; + *(outbuffer + offset + 0) = (u_izz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_izz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_izz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_izz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_izz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_izz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_izz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_izz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->izz); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_m; + u_m.base = 0; + u_m.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->m = u_m.real; + offset += sizeof(this->m); + offset += this->com.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_ixx; + u_ixx.base = 0; + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixx = u_ixx.real; + offset += sizeof(this->ixx); + union { + double real; + uint64_t base; + } u_ixy; + u_ixy.base = 0; + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixy = u_ixy.real; + offset += sizeof(this->ixy); + union { + double real; + uint64_t base; + } u_ixz; + u_ixz.base = 0; + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixz = u_ixz.real; + offset += sizeof(this->ixz); + union { + double real; + uint64_t base; + } u_iyy; + u_iyy.base = 0; + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->iyy = u_iyy.real; + offset += sizeof(this->iyy); + union { + double real; + uint64_t base; + } u_iyz; + u_iyz.base = 0; + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->iyz = u_iyz.real; + offset += sizeof(this->iyz); + union { + double real; + uint64_t base; + } u_izz; + u_izz.base = 0; + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->izz = u_izz.real; + offset += sizeof(this->izz); + return offset; + } + + const char * getType(){ return "geometry_msgs/Inertia"; }; + const char * getMD5(){ return "1d26e4bb6c83ff141c5cf0d883c2b0fe"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/InertiaStamped.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/InertiaStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..2d8c94408c51f05f44a7a7b9dd07575108b03009 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/InertiaStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_InertiaStamped_h +#define _ROS_geometry_msgs_InertiaStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Inertia.h" + +namespace geometry_msgs +{ + + class InertiaStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Inertia _inertia_type; + _inertia_type inertia; + + InertiaStamped(): + header(), + inertia() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->inertia.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->inertia.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/InertiaStamped"; }; + const char * getMD5(){ return "ddee48caeab5a966c5e8d166654a9ac7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Point.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Point.h new file mode 100644 index 0000000000000000000000000000000000000000..4764c84c8a87274abcbfddccf70a0a0b2c119e5d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Point.h @@ -0,0 +1,134 @@ +#ifndef _ROS_geometry_msgs_Point_h +#define _ROS_geometry_msgs_Point_h + +#include +#include +#include +#include "../ros/msg.h" + +namespace geometry_msgs +{ + + class Point : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _z_type; + _z_type z; + + Point(): + x(0), + y(0), + z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.real = this->z; + *(outbuffer + offset + 0) = (u_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.base = 0; + u_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->z = u_z.real; + offset += sizeof(this->z); + return offset; + } + + const char * getType(){ return "geometry_msgs/Point"; }; + const char * getMD5(){ return "4a842b65f413084dc2b10fb484ea7f17"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Point32.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Point32.h new file mode 100644 index 0000000000000000000000000000000000000000..8c3b572a3a632122f5a27523c0fb6356c2df048c --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Point32.h @@ -0,0 +1,110 @@ +#ifndef _ROS_geometry_msgs_Point32_h +#define _ROS_geometry_msgs_Point32_h + +#include +#include +#include +#include "ros/msg.h" + +namespace geometry_msgs +{ + + class Point32 : public ros::Msg + { + public: + typedef float _x_type; + _x_type x; + typedef float _y_type; + _y_type y; + typedef float _z_type; + _z_type z; + + Point32(): + x(0), + y(0), + z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_z; + u_z.real = this->z; + *(outbuffer + offset + 0) = (u_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_z.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->x = u_x.real; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->y = u_y.real; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_z; + u_z.base = 0; + u_z.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_z.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_z.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_z.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->z = u_z.real; + offset += sizeof(this->z); + return offset; + } + + const char * getType(){ return "geometry_msgs/Point32"; }; + const char * getMD5(){ return "cc153912f1453b708d221682bc23d9ac"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/PointStamped.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/PointStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..ce24530c64615703d9da2eb0fc32505593c3aaad --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/PointStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_PointStamped_h +#define _ROS_geometry_msgs_PointStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Point.h" + +namespace geometry_msgs +{ + + class PointStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Point _point_type; + _point_type point; + + PointStamped(): + header(), + point() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->point.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->point.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/PointStamped"; }; + const char * getMD5(){ return "c63aecb41bfdfd6b7e1fac37c7cbe7bf"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Polygon.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Polygon.h new file mode 100644 index 0000000000000000000000000000000000000000..8ff3276fae77860328542ac3891e8c30b346c289 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Polygon.h @@ -0,0 +1,64 @@ +#ifndef _ROS_geometry_msgs_Polygon_h +#define _ROS_geometry_msgs_Polygon_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Point32.h" + +namespace geometry_msgs +{ + + class Polygon : public ros::Msg + { + public: + uint32_t points_length; + typedef geometry_msgs::Point32 _points_type; + _points_type st_points; + _points_type * points; + + Polygon(): + points_length(0), points(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->points_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->points_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->points_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->points_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->points_length); + for( uint32_t i = 0; i < points_length; i++){ + offset += this->points[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t points_lengthT = ((uint32_t) (*(inbuffer + offset))); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->points_length); + if(points_lengthT > points_length) + this->points = (geometry_msgs::Point32*)realloc(this->points, points_lengthT * sizeof(geometry_msgs::Point32)); + points_length = points_lengthT; + for( uint32_t i = 0; i < points_length; i++){ + offset += this->st_points.deserialize(inbuffer + offset); + memcpy( &(this->points[i]), &(this->st_points), sizeof(geometry_msgs::Point32)); + } + return offset; + } + + const char * getType(){ return "geometry_msgs/Polygon"; }; + const char * getMD5(){ return "cd60a26494a087f577976f0329fa120e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/PolygonStamped.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/PolygonStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..badc359a3ab7e4bc9d4220e424674e99be58f5ea --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/PolygonStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_PolygonStamped_h +#define _ROS_geometry_msgs_PolygonStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Polygon.h" + +namespace geometry_msgs +{ + + class PolygonStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Polygon _polygon_type; + _polygon_type polygon; + + PolygonStamped(): + header(), + polygon() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->polygon.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->polygon.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/PolygonStamped"; }; + const char * getMD5(){ return "c6be8f7dc3bee7fe9e8d296070f53340"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Pose.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Pose.h new file mode 100644 index 0000000000000000000000000000000000000000..1a9f46ca69f4b4251e06eb1258ed5cf1247ba15f --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Pose.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_Pose_h +#define _ROS_geometry_msgs_Pose_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../geometry_msgs/Point.h" +#include "../geometry_msgs/Quaternion.h" + +namespace geometry_msgs +{ + + class Pose : public ros::Msg + { + public: + typedef geometry_msgs::Point _position_type; + _position_type position; + typedef geometry_msgs::Quaternion _orientation_type; + _orientation_type orientation; + + Pose(): + position(), + orientation() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->position.serialize(outbuffer + offset); + offset += this->orientation.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->position.deserialize(inbuffer + offset); + offset += this->orientation.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Pose"; }; + const char * getMD5(){ return "e45d45a5a1ce597b249e23fb30fc871f"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Pose2D.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Pose2D.h new file mode 100644 index 0000000000000000000000000000000000000000..2858588075a54e4fa24390fe0f95f152a1a4ba56 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Pose2D.h @@ -0,0 +1,134 @@ +#ifndef _ROS_geometry_msgs_Pose2D_h +#define _ROS_geometry_msgs_Pose2D_h + +#include +#include +#include +#include "ros/msg.h" + +namespace geometry_msgs +{ + + class Pose2D : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _theta_type; + _theta_type theta; + + Pose2D(): + x(0), + y(0), + theta(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_theta; + u_theta.real = this->theta; + *(outbuffer + offset + 0) = (u_theta.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_theta.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_theta.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_theta.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_theta.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_theta.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_theta.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_theta.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->theta); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_theta; + u_theta.base = 0; + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->theta = u_theta.real; + offset += sizeof(this->theta); + return offset; + } + + const char * getType(){ return "geometry_msgs/Pose2D"; }; + const char * getMD5(){ return "938fa65709584ad8e77d238529be13b8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseArray.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseArray.h new file mode 100644 index 0000000000000000000000000000000000000000..9e6a89e0ce2071b01bdbe85351dc0b9cb0a84146 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseArray.h @@ -0,0 +1,70 @@ +#ifndef _ROS_geometry_msgs_PoseArray_h +#define _ROS_geometry_msgs_PoseArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" + +namespace geometry_msgs +{ + + class PoseArray : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t poses_length; + typedef geometry_msgs::Pose _poses_type; + _poses_type st_poses; + _poses_type * poses; + + PoseArray(): + header(), + poses_length(0), poses(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->poses_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->poses_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->poses_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->poses_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->poses_length); + for( uint32_t i = 0; i < poses_length; i++){ + offset += this->poses[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t poses_lengthT = ((uint32_t) (*(inbuffer + offset))); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->poses_length); + if(poses_lengthT > poses_length) + this->poses = (geometry_msgs::Pose*)realloc(this->poses, poses_lengthT * sizeof(geometry_msgs::Pose)); + poses_length = poses_lengthT; + for( uint32_t i = 0; i < poses_length; i++){ + offset += this->st_poses.deserialize(inbuffer + offset); + memcpy( &(this->poses[i]), &(this->st_poses), sizeof(geometry_msgs::Pose)); + } + return offset; + } + + const char * getType(){ return "geometry_msgs/PoseArray"; }; + const char * getMD5(){ return "916c28c5764443f268b296bb671b9d97"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseStamped.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..cb79251f2fe602474ecacae4f5f28884e114d046 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_PoseStamped_h +#define _ROS_geometry_msgs_PoseStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" + +namespace geometry_msgs +{ + + class PoseStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + + PoseStamped(): + header(), + pose() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->pose.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->pose.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/PoseStamped"; }; + const char * getMD5(){ return "d3812c3cbc69362b77dc0b19b345f8f5"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseWithCovariance.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseWithCovariance.h new file mode 100644 index 0000000000000000000000000000000000000000..92cb1cea9f049e310fad593f4d535800b2d1bc9e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseWithCovariance.h @@ -0,0 +1,79 @@ +#ifndef _ROS_geometry_msgs_PoseWithCovariance_h +#define _ROS_geometry_msgs_PoseWithCovariance_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../geometry_msgs/Pose.h" + +namespace geometry_msgs +{ + + class PoseWithCovariance : public ros::Msg + { + public: + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + double covariance[36]; + + PoseWithCovariance(): + pose(), + covariance() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->pose.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.real = this->covariance[i]; + *(outbuffer + offset + 0) = (u_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->pose.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.base = 0; + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->covariance[i] = u_covariancei.real; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + const char * getType(){ return "geometry_msgs/PoseWithCovariance"; }; + const char * getMD5(){ return "c23e848cf1b7533a8d7c259073a97e6f"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseWithCovarianceStamped.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseWithCovarianceStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..db623cda0de35053b2576af258b9ad8f53de320a --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/PoseWithCovarianceStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_PoseWithCovarianceStamped_h +#define _ROS_geometry_msgs_PoseWithCovarianceStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/PoseWithCovariance.h" + +namespace geometry_msgs +{ + + class PoseWithCovarianceStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::PoseWithCovariance _pose_type; + _pose_type pose; + + PoseWithCovarianceStamped(): + header(), + pose() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->pose.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->pose.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/PoseWithCovarianceStamped"; }; + const char * getMD5(){ return "953b798c0f514ff060a53a3498ce6246"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Quaternion.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Quaternion.h new file mode 100644 index 0000000000000000000000000000000000000000..19f4bb8d721c67a354bab4ce3e0cdcc30a29105d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Quaternion.h @@ -0,0 +1,166 @@ +#ifndef _ROS_geometry_msgs_Quaternion_h +#define _ROS_geometry_msgs_Quaternion_h + +#include +#include +#include +#include "../ros/msg.h" + +namespace geometry_msgs +{ + + class Quaternion : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _z_type; + _z_type z; + typedef double _w_type; + _w_type w; + + Quaternion(): + x(0), + y(0), + z(0), + w(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.real = this->z; + *(outbuffer + offset + 0) = (u_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->z); + union { + double real; + uint64_t base; + } u_w; + u_w.real = this->w; + *(outbuffer + offset + 0) = (u_w.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_w.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_w.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_w.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_w.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_w.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_w.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_w.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->w); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.base = 0; + u_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->z = u_z.real; + offset += sizeof(this->z); + union { + double real; + uint64_t base; + } u_w; + u_w.base = 0; + u_w.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->w = u_w.real; + offset += sizeof(this->w); + return offset; + } + + const char * getType(){ return "geometry_msgs/Quaternion"; }; + const char * getMD5(){ return "a779879fadf0160734f906b8c19c7004"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/QuaternionStamped.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/QuaternionStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..626358d0bd362808056532e586ec17a3e4052271 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/QuaternionStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_QuaternionStamped_h +#define _ROS_geometry_msgs_QuaternionStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Quaternion.h" + +namespace geometry_msgs +{ + + class QuaternionStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Quaternion _quaternion_type; + _quaternion_type quaternion; + + QuaternionStamped(): + header(), + quaternion() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->quaternion.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->quaternion.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/QuaternionStamped"; }; + const char * getMD5(){ return "e57f1e547e0e1fd13504588ffc8334e2"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Transform.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Transform.h new file mode 100644 index 0000000000000000000000000000000000000000..967eabb4b32cc0a2e01c62f9ee13394c8c46270f --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Transform.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_Transform_h +#define _ROS_geometry_msgs_Transform_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../geometry_msgs/Vector3.h" +#include "../geometry_msgs/Quaternion.h" + +namespace geometry_msgs +{ + + class Transform : public ros::Msg + { + public: + typedef geometry_msgs::Vector3 _translation_type; + _translation_type translation; + typedef geometry_msgs::Quaternion _rotation_type; + _rotation_type rotation; + + Transform(): + translation(), + rotation() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->translation.serialize(outbuffer + offset); + offset += this->rotation.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->translation.deserialize(inbuffer + offset); + offset += this->rotation.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Transform"; }; + const char * getMD5(){ return "ac9eff44abf714214112b05d54a3cf9b"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/TransformStamped.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/TransformStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..ef3f7a8039281c2607f412f2c5e21bc4cd2653fd --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/TransformStamped.h @@ -0,0 +1,67 @@ +#ifndef _ROS_geometry_msgs_TransformStamped_h +#define _ROS_geometry_msgs_TransformStamped_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../std_msgs/Header.h" +#include "../geometry_msgs/Transform.h" + +namespace geometry_msgs +{ + + class TransformStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _child_frame_id_type; + _child_frame_id_type child_frame_id; + typedef geometry_msgs::Transform _transform_type; + _transform_type transform; + + TransformStamped(): + header(), + child_frame_id(""), + transform() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_child_frame_id = strlen(this->child_frame_id); + varToArr(outbuffer + offset, length_child_frame_id); + offset += 4; + memcpy(outbuffer + offset, this->child_frame_id, length_child_frame_id); + offset += length_child_frame_id; + offset += this->transform.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_child_frame_id; + arrToVar(length_child_frame_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_child_frame_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_child_frame_id-1]=0; + this->child_frame_id = (char *)(inbuffer + offset-1); + offset += length_child_frame_id; + offset += this->transform.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/TransformStamped"; }; + const char * getMD5(){ return "b5764a33bfeb3588febc2682852579b0"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Twist.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Twist.h new file mode 100644 index 0000000000000000000000000000000000000000..a6f980ad9c1c6250fc94580dfe1ad4c0d1f67116 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Twist.h @@ -0,0 +1,51 @@ +#ifndef _ROS_geometry_msgs_Twist_h +#define _ROS_geometry_msgs_Twist_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../geometry_msgs/Vector3.h" + +namespace geometry_msgs +{ + + class Twist : public ros::Msg + { + public: + typedef geometry_msgs::Vector3 _linear_type; + _linear_type linear; + typedef geometry_msgs::Vector3 _angular_type; + _angular_type angular; + + Twist(): + linear(), + angular() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->linear.serialize(outbuffer + offset); + offset += this->angular.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->linear.deserialize(inbuffer + offset); + offset += this->angular.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Twist"; }; + const char * getMD5(){ return "9f195f881246fdfa2798d1d3eebca84a"; }; + + }; + +} + + +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/TwistStamped.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/TwistStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..40143c8cdedc200190e27b62a4b3c04d2e34542e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/TwistStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_TwistStamped_h +#define _ROS_geometry_msgs_TwistStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Twist.h" + +namespace geometry_msgs +{ + + class TwistStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Twist _twist_type; + _twist_type twist; + + TwistStamped(): + header(), + twist() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->twist.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->twist.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/TwistStamped"; }; + const char * getMD5(){ return "98d34b0043a2093cf9d9345ab6eef12e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/TwistWithCovariance.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/TwistWithCovariance.h new file mode 100644 index 0000000000000000000000000000000000000000..ab6fb611fe058aff897c7b6dcdc50d36434c16d4 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/TwistWithCovariance.h @@ -0,0 +1,79 @@ +#ifndef _ROS_geometry_msgs_TwistWithCovariance_h +#define _ROS_geometry_msgs_TwistWithCovariance_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../geometry_msgs/Twist.h" + +namespace geometry_msgs +{ + + class TwistWithCovariance : public ros::Msg + { + public: + typedef geometry_msgs::Twist _twist_type; + _twist_type twist; + double covariance[36]; + + TwistWithCovariance(): + twist(), + covariance() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->twist.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.real = this->covariance[i]; + *(outbuffer + offset + 0) = (u_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->twist.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.base = 0; + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->covariance[i] = u_covariancei.real; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + const char * getType(){ return "geometry_msgs/TwistWithCovariance"; }; + const char * getMD5(){ return "1fe8a28e6890a4cc3ae4c3ca5c7d82e6"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/TwistWithCovarianceStamped.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/TwistWithCovarianceStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..701edff536c9d742e891c7e57338b5f947bc08ab --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/TwistWithCovarianceStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_TwistWithCovarianceStamped_h +#define _ROS_geometry_msgs_TwistWithCovarianceStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/TwistWithCovariance.h" + +namespace geometry_msgs +{ + + class TwistWithCovarianceStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::TwistWithCovariance _twist_type; + _twist_type twist; + + TwistWithCovarianceStamped(): + header(), + twist() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->twist.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->twist.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/TwistWithCovarianceStamped"; }; + const char * getMD5(){ return "8927a1a12fb2607ceea095b2dc440a96"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Vector3.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Vector3.h new file mode 100644 index 0000000000000000000000000000000000000000..efbab98d71b75e3a1c5f250cb2a59ca31afaf8b4 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Vector3.h @@ -0,0 +1,134 @@ +#ifndef _ROS_geometry_msgs_Vector3_h +#define _ROS_geometry_msgs_Vector3_h + +#include +#include +#include +#include "../ros/msg.h" + +namespace geometry_msgs +{ + + class Vector3 : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _z_type; + _z_type z; + + Vector3(): + x(0), + y(0), + z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.real = this->z; + *(outbuffer + offset + 0) = (u_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.base = 0; + u_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->z = u_z.real; + offset += sizeof(this->z); + return offset; + } + + const char * getType(){ return "geometry_msgs/Vector3"; }; + const char * getMD5(){ return "4a842b65f413084dc2b10fb484ea7f17"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Vector3Stamped.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Vector3Stamped.h new file mode 100644 index 0000000000000000000000000000000000000000..9032066eb078f2e0df2b0a345582df7234af39ed --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Vector3Stamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_Vector3Stamped_h +#define _ROS_geometry_msgs_Vector3Stamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Vector3.h" + +namespace geometry_msgs +{ + + class Vector3Stamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Vector3 _vector_type; + _vector_type vector; + + Vector3Stamped(): + header(), + vector() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->vector.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->vector.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Vector3Stamped"; }; + const char * getMD5(){ return "7b324c7325e683bf02a9b14b01090ec7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Wrench.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Wrench.h new file mode 100644 index 0000000000000000000000000000000000000000..52e5934188f6f24363bb3ace2e2709aaaff1b9c9 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/Wrench.h @@ -0,0 +1,49 @@ +#ifndef _ROS_geometry_msgs_Wrench_h +#define _ROS_geometry_msgs_Wrench_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Vector3.h" + +namespace geometry_msgs +{ + + class Wrench : public ros::Msg + { + public: + typedef geometry_msgs::Vector3 _force_type; + _force_type force; + typedef geometry_msgs::Vector3 _torque_type; + _torque_type torque; + + Wrench(): + force(), + torque() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->force.serialize(outbuffer + offset); + offset += this->torque.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->force.deserialize(inbuffer + offset); + offset += this->torque.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Wrench"; }; + const char * getMD5(){ return "4f539cf138b23283b520fd271b567936"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/WrenchStamped.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/WrenchStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..41b82f90bc6336c84443730f3e1211f1f58e0368 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/geometry_msgs/WrenchStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_WrenchStamped_h +#define _ROS_geometry_msgs_WrenchStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Wrench.h" + +namespace geometry_msgs +{ + + class WrenchStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Wrench _wrench_type; + _wrench_type wrench; + + WrenchStamped(): + header(), + wrench() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->wrench.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->wrench.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/WrenchStamped"; }; + const char * getMD5(){ return "d78d3cb249ce23087ade7e7d0c40cfa7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/image_exposure_msgs/ExposureSequence.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/image_exposure_msgs/ExposureSequence.h new file mode 100644 index 0000000000000000000000000000000000000000..7cbcdf73e91b347ddf6f64883c4048f5f98519d0 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/image_exposure_msgs/ExposureSequence.h @@ -0,0 +1,119 @@ +#ifndef _ROS_image_exposure_msgs_ExposureSequence_h +#define _ROS_image_exposure_msgs_ExposureSequence_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace image_exposure_msgs +{ + + class ExposureSequence : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t shutter_length; + typedef uint32_t _shutter_type; + _shutter_type st_shutter; + _shutter_type * shutter; + typedef float _gain_type; + _gain_type gain; + typedef uint16_t _white_balance_blue_type; + _white_balance_blue_type white_balance_blue; + typedef uint16_t _white_balance_red_type; + _white_balance_red_type white_balance_red; + + ExposureSequence(): + header(), + shutter_length(0), shutter(NULL), + gain(0), + white_balance_blue(0), + white_balance_red(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->shutter_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->shutter_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->shutter_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->shutter_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->shutter_length); + for( uint32_t i = 0; i < shutter_length; i++){ + *(outbuffer + offset + 0) = (this->shutter[i] >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->shutter[i] >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->shutter[i] >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->shutter[i] >> (8 * 3)) & 0xFF; + offset += sizeof(this->shutter[i]); + } + union { + float real; + uint32_t base; + } u_gain; + u_gain.real = this->gain; + *(outbuffer + offset + 0) = (u_gain.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_gain.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_gain.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_gain.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->gain); + *(outbuffer + offset + 0) = (this->white_balance_blue >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->white_balance_blue >> (8 * 1)) & 0xFF; + offset += sizeof(this->white_balance_blue); + *(outbuffer + offset + 0) = (this->white_balance_red >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->white_balance_red >> (8 * 1)) & 0xFF; + offset += sizeof(this->white_balance_red); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t shutter_lengthT = ((uint32_t) (*(inbuffer + offset))); + shutter_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + shutter_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + shutter_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->shutter_length); + if(shutter_lengthT > shutter_length) + this->shutter = (uint32_t*)realloc(this->shutter, shutter_lengthT * sizeof(uint32_t)); + shutter_length = shutter_lengthT; + for( uint32_t i = 0; i < shutter_length; i++){ + this->st_shutter = ((uint32_t) (*(inbuffer + offset))); + this->st_shutter |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->st_shutter |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->st_shutter |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->st_shutter); + memcpy( &(this->shutter[i]), &(this->st_shutter), sizeof(uint32_t)); + } + union { + float real; + uint32_t base; + } u_gain; + u_gain.base = 0; + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->gain = u_gain.real; + offset += sizeof(this->gain); + this->white_balance_blue = ((uint16_t) (*(inbuffer + offset))); + this->white_balance_blue |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->white_balance_blue); + this->white_balance_red = ((uint16_t) (*(inbuffer + offset))); + this->white_balance_red |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->white_balance_red); + return offset; + } + + const char * getType(){ return "image_exposure_msgs/ExposureSequence"; }; + const char * getMD5(){ return "81d98e1e20eab8beb4bd07beeba6a398"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/image_exposure_msgs/ImageExposureStatistics.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/image_exposure_msgs/ImageExposureStatistics.h new file mode 100644 index 0000000000000000000000000000000000000000..2c366c3ad961b9c2ee2800451b72d4b607db042d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/image_exposure_msgs/ImageExposureStatistics.h @@ -0,0 +1,324 @@ +#ifndef _ROS_image_exposure_msgs_ImageExposureStatistics_h +#define _ROS_image_exposure_msgs_ImageExposureStatistics_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" +#include "statistics_msgs/Stats1D.h" + +namespace image_exposure_msgs +{ + + class ImageExposureStatistics : public ros::Msg + { + public: + typedef ros::Time _stamp_type; + _stamp_type stamp; + typedef const char* _time_reference_type; + _time_reference_type time_reference; + typedef float _shutterms_type; + _shutterms_type shutterms; + typedef float _gaindb_type; + _gaindb_type gaindb; + typedef uint32_t _underExposed_type; + _underExposed_type underExposed; + typedef uint32_t _overExposed_type; + _overExposed_type overExposed; + typedef statistics_msgs::Stats1D _pixelVal_type; + _pixelVal_type pixelVal; + typedef statistics_msgs::Stats1D _pixelAge_type; + _pixelAge_type pixelAge; + typedef double _meanIrradiance_type; + _meanIrradiance_type meanIrradiance; + typedef double _minMeasurableIrradiance_type; + _minMeasurableIrradiance_type minMeasurableIrradiance; + typedef double _maxMeasurableIrradiance_type; + _maxMeasurableIrradiance_type maxMeasurableIrradiance; + typedef double _minObservedIrradiance_type; + _minObservedIrradiance_type minObservedIrradiance; + typedef double _maxObservedIrradiance_type; + _maxObservedIrradiance_type maxObservedIrradiance; + + ImageExposureStatistics(): + stamp(), + time_reference(""), + shutterms(0), + gaindb(0), + underExposed(0), + overExposed(0), + pixelVal(), + pixelAge(), + meanIrradiance(0), + minMeasurableIrradiance(0), + maxMeasurableIrradiance(0), + minObservedIrradiance(0), + maxObservedIrradiance(0) + { + } + + 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_time_reference = strlen(this->time_reference); + varToArr(outbuffer + offset, length_time_reference); + offset += 4; + memcpy(outbuffer + offset, this->time_reference, length_time_reference); + offset += length_time_reference; + union { + float real; + uint32_t base; + } u_shutterms; + u_shutterms.real = this->shutterms; + *(outbuffer + offset + 0) = (u_shutterms.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_shutterms.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_shutterms.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_shutterms.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->shutterms); + union { + float real; + uint32_t base; + } u_gaindb; + u_gaindb.real = this->gaindb; + *(outbuffer + offset + 0) = (u_gaindb.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_gaindb.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_gaindb.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_gaindb.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->gaindb); + *(outbuffer + offset + 0) = (this->underExposed >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->underExposed >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->underExposed >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->underExposed >> (8 * 3)) & 0xFF; + offset += sizeof(this->underExposed); + *(outbuffer + offset + 0) = (this->overExposed >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->overExposed >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->overExposed >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->overExposed >> (8 * 3)) & 0xFF; + offset += sizeof(this->overExposed); + offset += this->pixelVal.serialize(outbuffer + offset); + offset += this->pixelAge.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_meanIrradiance; + u_meanIrradiance.real = this->meanIrradiance; + *(outbuffer + offset + 0) = (u_meanIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_meanIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_meanIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_meanIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_meanIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_meanIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_meanIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_meanIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->meanIrradiance); + union { + double real; + uint64_t base; + } u_minMeasurableIrradiance; + u_minMeasurableIrradiance.real = this->minMeasurableIrradiance; + *(outbuffer + offset + 0) = (u_minMeasurableIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_minMeasurableIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_minMeasurableIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_minMeasurableIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_minMeasurableIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_minMeasurableIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_minMeasurableIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_minMeasurableIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->minMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_maxMeasurableIrradiance; + u_maxMeasurableIrradiance.real = this->maxMeasurableIrradiance; + *(outbuffer + offset + 0) = (u_maxMeasurableIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_maxMeasurableIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_maxMeasurableIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_maxMeasurableIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_maxMeasurableIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_maxMeasurableIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_maxMeasurableIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_maxMeasurableIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->maxMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_minObservedIrradiance; + u_minObservedIrradiance.real = this->minObservedIrradiance; + *(outbuffer + offset + 0) = (u_minObservedIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_minObservedIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_minObservedIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_minObservedIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_minObservedIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_minObservedIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_minObservedIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_minObservedIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->minObservedIrradiance); + union { + double real; + uint64_t base; + } u_maxObservedIrradiance; + u_maxObservedIrradiance.real = this->maxObservedIrradiance; + *(outbuffer + offset + 0) = (u_maxObservedIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_maxObservedIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_maxObservedIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_maxObservedIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_maxObservedIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_maxObservedIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_maxObservedIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_maxObservedIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->maxObservedIrradiance); + 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_time_reference; + arrToVar(length_time_reference, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_time_reference; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_time_reference-1]=0; + this->time_reference = (char *)(inbuffer + offset-1); + offset += length_time_reference; + union { + float real; + uint32_t base; + } u_shutterms; + u_shutterms.base = 0; + u_shutterms.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_shutterms.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_shutterms.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_shutterms.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->shutterms = u_shutterms.real; + offset += sizeof(this->shutterms); + union { + float real; + uint32_t base; + } u_gaindb; + u_gaindb.base = 0; + u_gaindb.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_gaindb.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_gaindb.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_gaindb.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->gaindb = u_gaindb.real; + offset += sizeof(this->gaindb); + this->underExposed = ((uint32_t) (*(inbuffer + offset))); + this->underExposed |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->underExposed |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->underExposed |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->underExposed); + this->overExposed = ((uint32_t) (*(inbuffer + offset))); + this->overExposed |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->overExposed |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->overExposed |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->overExposed); + offset += this->pixelVal.deserialize(inbuffer + offset); + offset += this->pixelAge.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_meanIrradiance; + u_meanIrradiance.base = 0; + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->meanIrradiance = u_meanIrradiance.real; + offset += sizeof(this->meanIrradiance); + union { + double real; + uint64_t base; + } u_minMeasurableIrradiance; + u_minMeasurableIrradiance.base = 0; + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->minMeasurableIrradiance = u_minMeasurableIrradiance.real; + offset += sizeof(this->minMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_maxMeasurableIrradiance; + u_maxMeasurableIrradiance.base = 0; + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->maxMeasurableIrradiance = u_maxMeasurableIrradiance.real; + offset += sizeof(this->maxMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_minObservedIrradiance; + u_minObservedIrradiance.base = 0; + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->minObservedIrradiance = u_minObservedIrradiance.real; + offset += sizeof(this->minObservedIrradiance); + union { + double real; + uint64_t base; + } u_maxObservedIrradiance; + u_maxObservedIrradiance.base = 0; + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->maxObservedIrradiance = u_maxObservedIrradiance.real; + offset += sizeof(this->maxObservedIrradiance); + return offset; + } + + const char * getType(){ return "image_exposure_msgs/ImageExposureStatistics"; }; + const char * getMD5(){ return "334dc170ce6287d1de470f25be78dd9e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/image_exposure_msgs/SequenceExposureStatistics.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/image_exposure_msgs/SequenceExposureStatistics.h new file mode 100644 index 0000000000000000000000000000000000000000..2ba1b3176fdf70f05af219d2bbefec116c965096 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/image_exposure_msgs/SequenceExposureStatistics.h @@ -0,0 +1,250 @@ +#ifndef _ROS_image_exposure_msgs_SequenceExposureStatistics_h +#define _ROS_image_exposure_msgs_SequenceExposureStatistics_h + +#include +#include +#include +#include "ros/msg.h" +#include "image_exposure_msgs/ImageExposureStatistics.h" + +namespace image_exposure_msgs +{ + + class SequenceExposureStatistics : public ros::Msg + { + public: + uint32_t exposures_length; + typedef image_exposure_msgs::ImageExposureStatistics _exposures_type; + _exposures_type st_exposures; + _exposures_type * exposures; + typedef uint32_t _underExposed_type; + _underExposed_type underExposed; + typedef uint32_t _overExposed_type; + _overExposed_type overExposed; + typedef double _meanIrradiance_type; + _meanIrradiance_type meanIrradiance; + typedef double _minMeasurableIrradiance_type; + _minMeasurableIrradiance_type minMeasurableIrradiance; + typedef double _maxMeasurableIrradiance_type; + _maxMeasurableIrradiance_type maxMeasurableIrradiance; + typedef double _minObservedIrradiance_type; + _minObservedIrradiance_type minObservedIrradiance; + typedef double _maxObservedIrradiance_type; + _maxObservedIrradiance_type maxObservedIrradiance; + + SequenceExposureStatistics(): + exposures_length(0), exposures(NULL), + underExposed(0), + overExposed(0), + meanIrradiance(0), + minMeasurableIrradiance(0), + maxMeasurableIrradiance(0), + minObservedIrradiance(0), + maxObservedIrradiance(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->exposures_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->exposures_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->exposures_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->exposures_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->exposures_length); + for( uint32_t i = 0; i < exposures_length; i++){ + offset += this->exposures[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->underExposed >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->underExposed >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->underExposed >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->underExposed >> (8 * 3)) & 0xFF; + offset += sizeof(this->underExposed); + *(outbuffer + offset + 0) = (this->overExposed >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->overExposed >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->overExposed >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->overExposed >> (8 * 3)) & 0xFF; + offset += sizeof(this->overExposed); + union { + double real; + uint64_t base; + } u_meanIrradiance; + u_meanIrradiance.real = this->meanIrradiance; + *(outbuffer + offset + 0) = (u_meanIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_meanIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_meanIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_meanIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_meanIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_meanIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_meanIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_meanIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->meanIrradiance); + union { + double real; + uint64_t base; + } u_minMeasurableIrradiance; + u_minMeasurableIrradiance.real = this->minMeasurableIrradiance; + *(outbuffer + offset + 0) = (u_minMeasurableIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_minMeasurableIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_minMeasurableIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_minMeasurableIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_minMeasurableIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_minMeasurableIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_minMeasurableIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_minMeasurableIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->minMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_maxMeasurableIrradiance; + u_maxMeasurableIrradiance.real = this->maxMeasurableIrradiance; + *(outbuffer + offset + 0) = (u_maxMeasurableIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_maxMeasurableIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_maxMeasurableIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_maxMeasurableIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_maxMeasurableIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_maxMeasurableIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_maxMeasurableIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_maxMeasurableIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->maxMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_minObservedIrradiance; + u_minObservedIrradiance.real = this->minObservedIrradiance; + *(outbuffer + offset + 0) = (u_minObservedIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_minObservedIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_minObservedIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_minObservedIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_minObservedIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_minObservedIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_minObservedIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_minObservedIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->minObservedIrradiance); + union { + double real; + uint64_t base; + } u_maxObservedIrradiance; + u_maxObservedIrradiance.real = this->maxObservedIrradiance; + *(outbuffer + offset + 0) = (u_maxObservedIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_maxObservedIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_maxObservedIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_maxObservedIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_maxObservedIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_maxObservedIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_maxObservedIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_maxObservedIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->maxObservedIrradiance); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t exposures_lengthT = ((uint32_t) (*(inbuffer + offset))); + exposures_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + exposures_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + exposures_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->exposures_length); + if(exposures_lengthT > exposures_length) + this->exposures = (image_exposure_msgs::ImageExposureStatistics*)realloc(this->exposures, exposures_lengthT * sizeof(image_exposure_msgs::ImageExposureStatistics)); + exposures_length = exposures_lengthT; + for( uint32_t i = 0; i < exposures_length; i++){ + offset += this->st_exposures.deserialize(inbuffer + offset); + memcpy( &(this->exposures[i]), &(this->st_exposures), sizeof(image_exposure_msgs::ImageExposureStatistics)); + } + this->underExposed = ((uint32_t) (*(inbuffer + offset))); + this->underExposed |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->underExposed |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->underExposed |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->underExposed); + this->overExposed = ((uint32_t) (*(inbuffer + offset))); + this->overExposed |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->overExposed |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->overExposed |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->overExposed); + union { + double real; + uint64_t base; + } u_meanIrradiance; + u_meanIrradiance.base = 0; + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->meanIrradiance = u_meanIrradiance.real; + offset += sizeof(this->meanIrradiance); + union { + double real; + uint64_t base; + } u_minMeasurableIrradiance; + u_minMeasurableIrradiance.base = 0; + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->minMeasurableIrradiance = u_minMeasurableIrradiance.real; + offset += sizeof(this->minMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_maxMeasurableIrradiance; + u_maxMeasurableIrradiance.base = 0; + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->maxMeasurableIrradiance = u_maxMeasurableIrradiance.real; + offset += sizeof(this->maxMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_minObservedIrradiance; + u_minObservedIrradiance.base = 0; + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->minObservedIrradiance = u_minObservedIrradiance.real; + offset += sizeof(this->minObservedIrradiance); + union { + double real; + uint64_t base; + } u_maxObservedIrradiance; + u_maxObservedIrradiance.base = 0; + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->maxObservedIrradiance = u_maxObservedIrradiance.real; + offset += sizeof(this->maxObservedIrradiance); + return offset; + } + + const char * getType(){ return "image_exposure_msgs/SequenceExposureStatistics"; }; + const char * getMD5(){ return "2a4f3187c50e7b3544984e9e28ce4328"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/laser_assembler/AssembleScans.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/laser_assembler/AssembleScans.h new file mode 100644 index 0000000000000000000000000000000000000000..7aa87458fff78542655b53691a234de11ad69a12 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/laser_assembler/AssembleScans.h @@ -0,0 +1,123 @@ +#ifndef _ROS_SERVICE_AssembleScans_h +#define _ROS_SERVICE_AssembleScans_h +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" +#include "sensor_msgs/PointCloud.h" + +namespace laser_assembler +{ + +static const char ASSEMBLESCANS[] = "laser_assembler/AssembleScans"; + + class AssembleScansRequest : public ros::Msg + { + public: + typedef ros::Time _begin_type; + _begin_type begin; + typedef ros::Time _end_type; + _end_type end; + + AssembleScansRequest(): + begin(), + end() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->begin.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->begin.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->begin.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->begin.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->begin.sec); + *(outbuffer + offset + 0) = (this->begin.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->begin.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->begin.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->begin.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->begin.nsec); + *(outbuffer + offset + 0) = (this->end.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->end.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->end.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->end.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->end.sec); + *(outbuffer + offset + 0) = (this->end.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->end.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->end.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->end.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->end.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->begin.sec = ((uint32_t) (*(inbuffer + offset))); + this->begin.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->begin.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->begin.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->begin.sec); + this->begin.nsec = ((uint32_t) (*(inbuffer + offset))); + this->begin.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->begin.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->begin.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->begin.nsec); + this->end.sec = ((uint32_t) (*(inbuffer + offset))); + this->end.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->end.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->end.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->end.sec); + this->end.nsec = ((uint32_t) (*(inbuffer + offset))); + this->end.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->end.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->end.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->end.nsec); + return offset; + } + + const char * getType(){ return ASSEMBLESCANS; }; + const char * getMD5(){ return "b341004f74e15bf5e1b2053a9183bdc7"; }; + + }; + + class AssembleScansResponse : public ros::Msg + { + public: + typedef sensor_msgs::PointCloud _cloud_type; + _cloud_type cloud; + + AssembleScansResponse(): + cloud() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->cloud.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->cloud.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return ASSEMBLESCANS; }; + const char * getMD5(){ return "4217b28a903e4ad7869a83b3653110ff"; }; + + }; + + class AssembleScans { + public: + typedef AssembleScansRequest Request; + typedef AssembleScansResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/laser_assembler/AssembleScans2.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/laser_assembler/AssembleScans2.h new file mode 100644 index 0000000000000000000000000000000000000000..ae2f6b74f5ae57cde6d0b50a8b13dbde47fe227e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/laser_assembler/AssembleScans2.h @@ -0,0 +1,123 @@ +#ifndef _ROS_SERVICE_AssembleScans2_h +#define _ROS_SERVICE_AssembleScans2_h +#include +#include +#include +#include "ros/msg.h" +#include "sensor_msgs/PointCloud2.h" +#include "ros/time.h" + +namespace laser_assembler +{ + +static const char ASSEMBLESCANS2[] = "laser_assembler/AssembleScans2"; + + class AssembleScans2Request : public ros::Msg + { + public: + typedef ros::Time _begin_type; + _begin_type begin; + typedef ros::Time _end_type; + _end_type end; + + AssembleScans2Request(): + begin(), + end() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->begin.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->begin.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->begin.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->begin.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->begin.sec); + *(outbuffer + offset + 0) = (this->begin.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->begin.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->begin.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->begin.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->begin.nsec); + *(outbuffer + offset + 0) = (this->end.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->end.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->end.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->end.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->end.sec); + *(outbuffer + offset + 0) = (this->end.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->end.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->end.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->end.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->end.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->begin.sec = ((uint32_t) (*(inbuffer + offset))); + this->begin.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->begin.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->begin.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->begin.sec); + this->begin.nsec = ((uint32_t) (*(inbuffer + offset))); + this->begin.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->begin.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->begin.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->begin.nsec); + this->end.sec = ((uint32_t) (*(inbuffer + offset))); + this->end.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->end.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->end.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->end.sec); + this->end.nsec = ((uint32_t) (*(inbuffer + offset))); + this->end.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->end.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->end.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->end.nsec); + return offset; + } + + const char * getType(){ return ASSEMBLESCANS2; }; + const char * getMD5(){ return "b341004f74e15bf5e1b2053a9183bdc7"; }; + + }; + + class AssembleScans2Response : public ros::Msg + { + public: + typedef sensor_msgs::PointCloud2 _cloud_type; + _cloud_type cloud; + + AssembleScans2Response(): + cloud() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->cloud.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->cloud.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return ASSEMBLESCANS2; }; + const char * getMD5(){ return "96cec5374164b3b3d1d7ef5d7628a7ed"; }; + + }; + + class AssembleScans2 { + public: + typedef AssembleScans2Request Request; + typedef AssembleScans2Response Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/main.cpp b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1e769e43080d7a6cc8f08dc4c238e4157de4dd77 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/main.cpp @@ -0,0 +1,118 @@ +// +// main.cpp +// ros_test +// +// Created by Orly Natan on 13/4/18. +// Copyright © 2018 Orly Natan. All rights reserved. +// + +/* (1) +#include + +int main(int argc, const char * argv[]) { + // insert code here... + std::cout << "Hello, World!\n"; + return 0; +} +*/ + +/* (2) + * rosserial Publisher Example + * Prints "hello ROS!" + */ + + +/* +#include "wrapper.h" + +char rosSrvrIp[] = "149.171.153.49"; +char hello[] = "Hello ROS From C/XCode!"; + + + int main() + { + ros_init_pub(rosSrvrIp); + ros_pub(hello); + } + + +*/ + + + + + + + + + + + + + + + + + +/* +#include "ros.h" +#include "std_msgs/String.h" +#include + +ros::NodeHandle nh; + +std_msgs::String str_msg; +ros::Publisher chatter("chatter", &str_msg); + +char rosSrvrIp[] = "149.171.153.49"; //192.168.15.121"; +char hello[] = "Hello ROS!"; + +int main() +{ + //nh.initNode(); + + + nh.initNode(rosSrvrIp); + nh.advertise(chatter); + + while(1) { + str_msg.data = hello; + chatter.publish( &str_msg ); + nh.spinOnce(); + printf("chattered\n"); + sleep(1); + } + +}*/ + +/* (3) + * rosserial_embeddedlinux subscriber example + * + * Prints a string sent on a subscribed ros topic. + * The string can be sent with e.g. + * $ rostopic pub chatter std_msgs/String -- "Hello Embedded Linux" + */ +/* +#include "ros.h" +#include "std_msgs/String.h" +#include + +ros::NodeHandle nh; +char rosSrvrIp[] = "149.171.153.52"; + +void messageCb(const std_msgs::String& received_msg){ + printf("Received subscribed chatter message: %s\n", received_msg.data); +} +ros::Subscriber sub("chatter", messageCb ); + +int main() +{ + //nh.initNode(); + nh.initNode(rosSrvrIp); + nh.subscribe(sub); + + while(1) { + sleep(1); + nh.spinOnce(); + } +}*/ diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/GetMapROI.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/GetMapROI.h new file mode 100644 index 0000000000000000000000000000000000000000..3d39495f973df2a91eb44da11a95baf934ea6c65 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/GetMapROI.h @@ -0,0 +1,204 @@ +#ifndef _ROS_SERVICE_GetMapROI_h +#define _ROS_SERVICE_GetMapROI_h +#include +#include +#include +#include "ros/msg.h" +#include "nav_msgs/OccupancyGrid.h" + +namespace map_msgs +{ + +static const char GETMAPROI[] = "map_msgs/GetMapROI"; + + class GetMapROIRequest : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _l_x_type; + _l_x_type l_x; + typedef double _l_y_type; + _l_y_type l_y; + + GetMapROIRequest(): + x(0), + y(0), + l_x(0), + l_y(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_l_x; + u_l_x.real = this->l_x; + *(outbuffer + offset + 0) = (u_l_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_l_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_l_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_l_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_l_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_l_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_l_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_l_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->l_x); + union { + double real; + uint64_t base; + } u_l_y; + u_l_y.real = this->l_y; + *(outbuffer + offset + 0) = (u_l_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_l_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_l_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_l_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_l_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_l_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_l_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_l_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->l_y); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_l_x; + u_l_x.base = 0; + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->l_x = u_l_x.real; + offset += sizeof(this->l_x); + union { + double real; + uint64_t base; + } u_l_y; + u_l_y.base = 0; + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->l_y = u_l_y.real; + offset += sizeof(this->l_y); + return offset; + } + + const char * getType(){ return GETMAPROI; }; + const char * getMD5(){ return "43c2ff8f45af555c0eaf070c401e9a47"; }; + + }; + + class GetMapROIResponse : public ros::Msg + { + public: + typedef nav_msgs::OccupancyGrid _sub_map_type; + _sub_map_type sub_map; + + GetMapROIResponse(): + sub_map() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->sub_map.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->sub_map.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return GETMAPROI; }; + const char * getMD5(){ return "4d1986519c00d81967d2891a606b234c"; }; + + }; + + class GetMapROI { + public: + typedef GetMapROIRequest Request; + typedef GetMapROIResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/GetPointMap.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/GetPointMap.h new file mode 100644 index 0000000000000000000000000000000000000000..3da8ab148d43352a03ec437fbe58b84f7f847b8c --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/GetPointMap.h @@ -0,0 +1,76 @@ +#ifndef _ROS_SERVICE_GetPointMap_h +#define _ROS_SERVICE_GetPointMap_h +#include +#include +#include +#include "ros/msg.h" +#include "sensor_msgs/PointCloud2.h" + +namespace map_msgs +{ + +static const char GETPOINTMAP[] = "map_msgs/GetPointMap"; + + class GetPointMapRequest : public ros::Msg + { + public: + + GetPointMapRequest() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return GETPOINTMAP; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetPointMapResponse : public ros::Msg + { + public: + typedef sensor_msgs::PointCloud2 _map_type; + _map_type map; + + GetPointMapResponse(): + map() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->map.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->map.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return GETPOINTMAP; }; + const char * getMD5(){ return "b84fbb39505086eb6a62d933c75cb7b4"; }; + + }; + + class GetPointMap { + public: + typedef GetPointMapRequest Request; + typedef GetPointMapResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/GetPointMapROI.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/GetPointMapROI.h new file mode 100644 index 0000000000000000000000000000000000000000..b7c4cdad600370769ef51f1bf9cf7842e7efb2e1 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/GetPointMapROI.h @@ -0,0 +1,300 @@ +#ifndef _ROS_SERVICE_GetPointMapROI_h +#define _ROS_SERVICE_GetPointMapROI_h +#include +#include +#include +#include "ros/msg.h" +#include "sensor_msgs/PointCloud2.h" + +namespace map_msgs +{ + +static const char GETPOINTMAPROI[] = "map_msgs/GetPointMapROI"; + + class GetPointMapROIRequest : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _z_type; + _z_type z; + typedef double _r_type; + _r_type r; + typedef double _l_x_type; + _l_x_type l_x; + typedef double _l_y_type; + _l_y_type l_y; + typedef double _l_z_type; + _l_z_type l_z; + + GetPointMapROIRequest(): + x(0), + y(0), + z(0), + r(0), + l_x(0), + l_y(0), + l_z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.real = this->z; + *(outbuffer + offset + 0) = (u_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->z); + union { + double real; + uint64_t base; + } u_r; + u_r.real = this->r; + *(outbuffer + offset + 0) = (u_r.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_r.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_r.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_r.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_r.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_r.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_r.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_r.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->r); + union { + double real; + uint64_t base; + } u_l_x; + u_l_x.real = this->l_x; + *(outbuffer + offset + 0) = (u_l_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_l_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_l_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_l_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_l_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_l_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_l_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_l_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->l_x); + union { + double real; + uint64_t base; + } u_l_y; + u_l_y.real = this->l_y; + *(outbuffer + offset + 0) = (u_l_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_l_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_l_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_l_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_l_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_l_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_l_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_l_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->l_y); + union { + double real; + uint64_t base; + } u_l_z; + u_l_z.real = this->l_z; + *(outbuffer + offset + 0) = (u_l_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_l_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_l_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_l_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_l_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_l_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_l_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_l_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->l_z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.base = 0; + u_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->z = u_z.real; + offset += sizeof(this->z); + union { + double real; + uint64_t base; + } u_r; + u_r.base = 0; + u_r.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_r.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_r.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_r.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_r.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_r.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_r.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_r.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->r = u_r.real; + offset += sizeof(this->r); + union { + double real; + uint64_t base; + } u_l_x; + u_l_x.base = 0; + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->l_x = u_l_x.real; + offset += sizeof(this->l_x); + union { + double real; + uint64_t base; + } u_l_y; + u_l_y.base = 0; + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->l_y = u_l_y.real; + offset += sizeof(this->l_y); + union { + double real; + uint64_t base; + } u_l_z; + u_l_z.base = 0; + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->l_z = u_l_z.real; + offset += sizeof(this->l_z); + return offset; + } + + const char * getType(){ return GETPOINTMAPROI; }; + const char * getMD5(){ return "895f7e437a9a6dd225316872b187a303"; }; + + }; + + class GetPointMapROIResponse : public ros::Msg + { + public: + typedef sensor_msgs::PointCloud2 _sub_map_type; + _sub_map_type sub_map; + + GetPointMapROIResponse(): + sub_map() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->sub_map.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->sub_map.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return GETPOINTMAPROI; }; + const char * getMD5(){ return "313769f8b0e724525c6463336cbccd63"; }; + + }; + + class GetPointMapROI { + public: + typedef GetPointMapROIRequest Request; + typedef GetPointMapROIResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/OccupancyGridUpdate.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/OccupancyGridUpdate.h new file mode 100644 index 0000000000000000000000000000000000000000..23590d28e90491bda7026c05be1e691a1d5e6c1c --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/OccupancyGridUpdate.h @@ -0,0 +1,156 @@ +#ifndef _ROS_map_msgs_OccupancyGridUpdate_h +#define _ROS_map_msgs_OccupancyGridUpdate_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace map_msgs +{ + + class OccupancyGridUpdate : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef int32_t _x_type; + _x_type x; + typedef int32_t _y_type; + _y_type y; + typedef uint32_t _width_type; + _width_type width; + typedef uint32_t _height_type; + _height_type height; + uint32_t data_length; + typedef int8_t _data_type; + _data_type st_data; + _data_type * data; + + OccupancyGridUpdate(): + header(), + x(0), + y(0), + width(0), + height(0), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + int32_t real; + uint32_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->x); + union { + int32_t real; + uint32_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->y); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF; + offset += sizeof(this->width); + *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF; + offset += sizeof(this->height); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + int32_t real; + uint32_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->x = u_x.real; + offset += sizeof(this->x); + union { + int32_t real; + uint32_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->y = u_y.real; + offset += sizeof(this->y); + this->width = ((uint32_t) (*(inbuffer + offset))); + this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->width); + this->height = ((uint32_t) (*(inbuffer + offset))); + this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->height); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (int8_t*)realloc(this->data, data_lengthT * sizeof(int8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(int8_t)); + } + return offset; + } + + const char * getType(){ return "map_msgs/OccupancyGridUpdate"; }; + const char * getMD5(){ return "b295be292b335c34718bd939deebe1c9"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/PointCloud2Update.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/PointCloud2Update.h new file mode 100644 index 0000000000000000000000000000000000000000..eee4cb176bcbc82e895b6db59d6b6b2ece1f84b7 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/PointCloud2Update.h @@ -0,0 +1,65 @@ +#ifndef _ROS_map_msgs_PointCloud2Update_h +#define _ROS_map_msgs_PointCloud2Update_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/PointCloud2.h" + +namespace map_msgs +{ + + class PointCloud2Update : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef uint32_t _type_type; + _type_type type; + typedef sensor_msgs::PointCloud2 _points_type; + _points_type points; + enum { ADD = 0 }; + enum { DELETE = 1 }; + + PointCloud2Update(): + header(), + type(0), + points() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->type >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->type >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->type >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->type >> (8 * 3)) & 0xFF; + offset += sizeof(this->type); + offset += this->points.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->type = ((uint32_t) (*(inbuffer + offset))); + this->type |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->type |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->type |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->type); + offset += this->points.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "map_msgs/PointCloud2Update"; }; + const char * getMD5(){ return "6c58e4f249ae9cd2b24fb1ee0f99195e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/ProjectedMap.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/ProjectedMap.h new file mode 100644 index 0000000000000000000000000000000000000000..84e5be55eb95d1c9023692c768aeda42012abbe4 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/ProjectedMap.h @@ -0,0 +1,108 @@ +#ifndef _ROS_map_msgs_ProjectedMap_h +#define _ROS_map_msgs_ProjectedMap_h + +#include +#include +#include +#include "ros/msg.h" +#include "nav_msgs/OccupancyGrid.h" + +namespace map_msgs +{ + + class ProjectedMap : public ros::Msg + { + public: + typedef nav_msgs::OccupancyGrid _map_type; + _map_type map; + typedef double _min_z_type; + _min_z_type min_z; + typedef double _max_z_type; + _max_z_type max_z; + + ProjectedMap(): + map(), + min_z(0), + max_z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->map.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_min_z; + u_min_z.real = this->min_z; + *(outbuffer + offset + 0) = (u_min_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_min_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_min_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_min_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_min_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_min_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_min_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_min_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->min_z); + union { + double real; + uint64_t base; + } u_max_z; + u_max_z.real = this->max_z; + *(outbuffer + offset + 0) = (u_max_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max_z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->map.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_min_z; + u_min_z.base = 0; + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->min_z = u_min_z.real; + offset += sizeof(this->min_z); + union { + double real; + uint64_t base; + } u_max_z; + u_max_z.base = 0; + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max_z = u_max_z.real; + offset += sizeof(this->max_z); + return offset; + } + + const char * getType(){ return "map_msgs/ProjectedMap"; }; + const char * getMD5(){ return "7bbe8f96e45089681dc1ea7d023cbfca"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/ProjectedMapInfo.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/ProjectedMapInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..5c7456e4c7e90a2ceab22ba5c3c91e7e0be41451 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/ProjectedMapInfo.h @@ -0,0 +1,247 @@ +#ifndef _ROS_map_msgs_ProjectedMapInfo_h +#define _ROS_map_msgs_ProjectedMapInfo_h + +#include +#include +#include +#include "ros/msg.h" + +namespace map_msgs +{ + + class ProjectedMapInfo : public ros::Msg + { + public: + typedef const char* _frame_id_type; + _frame_id_type frame_id; + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _width_type; + _width_type width; + typedef double _height_type; + _height_type height; + typedef double _min_z_type; + _min_z_type min_z; + typedef double _max_z_type; + _max_z_type max_z; + + ProjectedMapInfo(): + frame_id(""), + x(0), + y(0), + width(0), + height(0), + min_z(0), + max_z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_frame_id = strlen(this->frame_id); + varToArr(outbuffer + offset, length_frame_id); + offset += 4; + memcpy(outbuffer + offset, this->frame_id, length_frame_id); + offset += length_frame_id; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_width; + u_width.real = this->width; + *(outbuffer + offset + 0) = (u_width.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_width.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_width.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_width.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_width.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_width.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_width.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_width.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->width); + union { + double real; + uint64_t base; + } u_height; + u_height.real = this->height; + *(outbuffer + offset + 0) = (u_height.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_height.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_height.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_height.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_height.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_height.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_height.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_height.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->height); + union { + double real; + uint64_t base; + } u_min_z; + u_min_z.real = this->min_z; + *(outbuffer + offset + 0) = (u_min_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_min_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_min_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_min_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_min_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_min_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_min_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_min_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->min_z); + union { + double real; + uint64_t base; + } u_max_z; + u_max_z.real = this->max_z; + *(outbuffer + offset + 0) = (u_max_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max_z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_frame_id; + arrToVar(length_frame_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_frame_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_frame_id-1]=0; + this->frame_id = (char *)(inbuffer + offset-1); + offset += length_frame_id; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_width; + u_width.base = 0; + u_width.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_width.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_width.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_width.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_width.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_width.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_width.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_width.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->width = u_width.real; + offset += sizeof(this->width); + union { + double real; + uint64_t base; + } u_height; + u_height.base = 0; + u_height.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_height.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_height.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_height.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_height.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_height.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_height.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_height.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->height = u_height.real; + offset += sizeof(this->height); + union { + double real; + uint64_t base; + } u_min_z; + u_min_z.base = 0; + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->min_z = u_min_z.real; + offset += sizeof(this->min_z); + union { + double real; + uint64_t base; + } u_max_z; + u_max_z.base = 0; + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max_z = u_max_z.real; + offset += sizeof(this->max_z); + return offset; + } + + const char * getType(){ return "map_msgs/ProjectedMapInfo"; }; + const char * getMD5(){ return "2dc10595ae94de23f22f8a6d2a0eef7a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/ProjectedMapsInfo.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/ProjectedMapsInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..b515b94c87eb380b2052b71bb3e782e3c80700d2 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/ProjectedMapsInfo.h @@ -0,0 +1,96 @@ +#ifndef _ROS_SERVICE_ProjectedMapsInfo_h +#define _ROS_SERVICE_ProjectedMapsInfo_h +#include +#include +#include +#include "ros/msg.h" +#include "map_msgs/ProjectedMapInfo.h" + +namespace map_msgs +{ + +static const char PROJECTEDMAPSINFO[] = "map_msgs/ProjectedMapsInfo"; + + class ProjectedMapsInfoRequest : public ros::Msg + { + public: + uint32_t projected_maps_info_length; + typedef map_msgs::ProjectedMapInfo _projected_maps_info_type; + _projected_maps_info_type st_projected_maps_info; + _projected_maps_info_type * projected_maps_info; + + ProjectedMapsInfoRequest(): + projected_maps_info_length(0), projected_maps_info(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->projected_maps_info_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->projected_maps_info_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->projected_maps_info_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->projected_maps_info_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->projected_maps_info_length); + for( uint32_t i = 0; i < projected_maps_info_length; i++){ + offset += this->projected_maps_info[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t projected_maps_info_lengthT = ((uint32_t) (*(inbuffer + offset))); + projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->projected_maps_info_length); + if(projected_maps_info_lengthT > projected_maps_info_length) + this->projected_maps_info = (map_msgs::ProjectedMapInfo*)realloc(this->projected_maps_info, projected_maps_info_lengthT * sizeof(map_msgs::ProjectedMapInfo)); + projected_maps_info_length = projected_maps_info_lengthT; + for( uint32_t i = 0; i < projected_maps_info_length; i++){ + offset += this->st_projected_maps_info.deserialize(inbuffer + offset); + memcpy( &(this->projected_maps_info[i]), &(this->st_projected_maps_info), sizeof(map_msgs::ProjectedMapInfo)); + } + return offset; + } + + const char * getType(){ return PROJECTEDMAPSINFO; }; + const char * getMD5(){ return "d7980a33202421c8cd74565e57a4d229"; }; + + }; + + class ProjectedMapsInfoResponse : public ros::Msg + { + public: + + ProjectedMapsInfoResponse() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return PROJECTEDMAPSINFO; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class ProjectedMapsInfo { + public: + typedef ProjectedMapsInfoRequest Request; + typedef ProjectedMapsInfoResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/SaveMap.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/SaveMap.h new file mode 100644 index 0000000000000000000000000000000000000000..c304c22f09a021a873b047ef84b095f12b058818 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/SaveMap.h @@ -0,0 +1,76 @@ +#ifndef _ROS_SERVICE_SaveMap_h +#define _ROS_SERVICE_SaveMap_h +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/String.h" + +namespace map_msgs +{ + +static const char SAVEMAP[] = "map_msgs/SaveMap"; + + class SaveMapRequest : public ros::Msg + { + public: + typedef std_msgs::String _filename_type; + _filename_type filename; + + SaveMapRequest(): + filename() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->filename.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->filename.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return SAVEMAP; }; + const char * getMD5(){ return "716e25f9d9dc76ceba197f93cbf05dc7"; }; + + }; + + class SaveMapResponse : public ros::Msg + { + public: + + SaveMapResponse() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return SAVEMAP; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class SaveMap { + public: + typedef SaveMapRequest Request; + typedef SaveMapResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/SetMapProjections.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/SetMapProjections.h new file mode 100644 index 0000000000000000000000000000000000000000..1ead172a4701853d02dd25344ad618eeb5b0baa4 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/map_msgs/SetMapProjections.h @@ -0,0 +1,96 @@ +#ifndef _ROS_SERVICE_SetMapProjections_h +#define _ROS_SERVICE_SetMapProjections_h +#include +#include +#include +#include "ros/msg.h" +#include "map_msgs/ProjectedMapInfo.h" + +namespace map_msgs +{ + +static const char SETMAPPROJECTIONS[] = "map_msgs/SetMapProjections"; + + class SetMapProjectionsRequest : public ros::Msg + { + public: + + SetMapProjectionsRequest() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return SETMAPPROJECTIONS; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class SetMapProjectionsResponse : public ros::Msg + { + public: + uint32_t projected_maps_info_length; + typedef map_msgs::ProjectedMapInfo _projected_maps_info_type; + _projected_maps_info_type st_projected_maps_info; + _projected_maps_info_type * projected_maps_info; + + SetMapProjectionsResponse(): + projected_maps_info_length(0), projected_maps_info(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->projected_maps_info_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->projected_maps_info_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->projected_maps_info_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->projected_maps_info_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->projected_maps_info_length); + for( uint32_t i = 0; i < projected_maps_info_length; i++){ + offset += this->projected_maps_info[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t projected_maps_info_lengthT = ((uint32_t) (*(inbuffer + offset))); + projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->projected_maps_info_length); + if(projected_maps_info_lengthT > projected_maps_info_length) + this->projected_maps_info = (map_msgs::ProjectedMapInfo*)realloc(this->projected_maps_info, projected_maps_info_lengthT * sizeof(map_msgs::ProjectedMapInfo)); + projected_maps_info_length = projected_maps_info_lengthT; + for( uint32_t i = 0; i < projected_maps_info_length; i++){ + offset += this->st_projected_maps_info.deserialize(inbuffer + offset); + memcpy( &(this->projected_maps_info[i]), &(this->st_projected_maps_info), sizeof(map_msgs::ProjectedMapInfo)); + } + return offset; + } + + const char * getType(){ return SETMAPPROJECTIONS; }; + const char * getMD5(){ return "d7980a33202421c8cd74565e57a4d229"; }; + + }; + + class SetMapProjections { + public: + typedef SetMapProjectionsRequest Request; + typedef SetMapProjectionsResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseAction.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseAction.h new file mode 100644 index 0000000000000000000000000000000000000000..ad79c6a59f7d95da4fe53724aa624930bba37fde --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_move_base_msgs_MoveBaseAction_h +#define _ROS_move_base_msgs_MoveBaseAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "move_base_msgs/MoveBaseActionGoal.h" +#include "move_base_msgs/MoveBaseActionResult.h" +#include "move_base_msgs/MoveBaseActionFeedback.h" + +namespace move_base_msgs +{ + + class MoveBaseAction : public ros::Msg + { + public: + typedef move_base_msgs::MoveBaseActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef move_base_msgs::MoveBaseActionResult _action_result_type; + _action_result_type action_result; + typedef move_base_msgs::MoveBaseActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + MoveBaseAction(): + 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 "move_base_msgs/MoveBaseAction"; }; + const char * getMD5(){ return "70b6aca7c7f7746d8d1609ad94c80bb8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseActionFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..1cfebc69b7ce76d37bdbc7c802a12949683568e2 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_move_base_msgs_MoveBaseActionFeedback_h +#define _ROS_move_base_msgs_MoveBaseActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "move_base_msgs/MoveBaseFeedback.h" + +namespace move_base_msgs +{ + + class MoveBaseActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef move_base_msgs::MoveBaseFeedback _feedback_type; + _feedback_type feedback; + + MoveBaseActionFeedback(): + 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 "move_base_msgs/MoveBaseActionFeedback"; }; + const char * getMD5(){ return "7d1870ff6e0decea702b943b5af0b42e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseActionGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..686c4960f6e73a359f2aa9247ea4392d2da5e38d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_move_base_msgs_MoveBaseActionGoal_h +#define _ROS_move_base_msgs_MoveBaseActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "move_base_msgs/MoveBaseGoal.h" + +namespace move_base_msgs +{ + + class MoveBaseActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef move_base_msgs::MoveBaseGoal _goal_type; + _goal_type goal; + + MoveBaseActionGoal(): + 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 "move_base_msgs/MoveBaseActionGoal"; }; + const char * getMD5(){ return "660d6895a1b9a16dce51fbdd9a64a56b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseActionResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..b9614e5aae84d79bb2e71ff3b4b75ae599cbff4d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_move_base_msgs_MoveBaseActionResult_h +#define _ROS_move_base_msgs_MoveBaseActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "move_base_msgs/MoveBaseResult.h" + +namespace move_base_msgs +{ + + class MoveBaseActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef move_base_msgs::MoveBaseResult _result_type; + _result_type result; + + MoveBaseActionResult(): + 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 "move_base_msgs/MoveBaseActionResult"; }; + const char * getMD5(){ return "1eb06eeff08fa7ea874431638cb52332"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..09adc4f282c38789f9c46ffc7eb1bd65195e9faf --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseFeedback.h @@ -0,0 +1,44 @@ +#ifndef _ROS_move_base_msgs_MoveBaseFeedback_h +#define _ROS_move_base_msgs_MoveBaseFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/PoseStamped.h" + +namespace move_base_msgs +{ + + class MoveBaseFeedback : public ros::Msg + { + public: + typedef geometry_msgs::PoseStamped _base_position_type; + _base_position_type base_position; + + MoveBaseFeedback(): + base_position() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->base_position.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->base_position.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "move_base_msgs/MoveBaseFeedback"; }; + const char * getMD5(){ return "3fb824c456a757373a226f6d08071bf0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..d2282173b32b178a8ad29671f28da68e8fa8eece --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseGoal.h @@ -0,0 +1,44 @@ +#ifndef _ROS_move_base_msgs_MoveBaseGoal_h +#define _ROS_move_base_msgs_MoveBaseGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/PoseStamped.h" + +namespace move_base_msgs +{ + + class MoveBaseGoal : public ros::Msg + { + public: + typedef geometry_msgs::PoseStamped _target_pose_type; + _target_pose_type target_pose; + + MoveBaseGoal(): + target_pose() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->target_pose.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->target_pose.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "move_base_msgs/MoveBaseGoal"; }; + const char * getMD5(){ return "257d089627d7eb7136c24d3593d05a16"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseResult.h new file mode 100644 index 0000000000000000000000000000000000000000..c43c53635ee2aa65222c5de4c9091be703a6243c --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/move_base_msgs/MoveBaseResult.h @@ -0,0 +1,38 @@ +#ifndef _ROS_move_base_msgs_MoveBaseResult_h +#define _ROS_move_base_msgs_MoveBaseResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace move_base_msgs +{ + + class MoveBaseResult : public ros::Msg + { + public: + + MoveBaseResult() + { + } + + 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 "move_base_msgs/MoveBaseResult"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMap.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMap.h new file mode 100644 index 0000000000000000000000000000000000000000..ef7e3fa061e925bd2c2481bfff112214cf03ee66 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMap.h @@ -0,0 +1,76 @@ +#ifndef _ROS_SERVICE_GetMap_h +#define _ROS_SERVICE_GetMap_h +#include +#include +#include +#include "ros/msg.h" +#include "nav_msgs/OccupancyGrid.h" + +namespace nav_msgs +{ + +static const char GETMAP[] = "nav_msgs/GetMap"; + + class GetMapRequest : public ros::Msg + { + public: + + GetMapRequest() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return GETMAP; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetMapResponse : public ros::Msg + { + public: + typedef nav_msgs::OccupancyGrid _map_type; + _map_type map; + + GetMapResponse(): + map() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->map.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->map.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return GETMAP; }; + const char * getMD5(){ return "6cdd0a18e0aff5b0a3ca2326a89b54ff"; }; + + }; + + class GetMap { + public: + typedef GetMapRequest Request; + typedef GetMapResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapAction.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapAction.h new file mode 100644 index 0000000000000000000000000000000000000000..56e82996b630e087630d1189ba7306e73947f9af --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_nav_msgs_GetMapAction_h +#define _ROS_nav_msgs_GetMapAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "nav_msgs/GetMapActionGoal.h" +#include "nav_msgs/GetMapActionResult.h" +#include "nav_msgs/GetMapActionFeedback.h" + +namespace nav_msgs +{ + + class GetMapAction : public ros::Msg + { + public: + typedef nav_msgs::GetMapActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef nav_msgs::GetMapActionResult _action_result_type; + _action_result_type action_result; + typedef nav_msgs::GetMapActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + GetMapAction(): + action_goal(), + action_result(), + action_feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->action_goal.serialize(outbuffer + offset); + offset += this->action_result.serialize(outbuffer + offset); + offset += this->action_feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->action_goal.deserialize(inbuffer + offset); + offset += this->action_result.deserialize(inbuffer + offset); + offset += this->action_feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "nav_msgs/GetMapAction"; }; + const char * getMD5(){ return "e611ad23fbf237c031b7536416dc7cd7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapActionFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..fb60003a1d35b41690069023c5832247c04fb96e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_nav_msgs_GetMapActionFeedback_h +#define _ROS_nav_msgs_GetMapActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "nav_msgs/GetMapFeedback.h" + +namespace nav_msgs +{ + + class GetMapActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef nav_msgs::GetMapFeedback _feedback_type; + _feedback_type feedback; + + GetMapActionFeedback(): + header(), + status(), + feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "nav_msgs/GetMapActionFeedback"; }; + const char * getMD5(){ return "aae20e09065c3809e8a8e87c4c8953fd"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapActionGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..da4244a675c0d8570234e22b651fe7ebf37de2ef --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_nav_msgs_GetMapActionGoal_h +#define _ROS_nav_msgs_GetMapActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "nav_msgs/GetMapGoal.h" + +namespace nav_msgs +{ + + class GetMapActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef nav_msgs::GetMapGoal _goal_type; + _goal_type goal; + + GetMapActionGoal(): + header(), + goal_id(), + goal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->goal_id.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->goal_id.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "nav_msgs/GetMapActionGoal"; }; + const char * getMD5(){ return "4b30be6cd12b9e72826df56b481f40e0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapActionResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..f614a35aa85b334160f59aa75af30c11571201bd --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_nav_msgs_GetMapActionResult_h +#define _ROS_nav_msgs_GetMapActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "nav_msgs/GetMapResult.h" + +namespace nav_msgs +{ + + class GetMapActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef nav_msgs::GetMapResult _result_type; + _result_type result; + + GetMapActionResult(): + header(), + status(), + result() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->result.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->result.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "nav_msgs/GetMapActionResult"; }; + const char * getMD5(){ return "ac66e5b9a79bb4bbd33dab245236c892"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..e3b4560abd6c8e6fdec156e71ef420bb4397b232 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapFeedback.h @@ -0,0 +1,38 @@ +#ifndef _ROS_nav_msgs_GetMapFeedback_h +#define _ROS_nav_msgs_GetMapFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace nav_msgs +{ + + class GetMapFeedback : public ros::Msg + { + public: + + GetMapFeedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return "nav_msgs/GetMapFeedback"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..88a17c5edb5e2e96076e7dbceba8f87a5cb4c6a8 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapGoal.h @@ -0,0 +1,38 @@ +#ifndef _ROS_nav_msgs_GetMapGoal_h +#define _ROS_nav_msgs_GetMapGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace nav_msgs +{ + + class GetMapGoal : public ros::Msg + { + public: + + GetMapGoal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return "nav_msgs/GetMapGoal"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapResult.h new file mode 100644 index 0000000000000000000000000000000000000000..1ef8fbd4d2df6cdaf7764ff6836156837f8e6791 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetMapResult.h @@ -0,0 +1,44 @@ +#ifndef _ROS_nav_msgs_GetMapResult_h +#define _ROS_nav_msgs_GetMapResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "nav_msgs/OccupancyGrid.h" + +namespace nav_msgs +{ + + class GetMapResult : public ros::Msg + { + public: + typedef nav_msgs::OccupancyGrid _map_type; + _map_type map; + + GetMapResult(): + map() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->map.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->map.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "nav_msgs/GetMapResult"; }; + const char * getMD5(){ return "6cdd0a18e0aff5b0a3ca2326a89b54ff"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetPlan.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetPlan.h new file mode 100644 index 0000000000000000000000000000000000000000..fe312b2ca9c0434749007302d951567710f23712 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GetPlan.h @@ -0,0 +1,111 @@ +#ifndef _ROS_SERVICE_GetPlan_h +#define _ROS_SERVICE_GetPlan_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/PoseStamped.h" +#include "nav_msgs/Path.h" + +namespace nav_msgs +{ + +static const char GETPLAN[] = "nav_msgs/GetPlan"; + + class GetPlanRequest : public ros::Msg + { + public: + typedef geometry_msgs::PoseStamped _start_type; + _start_type start; + typedef geometry_msgs::PoseStamped _goal_type; + _goal_type goal; + typedef float _tolerance_type; + _tolerance_type tolerance; + + GetPlanRequest(): + start(), + goal(), + tolerance(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->start.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_tolerance; + u_tolerance.real = this->tolerance; + *(outbuffer + offset + 0) = (u_tolerance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_tolerance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_tolerance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_tolerance.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->tolerance); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->start.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_tolerance; + u_tolerance.base = 0; + u_tolerance.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_tolerance.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_tolerance.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_tolerance.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->tolerance = u_tolerance.real; + offset += sizeof(this->tolerance); + return offset; + } + + const char * getType(){ return GETPLAN; }; + const char * getMD5(){ return "e25a43e0752bcca599a8c2eef8282df8"; }; + + }; + + class GetPlanResponse : public ros::Msg + { + public: + typedef nav_msgs::Path _plan_type; + _plan_type plan; + + GetPlanResponse(): + plan() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->plan.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->plan.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return GETPLAN; }; + const char * getMD5(){ return "0002bc113c0259d71f6cf8cbc9430e18"; }; + + }; + + class GetPlan { + public: + typedef GetPlanRequest Request; + typedef GetPlanResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GridCells.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GridCells.h new file mode 100644 index 0000000000000000000000000000000000000000..6c41cc669551b82b0e5a88b472e0f0df845be182 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/GridCells.h @@ -0,0 +1,118 @@ +#ifndef _ROS_nav_msgs_GridCells_h +#define _ROS_nav_msgs_GridCells_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Point.h" + +namespace nav_msgs +{ + + class GridCells : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef float _cell_width_type; + _cell_width_type cell_width; + typedef float _cell_height_type; + _cell_height_type cell_height; + uint32_t cells_length; + typedef geometry_msgs::Point _cells_type; + _cells_type st_cells; + _cells_type * cells; + + GridCells(): + header(), + cell_width(0), + cell_height(0), + cells_length(0), cells(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_cell_width; + u_cell_width.real = this->cell_width; + *(outbuffer + offset + 0) = (u_cell_width.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_cell_width.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_cell_width.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_cell_width.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->cell_width); + union { + float real; + uint32_t base; + } u_cell_height; + u_cell_height.real = this->cell_height; + *(outbuffer + offset + 0) = (u_cell_height.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_cell_height.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_cell_height.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_cell_height.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->cell_height); + *(outbuffer + offset + 0) = (this->cells_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->cells_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->cells_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->cells_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->cells_length); + for( uint32_t i = 0; i < cells_length; i++){ + offset += this->cells[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_cell_width; + u_cell_width.base = 0; + u_cell_width.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_cell_width.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_cell_width.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_cell_width.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->cell_width = u_cell_width.real; + offset += sizeof(this->cell_width); + union { + float real; + uint32_t base; + } u_cell_height; + u_cell_height.base = 0; + u_cell_height.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_cell_height.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_cell_height.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_cell_height.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->cell_height = u_cell_height.real; + offset += sizeof(this->cell_height); + uint32_t cells_lengthT = ((uint32_t) (*(inbuffer + offset))); + cells_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + cells_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + cells_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->cells_length); + if(cells_lengthT > cells_length) + this->cells = (geometry_msgs::Point*)realloc(this->cells, cells_lengthT * sizeof(geometry_msgs::Point)); + cells_length = cells_lengthT; + for( uint32_t i = 0; i < cells_length; i++){ + offset += this->st_cells.deserialize(inbuffer + offset); + memcpy( &(this->cells[i]), &(this->st_cells), sizeof(geometry_msgs::Point)); + } + return offset; + } + + const char * getType(){ return "nav_msgs/GridCells"; }; + const char * getMD5(){ return "b9e4f5df6d28e272ebde00a3994830f5"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/MapMetaData.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/MapMetaData.h new file mode 100644 index 0000000000000000000000000000000000000000..47733d907c058a9a84a3ec82a92adacb365f726b --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/MapMetaData.h @@ -0,0 +1,118 @@ +#ifndef _ROS_nav_msgs_MapMetaData_h +#define _ROS_nav_msgs_MapMetaData_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" +#include "geometry_msgs/Pose.h" + +namespace nav_msgs +{ + + class MapMetaData : public ros::Msg + { + public: + typedef ros::Time _map_load_time_type; + _map_load_time_type map_load_time; + typedef float _resolution_type; + _resolution_type resolution; + typedef uint32_t _width_type; + _width_type width; + typedef uint32_t _height_type; + _height_type height; + typedef geometry_msgs::Pose _origin_type; + _origin_type origin; + + MapMetaData(): + map_load_time(), + resolution(0), + width(0), + height(0), + origin() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->map_load_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->map_load_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->map_load_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->map_load_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->map_load_time.sec); + *(outbuffer + offset + 0) = (this->map_load_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->map_load_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->map_load_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->map_load_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->map_load_time.nsec); + union { + float real; + uint32_t base; + } u_resolution; + u_resolution.real = this->resolution; + *(outbuffer + offset + 0) = (u_resolution.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_resolution.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_resolution.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_resolution.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->resolution); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF; + offset += sizeof(this->width); + *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF; + offset += sizeof(this->height); + offset += this->origin.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->map_load_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->map_load_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->map_load_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->map_load_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->map_load_time.sec); + this->map_load_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->map_load_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->map_load_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->map_load_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->map_load_time.nsec); + union { + float real; + uint32_t base; + } u_resolution; + u_resolution.base = 0; + u_resolution.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_resolution.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_resolution.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_resolution.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->resolution = u_resolution.real; + offset += sizeof(this->resolution); + this->width = ((uint32_t) (*(inbuffer + offset))); + this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->width); + this->height = ((uint32_t) (*(inbuffer + offset))); + this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->height); + offset += this->origin.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "nav_msgs/MapMetaData"; }; + const char * getMD5(){ return "10cfc8a2818024d3248802c00c95f11b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/OccupancyGrid.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/OccupancyGrid.h new file mode 100644 index 0000000000000000000000000000000000000000..4205f43e26d0dfb119a56296d1ed474a16c435f7 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/OccupancyGrid.h @@ -0,0 +1,88 @@ +#ifndef _ROS_nav_msgs_OccupancyGrid_h +#define _ROS_nav_msgs_OccupancyGrid_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "nav_msgs/MapMetaData.h" + +namespace nav_msgs +{ + + class OccupancyGrid : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef nav_msgs::MapMetaData _info_type; + _info_type info; + uint32_t data_length; + typedef int8_t _data_type; + _data_type st_data; + _data_type * data; + + OccupancyGrid(): + header(), + info(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->info.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->info.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (int8_t*)realloc(this->data, data_lengthT * sizeof(int8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(int8_t)); + } + return offset; + } + + const char * getType(){ return "nav_msgs/OccupancyGrid"; }; + const char * getMD5(){ return "3381f2d731d4076ec5c71b0759edbe4e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/Odometry.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/Odometry.h new file mode 100644 index 0000000000000000000000000000000000000000..e8eaca598658db00830457e01f52cd466bbd47d6 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/Odometry.h @@ -0,0 +1,73 @@ +#ifndef _ROS_nav_msgs_Odometry_h +#define _ROS_nav_msgs_Odometry_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../std_msgs/Header.h" +#include "../geometry_msgs/PoseWithCovariance.h" +#include "../geometry_msgs/TwistWithCovariance.h" + +namespace nav_msgs +{ + + class Odometry : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _child_frame_id_type; + _child_frame_id_type child_frame_id; + typedef geometry_msgs::PoseWithCovariance _pose_type; + _pose_type pose; + typedef geometry_msgs::TwistWithCovariance _twist_type; + _twist_type twist; + + Odometry(): + header(), + child_frame_id(""), + pose(), + twist() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_child_frame_id = strlen(this->child_frame_id); + varToArr(outbuffer + offset, length_child_frame_id); + offset += 4; + memcpy(outbuffer + offset, this->child_frame_id, length_child_frame_id); + offset += length_child_frame_id; + offset += this->pose.serialize(outbuffer + offset); + offset += this->twist.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_child_frame_id; + arrToVar(length_child_frame_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_child_frame_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_child_frame_id-1]=0; + this->child_frame_id = (char *)(inbuffer + offset-1); + offset += length_child_frame_id; + offset += this->pose.deserialize(inbuffer + offset); + offset += this->twist.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "nav_msgs/Odometry"; }; + const char * getMD5(){ return "cd5e73d190d741a2f92e81eda573aca7"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/Path.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/Path.h new file mode 100644 index 0000000000000000000000000000000000000000..858770643a6517d6e09dcaea4a6a7653d7a9e34e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/Path.h @@ -0,0 +1,70 @@ +#ifndef _ROS_nav_msgs_Path_h +#define _ROS_nav_msgs_Path_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/PoseStamped.h" + +namespace nav_msgs +{ + + class Path : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t poses_length; + typedef geometry_msgs::PoseStamped _poses_type; + _poses_type st_poses; + _poses_type * poses; + + Path(): + header(), + poses_length(0), poses(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->poses_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->poses_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->poses_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->poses_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->poses_length); + for( uint32_t i = 0; i < poses_length; i++){ + offset += this->poses[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t poses_lengthT = ((uint32_t) (*(inbuffer + offset))); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->poses_length); + if(poses_lengthT > poses_length) + this->poses = (geometry_msgs::PoseStamped*)realloc(this->poses, poses_lengthT * sizeof(geometry_msgs::PoseStamped)); + poses_length = poses_lengthT; + for( uint32_t i = 0; i < poses_length; i++){ + offset += this->st_poses.deserialize(inbuffer + offset); + memcpy( &(this->poses[i]), &(this->st_poses), sizeof(geometry_msgs::PoseStamped)); + } + return offset; + } + + const char * getType(){ return "nav_msgs/Path"; }; + const char * getMD5(){ return "6227e2b7e9cce15051f669a5e197bbf7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/SetMap.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/SetMap.h new file mode 100644 index 0000000000000000000000000000000000000000..717cead99266b467a6146fbd76039a66b069759f --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nav_msgs/SetMap.h @@ -0,0 +1,100 @@ +#ifndef _ROS_SERVICE_SetMap_h +#define _ROS_SERVICE_SetMap_h +#include +#include +#include +#include "ros/msg.h" +#include "nav_msgs/OccupancyGrid.h" +#include "geometry_msgs/PoseWithCovarianceStamped.h" + +namespace nav_msgs +{ + +static const char SETMAP[] = "nav_msgs/SetMap"; + + class SetMapRequest : public ros::Msg + { + public: + typedef nav_msgs::OccupancyGrid _map_type; + _map_type map; + typedef geometry_msgs::PoseWithCovarianceStamped _initial_pose_type; + _initial_pose_type initial_pose; + + SetMapRequest(): + map(), + initial_pose() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->map.serialize(outbuffer + offset); + offset += this->initial_pose.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->map.deserialize(inbuffer + offset); + offset += this->initial_pose.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return SETMAP; }; + const char * getMD5(){ return "91149a20d7be299b87c340df8cc94fd4"; }; + + }; + + class SetMapResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + + SetMapResponse(): + success(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + return offset; + } + + const char * getType(){ return SETMAP; }; + const char * getMD5(){ return "358e233cde0c8a8bcfea4ce193f8fc15"; }; + + }; + + class SetMap { + public: + typedef SetMapRequest Request; + typedef SetMapResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/navfn/MakeNavPlan.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/navfn/MakeNavPlan.h new file mode 100644 index 0000000000000000000000000000000000000000..787905bd58e46393062a179e820284d59ba02568 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/navfn/MakeNavPlan.h @@ -0,0 +1,130 @@ +#ifndef _ROS_SERVICE_MakeNavPlan_h +#define _ROS_SERVICE_MakeNavPlan_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/PoseStamped.h" + +namespace navfn +{ + +static const char MAKENAVPLAN[] = "navfn/MakeNavPlan"; + + class MakeNavPlanRequest : public ros::Msg + { + public: + typedef geometry_msgs::PoseStamped _start_type; + _start_type start; + typedef geometry_msgs::PoseStamped _goal_type; + _goal_type goal; + + MakeNavPlanRequest(): + start(), + goal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->start.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->start.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return MAKENAVPLAN; }; + const char * getMD5(){ return "2fe3126bd5b2d56edd5005220333d4fd"; }; + + }; + + class MakeNavPlanResponse : public ros::Msg + { + public: + typedef uint8_t _plan_found_type; + _plan_found_type plan_found; + typedef const char* _error_message_type; + _error_message_type error_message; + uint32_t path_length; + typedef geometry_msgs::PoseStamped _path_type; + _path_type st_path; + _path_type * path; + + MakeNavPlanResponse(): + plan_found(0), + error_message(""), + path_length(0), path(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->plan_found >> (8 * 0)) & 0xFF; + offset += sizeof(this->plan_found); + uint32_t length_error_message = strlen(this->error_message); + varToArr(outbuffer + offset, length_error_message); + offset += 4; + memcpy(outbuffer + offset, this->error_message, length_error_message); + offset += length_error_message; + *(outbuffer + offset + 0) = (this->path_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->path_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->path_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->path_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->path_length); + for( uint32_t i = 0; i < path_length; i++){ + offset += this->path[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->plan_found = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->plan_found); + uint32_t length_error_message; + arrToVar(length_error_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_error_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_error_message-1]=0; + this->error_message = (char *)(inbuffer + offset-1); + offset += length_error_message; + uint32_t path_lengthT = ((uint32_t) (*(inbuffer + offset))); + path_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + path_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + path_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->path_length); + if(path_lengthT > path_length) + this->path = (geometry_msgs::PoseStamped*)realloc(this->path, path_lengthT * sizeof(geometry_msgs::PoseStamped)); + path_length = path_lengthT; + for( uint32_t i = 0; i < path_length; i++){ + offset += this->st_path.deserialize(inbuffer + offset); + memcpy( &(this->path[i]), &(this->st_path), sizeof(geometry_msgs::PoseStamped)); + } + return offset; + } + + const char * getType(){ return MAKENAVPLAN; }; + const char * getMD5(){ return "8b8ed7edf1b237dc9ddda8c8ffed5d3a"; }; + + }; + + class MakeNavPlan { + public: + typedef MakeNavPlanRequest Request; + typedef MakeNavPlanResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/navfn/SetCostmap.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/navfn/SetCostmap.h new file mode 100644 index 0000000000000000000000000000000000000000..8f746c5082e795f1d1d86c26ebdc9c5e06f15e0b --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/navfn/SetCostmap.h @@ -0,0 +1,115 @@ +#ifndef _ROS_SERVICE_SetCostmap_h +#define _ROS_SERVICE_SetCostmap_h +#include +#include +#include +#include "ros/msg.h" + +namespace navfn +{ + +static const char SETCOSTMAP[] = "navfn/SetCostmap"; + + class SetCostmapRequest : public ros::Msg + { + public: + uint32_t costs_length; + typedef uint8_t _costs_type; + _costs_type st_costs; + _costs_type * costs; + typedef uint16_t _height_type; + _height_type height; + typedef uint16_t _width_type; + _width_type width; + + SetCostmapRequest(): + costs_length(0), costs(NULL), + height(0), + width(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->costs_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->costs_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->costs_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->costs_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->costs_length); + for( uint32_t i = 0; i < costs_length; i++){ + *(outbuffer + offset + 0) = (this->costs[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->costs[i]); + } + *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; + offset += sizeof(this->height); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; + offset += sizeof(this->width); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t costs_lengthT = ((uint32_t) (*(inbuffer + offset))); + costs_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + costs_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + costs_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->costs_length); + if(costs_lengthT > costs_length) + this->costs = (uint8_t*)realloc(this->costs, costs_lengthT * sizeof(uint8_t)); + costs_length = costs_lengthT; + for( uint32_t i = 0; i < costs_length; i++){ + this->st_costs = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_costs); + memcpy( &(this->costs[i]), &(this->st_costs), sizeof(uint8_t)); + } + this->height = ((uint16_t) (*(inbuffer + offset))); + this->height |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->height); + this->width = ((uint16_t) (*(inbuffer + offset))); + this->width |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->width); + return offset; + } + + const char * getType(){ return SETCOSTMAP; }; + const char * getMD5(){ return "370ec969cdb71f9cde7c7cbe0d752308"; }; + + }; + + class SetCostmapResponse : public ros::Msg + { + public: + + SetCostmapResponse() + { + } + + 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 SETCOSTMAP; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class SetCostmap { + public: + typedef SetCostmapRequest Request; + typedef SetCostmapResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nodelet/NodeletList.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nodelet/NodeletList.h new file mode 100644 index 0000000000000000000000000000000000000000..6210fa0386bd053540d41974a8d1cae2654eca12 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nodelet/NodeletList.h @@ -0,0 +1,107 @@ +#ifndef _ROS_SERVICE_NodeletList_h +#define _ROS_SERVICE_NodeletList_h +#include +#include +#include +#include "ros/msg.h" + +namespace nodelet +{ + +static const char NODELETLIST[] = "nodelet/NodeletList"; + + class NodeletListRequest : public ros::Msg + { + public: + + NodeletListRequest() + { + } + + 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 NODELETLIST; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class NodeletListResponse : public ros::Msg + { + public: + uint32_t nodelets_length; + typedef char* _nodelets_type; + _nodelets_type st_nodelets; + _nodelets_type * nodelets; + + NodeletListResponse(): + nodelets_length(0), nodelets(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->nodelets_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->nodelets_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->nodelets_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->nodelets_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->nodelets_length); + for( uint32_t i = 0; i < nodelets_length; i++){ + uint32_t length_nodeletsi = strlen(this->nodelets[i]); + varToArr(outbuffer + offset, length_nodeletsi); + offset += 4; + memcpy(outbuffer + offset, this->nodelets[i], length_nodeletsi); + offset += length_nodeletsi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t nodelets_lengthT = ((uint32_t) (*(inbuffer + offset))); + nodelets_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + nodelets_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + nodelets_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->nodelets_length); + if(nodelets_lengthT > nodelets_length) + this->nodelets = (char**)realloc(this->nodelets, nodelets_lengthT * sizeof(char*)); + nodelets_length = nodelets_lengthT; + for( uint32_t i = 0; i < nodelets_length; i++){ + uint32_t length_st_nodelets; + arrToVar(length_st_nodelets, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_nodelets; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_nodelets-1]=0; + this->st_nodelets = (char *)(inbuffer + offset-1); + offset += length_st_nodelets; + memcpy( &(this->nodelets[i]), &(this->st_nodelets), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return NODELETLIST; }; + const char * getMD5(){ return "99c7b10e794f5600b8030e697e946ca7"; }; + + }; + + class NodeletList { + public: + typedef NodeletListRequest Request; + typedef NodeletListResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nodelet/NodeletLoad.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nodelet/NodeletLoad.h new file mode 100644 index 0000000000000000000000000000000000000000..e7a9c5c76f0dac758b6666d02c01f19d4b6d0fba --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nodelet/NodeletLoad.h @@ -0,0 +1,250 @@ +#ifndef _ROS_SERVICE_NodeletLoad_h +#define _ROS_SERVICE_NodeletLoad_h +#include +#include +#include +#include "ros/msg.h" + +namespace nodelet +{ + +static const char NODELETLOAD[] = "nodelet/NodeletLoad"; + + class NodeletLoadRequest : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _type_type; + _type_type type; + uint32_t remap_source_args_length; + typedef char* _remap_source_args_type; + _remap_source_args_type st_remap_source_args; + _remap_source_args_type * remap_source_args; + uint32_t remap_target_args_length; + typedef char* _remap_target_args_type; + _remap_target_args_type st_remap_target_args; + _remap_target_args_type * remap_target_args; + uint32_t my_argv_length; + typedef char* _my_argv_type; + _my_argv_type st_my_argv; + _my_argv_type * my_argv; + typedef const char* _bond_id_type; + _bond_id_type bond_id; + + NodeletLoadRequest(): + name(""), + type(""), + remap_source_args_length(0), remap_source_args(NULL), + remap_target_args_length(0), remap_target_args(NULL), + my_argv_length(0), my_argv(NULL), + bond_id("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_type = strlen(this->type); + varToArr(outbuffer + offset, length_type); + offset += 4; + memcpy(outbuffer + offset, this->type, length_type); + offset += length_type; + *(outbuffer + offset + 0) = (this->remap_source_args_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->remap_source_args_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->remap_source_args_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->remap_source_args_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->remap_source_args_length); + for( uint32_t i = 0; i < remap_source_args_length; i++){ + uint32_t length_remap_source_argsi = strlen(this->remap_source_args[i]); + varToArr(outbuffer + offset, length_remap_source_argsi); + offset += 4; + memcpy(outbuffer + offset, this->remap_source_args[i], length_remap_source_argsi); + offset += length_remap_source_argsi; + } + *(outbuffer + offset + 0) = (this->remap_target_args_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->remap_target_args_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->remap_target_args_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->remap_target_args_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->remap_target_args_length); + for( uint32_t i = 0; i < remap_target_args_length; i++){ + uint32_t length_remap_target_argsi = strlen(this->remap_target_args[i]); + varToArr(outbuffer + offset, length_remap_target_argsi); + offset += 4; + memcpy(outbuffer + offset, this->remap_target_args[i], length_remap_target_argsi); + offset += length_remap_target_argsi; + } + *(outbuffer + offset + 0) = (this->my_argv_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->my_argv_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->my_argv_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->my_argv_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->my_argv_length); + for( uint32_t i = 0; i < my_argv_length; i++){ + uint32_t length_my_argvi = strlen(this->my_argv[i]); + varToArr(outbuffer + offset, length_my_argvi); + offset += 4; + memcpy(outbuffer + offset, this->my_argv[i], length_my_argvi); + offset += length_my_argvi; + } + uint32_t length_bond_id = strlen(this->bond_id); + varToArr(outbuffer + offset, length_bond_id); + offset += 4; + memcpy(outbuffer + offset, this->bond_id, length_bond_id); + offset += length_bond_id; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_type; + arrToVar(length_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type-1]=0; + this->type = (char *)(inbuffer + offset-1); + offset += length_type; + uint32_t remap_source_args_lengthT = ((uint32_t) (*(inbuffer + offset))); + remap_source_args_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + remap_source_args_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + remap_source_args_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->remap_source_args_length); + if(remap_source_args_lengthT > remap_source_args_length) + this->remap_source_args = (char**)realloc(this->remap_source_args, remap_source_args_lengthT * sizeof(char*)); + remap_source_args_length = remap_source_args_lengthT; + for( uint32_t i = 0; i < remap_source_args_length; i++){ + uint32_t length_st_remap_source_args; + arrToVar(length_st_remap_source_args, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_remap_source_args; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_remap_source_args-1]=0; + this->st_remap_source_args = (char *)(inbuffer + offset-1); + offset += length_st_remap_source_args; + memcpy( &(this->remap_source_args[i]), &(this->st_remap_source_args), sizeof(char*)); + } + uint32_t remap_target_args_lengthT = ((uint32_t) (*(inbuffer + offset))); + remap_target_args_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + remap_target_args_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + remap_target_args_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->remap_target_args_length); + if(remap_target_args_lengthT > remap_target_args_length) + this->remap_target_args = (char**)realloc(this->remap_target_args, remap_target_args_lengthT * sizeof(char*)); + remap_target_args_length = remap_target_args_lengthT; + for( uint32_t i = 0; i < remap_target_args_length; i++){ + uint32_t length_st_remap_target_args; + arrToVar(length_st_remap_target_args, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_remap_target_args; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_remap_target_args-1]=0; + this->st_remap_target_args = (char *)(inbuffer + offset-1); + offset += length_st_remap_target_args; + memcpy( &(this->remap_target_args[i]), &(this->st_remap_target_args), sizeof(char*)); + } + uint32_t my_argv_lengthT = ((uint32_t) (*(inbuffer + offset))); + my_argv_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + my_argv_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + my_argv_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->my_argv_length); + if(my_argv_lengthT > my_argv_length) + this->my_argv = (char**)realloc(this->my_argv, my_argv_lengthT * sizeof(char*)); + my_argv_length = my_argv_lengthT; + for( uint32_t i = 0; i < my_argv_length; i++){ + uint32_t length_st_my_argv; + arrToVar(length_st_my_argv, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_my_argv; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_my_argv-1]=0; + this->st_my_argv = (char *)(inbuffer + offset-1); + offset += length_st_my_argv; + memcpy( &(this->my_argv[i]), &(this->st_my_argv), sizeof(char*)); + } + uint32_t length_bond_id; + arrToVar(length_bond_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_bond_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_bond_id-1]=0; + this->bond_id = (char *)(inbuffer + offset-1); + offset += length_bond_id; + return offset; + } + + const char * getType(){ return NODELETLOAD; }; + const char * getMD5(){ return "c6e28cc4d2e259249d96cfb50658fbec"; }; + + }; + + class NodeletLoadResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + + NodeletLoadResponse(): + success(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + return offset; + } + + const char * getType(){ return NODELETLOAD; }; + const char * getMD5(){ return "358e233cde0c8a8bcfea4ce193f8fc15"; }; + + }; + + class NodeletLoad { + public: + typedef NodeletLoadRequest Request; + typedef NodeletLoadResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nodelet/NodeletUnload.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nodelet/NodeletUnload.h new file mode 100644 index 0000000000000000000000000000000000000000..bc865b484c324627c098b7f29ceada5dc18c4dcf --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/nodelet/NodeletUnload.h @@ -0,0 +1,105 @@ +#ifndef _ROS_SERVICE_NodeletUnload_h +#define _ROS_SERVICE_NodeletUnload_h +#include +#include +#include +#include "ros/msg.h" + +namespace nodelet +{ + +static const char NODELETUNLOAD[] = "nodelet/NodeletUnload"; + + class NodeletUnloadRequest : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + + NodeletUnloadRequest(): + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return NODELETUNLOAD; }; + const char * getMD5(){ return "c1f3d28f1b044c871e6eff2e9fc3c667"; }; + + }; + + class NodeletUnloadResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + + NodeletUnloadResponse(): + success(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + return offset; + } + + const char * getType(){ return NODELETUNLOAD; }; + const char * getMD5(){ return "358e233cde0c8a8bcfea4ce193f8fc15"; }; + + }; + + class NodeletUnload { + public: + typedef NodeletUnloadRequest Request; + typedef NodeletUnloadResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/openni2_camera/GetSerial.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/openni2_camera/GetSerial.h new file mode 100644 index 0000000000000000000000000000000000000000..c0f1cdf6ace0963aa4697f4ed9e675a76c87fa89 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/openni2_camera/GetSerial.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_GetSerial_h +#define _ROS_SERVICE_GetSerial_h +#include +#include +#include +#include "ros/msg.h" + +namespace openni2_camera +{ + +static const char GETSERIAL[] = "openni2_camera/GetSerial"; + + class GetSerialRequest : public ros::Msg + { + public: + + GetSerialRequest() + { + } + + 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 GETSERIAL; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetSerialResponse : public ros::Msg + { + public: + typedef const char* _serial_type; + _serial_type serial; + + GetSerialResponse(): + serial("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_serial = strlen(this->serial); + varToArr(outbuffer + offset, length_serial); + offset += 4; + memcpy(outbuffer + offset, this->serial, length_serial); + offset += length_serial; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_serial; + arrToVar(length_serial, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_serial; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_serial-1]=0; + this->serial = (char *)(inbuffer + offset-1); + offset += length_serial; + return offset; + } + + const char * getType(){ return GETSERIAL; }; + const char * getMD5(){ return "fca40cf463282a80db4e2037c8a61741"; }; + + }; + + class GetSerial { + public: + typedef GetSerialRequest Request; + typedef GetSerialResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/pcl_msgs/ModelCoefficients.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/pcl_msgs/ModelCoefficients.h new file mode 100644 index 0000000000000000000000000000000000000000..3256a94821720456308306b84670a142b476e4a2 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/pcl_msgs/ModelCoefficients.h @@ -0,0 +1,88 @@ +#ifndef _ROS_pcl_msgs_ModelCoefficients_h +#define _ROS_pcl_msgs_ModelCoefficients_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace pcl_msgs +{ + + class ModelCoefficients : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t values_length; + typedef float _values_type; + _values_type st_values; + _values_type * values; + + ModelCoefficients(): + header(), + values_length(0), values(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->values_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->values_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->values_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->values_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->values_length); + for( uint32_t i = 0; i < values_length; i++){ + union { + float real; + uint32_t base; + } u_valuesi; + u_valuesi.real = this->values[i]; + *(outbuffer + offset + 0) = (u_valuesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_valuesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_valuesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_valuesi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->values[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t values_lengthT = ((uint32_t) (*(inbuffer + offset))); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->values_length); + if(values_lengthT > values_length) + this->values = (float*)realloc(this->values, values_lengthT * sizeof(float)); + values_length = values_lengthT; + for( uint32_t i = 0; i < values_length; i++){ + union { + float real; + uint32_t base; + } u_st_values; + u_st_values.base = 0; + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_values = u_st_values.real; + offset += sizeof(this->st_values); + memcpy( &(this->values[i]), &(this->st_values), sizeof(float)); + } + return offset; + } + + const char * getType(){ return "pcl_msgs/ModelCoefficients"; }; + const char * getMD5(){ return "ca27dea75e72cb894cd36f9e5005e93e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/pcl_msgs/PointIndices.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/pcl_msgs/PointIndices.h new file mode 100644 index 0000000000000000000000000000000000000000..56feb9b428ad535b79ca0be1e1e8adb3abcffba4 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/pcl_msgs/PointIndices.h @@ -0,0 +1,88 @@ +#ifndef _ROS_pcl_msgs_PointIndices_h +#define _ROS_pcl_msgs_PointIndices_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace pcl_msgs +{ + + class PointIndices : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t indices_length; + typedef int32_t _indices_type; + _indices_type st_indices; + _indices_type * indices; + + PointIndices(): + header(), + indices_length(0), indices(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->indices_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->indices_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->indices_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->indices_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->indices_length); + for( uint32_t i = 0; i < indices_length; i++){ + union { + int32_t real; + uint32_t base; + } u_indicesi; + u_indicesi.real = this->indices[i]; + *(outbuffer + offset + 0) = (u_indicesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_indicesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_indicesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_indicesi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->indices[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t indices_lengthT = ((uint32_t) (*(inbuffer + offset))); + indices_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + indices_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + indices_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->indices_length); + if(indices_lengthT > indices_length) + this->indices = (int32_t*)realloc(this->indices, indices_lengthT * sizeof(int32_t)); + indices_length = indices_lengthT; + for( uint32_t i = 0; i < indices_length; i++){ + union { + int32_t real; + uint32_t base; + } u_st_indices; + u_st_indices.base = 0; + u_st_indices.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_indices.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_indices.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_indices.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_indices = u_st_indices.real; + offset += sizeof(this->st_indices); + memcpy( &(this->indices[i]), &(this->st_indices), sizeof(int32_t)); + } + return offset; + } + + const char * getType(){ return "pcl_msgs/PointIndices"; }; + const char * getMD5(){ return "458c7998b7eaf99908256472e273b3d4"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/pcl_msgs/PolygonMesh.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/pcl_msgs/PolygonMesh.h new file mode 100644 index 0000000000000000000000000000000000000000..d98e4c15539d6d2ca6cf0367547c6dbe170bda0f --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/pcl_msgs/PolygonMesh.h @@ -0,0 +1,76 @@ +#ifndef _ROS_pcl_msgs_PolygonMesh_h +#define _ROS_pcl_msgs_PolygonMesh_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/PointCloud2.h" +#include "pcl_msgs/Vertices.h" + +namespace pcl_msgs +{ + + class PolygonMesh : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef sensor_msgs::PointCloud2 _cloud_type; + _cloud_type cloud; + uint32_t polygons_length; + typedef pcl_msgs::Vertices _polygons_type; + _polygons_type st_polygons; + _polygons_type * polygons; + + PolygonMesh(): + header(), + cloud(), + polygons_length(0), polygons(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->cloud.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->polygons_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->polygons_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->polygons_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->polygons_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->polygons_length); + for( uint32_t i = 0; i < polygons_length; i++){ + offset += this->polygons[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->cloud.deserialize(inbuffer + offset); + uint32_t polygons_lengthT = ((uint32_t) (*(inbuffer + offset))); + polygons_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + polygons_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + polygons_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->polygons_length); + if(polygons_lengthT > polygons_length) + this->polygons = (pcl_msgs::Vertices*)realloc(this->polygons, polygons_lengthT * sizeof(pcl_msgs::Vertices)); + polygons_length = polygons_lengthT; + for( uint32_t i = 0; i < polygons_length; i++){ + offset += this->st_polygons.deserialize(inbuffer + offset); + memcpy( &(this->polygons[i]), &(this->st_polygons), sizeof(pcl_msgs::Vertices)); + } + return offset; + } + + const char * getType(){ return "pcl_msgs/PolygonMesh"; }; + const char * getMD5(){ return "45a5fc6ad2cde8489600a790acc9a38a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/pcl_msgs/Vertices.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/pcl_msgs/Vertices.h new file mode 100644 index 0000000000000000000000000000000000000000..55a67045605dc403395107815dacb5b4da59f44b --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/pcl_msgs/Vertices.h @@ -0,0 +1,71 @@ +#ifndef _ROS_pcl_msgs_Vertices_h +#define _ROS_pcl_msgs_Vertices_h + +#include +#include +#include +#include "ros/msg.h" + +namespace pcl_msgs +{ + + class Vertices : public ros::Msg + { + public: + uint32_t vertices_length; + typedef uint32_t _vertices_type; + _vertices_type st_vertices; + _vertices_type * vertices; + + Vertices(): + vertices_length(0), vertices(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->vertices_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->vertices_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->vertices_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->vertices_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->vertices_length); + for( uint32_t i = 0; i < vertices_length; i++){ + *(outbuffer + offset + 0) = (this->vertices[i] >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->vertices[i] >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->vertices[i] >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->vertices[i] >> (8 * 3)) & 0xFF; + offset += sizeof(this->vertices[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t vertices_lengthT = ((uint32_t) (*(inbuffer + offset))); + vertices_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + vertices_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + vertices_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->vertices_length); + if(vertices_lengthT > vertices_length) + this->vertices = (uint32_t*)realloc(this->vertices, vertices_lengthT * sizeof(uint32_t)); + vertices_length = vertices_lengthT; + for( uint32_t i = 0; i < vertices_length; i++){ + this->st_vertices = ((uint32_t) (*(inbuffer + offset))); + this->st_vertices |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->st_vertices |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->st_vertices |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->st_vertices); + memcpy( &(this->vertices[i]), &(this->st_vertices), sizeof(uint32_t)); + } + return offset; + } + + const char * getType(){ return "pcl_msgs/Vertices"; }; + const char * getMD5(){ return "39bd7b1c23763ddd1b882b97cb7cfe11"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/polled_camera/GetPolledImage.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/polled_camera/GetPolledImage.h new file mode 100644 index 0000000000000000000000000000000000000000..b06240573d3c8944191f7ae26e3ed3a91a24ae94 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/polled_camera/GetPolledImage.h @@ -0,0 +1,202 @@ +#ifndef _ROS_SERVICE_GetPolledImage_h +#define _ROS_SERVICE_GetPolledImage_h +#include +#include +#include +#include "ros/msg.h" +#include "sensor_msgs/RegionOfInterest.h" +#include "ros/duration.h" +#include "ros/time.h" + +namespace polled_camera +{ + +static const char GETPOLLEDIMAGE[] = "polled_camera/GetPolledImage"; + + class GetPolledImageRequest : public ros::Msg + { + public: + typedef const char* _response_namespace_type; + _response_namespace_type response_namespace; + typedef ros::Duration _timeout_type; + _timeout_type timeout; + typedef uint32_t _binning_x_type; + _binning_x_type binning_x; + typedef uint32_t _binning_y_type; + _binning_y_type binning_y; + typedef sensor_msgs::RegionOfInterest _roi_type; + _roi_type roi; + + GetPolledImageRequest(): + response_namespace(""), + timeout(), + binning_x(0), + binning_y(0), + roi() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_response_namespace = strlen(this->response_namespace); + varToArr(outbuffer + offset, length_response_namespace); + offset += 4; + memcpy(outbuffer + offset, this->response_namespace, length_response_namespace); + offset += length_response_namespace; + *(outbuffer + offset + 0) = (this->timeout.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timeout.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timeout.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timeout.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timeout.sec); + *(outbuffer + offset + 0) = (this->timeout.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timeout.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timeout.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timeout.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timeout.nsec); + *(outbuffer + offset + 0) = (this->binning_x >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->binning_x >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->binning_x >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->binning_x >> (8 * 3)) & 0xFF; + offset += sizeof(this->binning_x); + *(outbuffer + offset + 0) = (this->binning_y >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->binning_y >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->binning_y >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->binning_y >> (8 * 3)) & 0xFF; + offset += sizeof(this->binning_y); + offset += this->roi.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_response_namespace; + arrToVar(length_response_namespace, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_response_namespace; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_response_namespace-1]=0; + this->response_namespace = (char *)(inbuffer + offset-1); + offset += length_response_namespace; + this->timeout.sec = ((uint32_t) (*(inbuffer + offset))); + this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timeout.sec); + this->timeout.nsec = ((uint32_t) (*(inbuffer + offset))); + this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timeout.nsec); + this->binning_x = ((uint32_t) (*(inbuffer + offset))); + this->binning_x |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->binning_x |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->binning_x |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->binning_x); + this->binning_y = ((uint32_t) (*(inbuffer + offset))); + this->binning_y |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->binning_y |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->binning_y |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->binning_y); + offset += this->roi.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return GETPOLLEDIMAGE; }; + const char * getMD5(){ return "c77ed43e530fd48e9e7a2a93845e154c"; }; + + }; + + class GetPolledImageResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + typedef ros::Time _stamp_type; + _stamp_type stamp; + + GetPolledImageResponse(): + success(0), + status_message(""), + stamp() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + *(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); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + 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); + return offset; + } + + const char * getType(){ return GETPOLLEDIMAGE; }; + const char * getMD5(){ return "dbf1f851bc511800e6129ccd5a3542ab"; }; + + }; + + class GetPolledImage { + public: + typedef GetPolledImageRequest Request; + typedef GetPolledImageResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/Behaviour.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/Behaviour.h new file mode 100644 index 0000000000000000000000000000000000000000..04c5d8ad267bab1b743a790279c50d22526e3987 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/Behaviour.h @@ -0,0 +1,183 @@ +#ifndef _ROS_py_trees_msgs_Behaviour_h +#define _ROS_py_trees_msgs_Behaviour_h + +#include +#include +#include +#include "ros/msg.h" +#include "uuid_msgs/UniqueID.h" + +namespace py_trees_msgs +{ + + class Behaviour : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _class_name_type; + _class_name_type class_name; + typedef uuid_msgs::UniqueID _own_id_type; + _own_id_type own_id; + typedef uuid_msgs::UniqueID _parent_id_type; + _parent_id_type parent_id; + typedef uuid_msgs::UniqueID _tip_id_type; + _tip_id_type tip_id; + uint32_t child_ids_length; + typedef uuid_msgs::UniqueID _child_ids_type; + _child_ids_type st_child_ids; + _child_ids_type * child_ids; + typedef uint8_t _type_type; + _type_type type; + typedef uint8_t _blackbox_level_type; + _blackbox_level_type blackbox_level; + typedef uint8_t _status_type; + _status_type status; + typedef const char* _message_type; + _message_type message; + typedef bool _is_active_type; + _is_active_type is_active; + enum { INVALID = 1 }; + enum { RUNNING = 2 }; + enum { SUCCESS = 3 }; + enum { FAILURE = 4 }; + enum { UNKNOWN_TYPE = 0 }; + enum { BEHAVIOUR = 1 }; + enum { SEQUENCE = 2 }; + enum { SELECTOR = 3 }; + enum { PARALLEL = 4 }; + enum { CHOOSER = 5 }; + enum { BLACKBOX_LEVEL_DETAIL = 1 }; + enum { BLACKBOX_LEVEL_COMPONENT = 2 }; + enum { BLACKBOX_LEVEL_BIG_PICTURE = 3 }; + enum { BLACKBOX_LEVEL_NOT_A_BLACKBOX = 4 }; + + Behaviour(): + name(""), + class_name(""), + own_id(), + parent_id(), + tip_id(), + child_ids_length(0), child_ids(NULL), + type(0), + blackbox_level(0), + status(0), + message(""), + is_active(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_class_name = strlen(this->class_name); + varToArr(outbuffer + offset, length_class_name); + offset += 4; + memcpy(outbuffer + offset, this->class_name, length_class_name); + offset += length_class_name; + offset += this->own_id.serialize(outbuffer + offset); + offset += this->parent_id.serialize(outbuffer + offset); + offset += this->tip_id.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->child_ids_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->child_ids_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->child_ids_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->child_ids_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->child_ids_length); + for( uint32_t i = 0; i < child_ids_length; i++){ + offset += this->child_ids[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->type >> (8 * 0)) & 0xFF; + offset += sizeof(this->type); + *(outbuffer + offset + 0) = (this->blackbox_level >> (8 * 0)) & 0xFF; + offset += sizeof(this->blackbox_level); + *(outbuffer + offset + 0) = (this->status >> (8 * 0)) & 0xFF; + offset += sizeof(this->status); + uint32_t length_message = strlen(this->message); + varToArr(outbuffer + offset, length_message); + offset += 4; + memcpy(outbuffer + offset, this->message, length_message); + offset += length_message; + union { + bool real; + uint8_t base; + } u_is_active; + u_is_active.real = this->is_active; + *(outbuffer + offset + 0) = (u_is_active.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->is_active); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_class_name; + arrToVar(length_class_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_class_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_class_name-1]=0; + this->class_name = (char *)(inbuffer + offset-1); + offset += length_class_name; + offset += this->own_id.deserialize(inbuffer + offset); + offset += this->parent_id.deserialize(inbuffer + offset); + offset += this->tip_id.deserialize(inbuffer + offset); + uint32_t child_ids_lengthT = ((uint32_t) (*(inbuffer + offset))); + child_ids_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + child_ids_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + child_ids_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->child_ids_length); + if(child_ids_lengthT > child_ids_length) + this->child_ids = (uuid_msgs::UniqueID*)realloc(this->child_ids, child_ids_lengthT * sizeof(uuid_msgs::UniqueID)); + child_ids_length = child_ids_lengthT; + for( uint32_t i = 0; i < child_ids_length; i++){ + offset += this->st_child_ids.deserialize(inbuffer + offset); + memcpy( &(this->child_ids[i]), &(this->st_child_ids), sizeof(uuid_msgs::UniqueID)); + } + this->type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->type); + this->blackbox_level = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->blackbox_level); + this->status = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->status); + uint32_t length_message; + arrToVar(length_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message-1]=0; + this->message = (char *)(inbuffer + offset-1); + offset += length_message; + union { + bool real; + uint8_t base; + } u_is_active; + u_is_active.base = 0; + u_is_active.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->is_active = u_is_active.real; + offset += sizeof(this->is_active); + return offset; + } + + const char * getType(){ return "py_trees_msgs/Behaviour"; }; + const char * getMD5(){ return "88ddda148fc81f5dc402f56e3e333222"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/BehaviourTree.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/BehaviourTree.h new file mode 100644 index 0000000000000000000000000000000000000000..33bfd19c52655c242834aa35a8b1a0689ee1a932 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/BehaviourTree.h @@ -0,0 +1,70 @@ +#ifndef _ROS_py_trees_msgs_BehaviourTree_h +#define _ROS_py_trees_msgs_BehaviourTree_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "py_trees_msgs/Behaviour.h" + +namespace py_trees_msgs +{ + + class BehaviourTree : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t behaviours_length; + typedef py_trees_msgs::Behaviour _behaviours_type; + _behaviours_type st_behaviours; + _behaviours_type * behaviours; + + BehaviourTree(): + header(), + behaviours_length(0), behaviours(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->behaviours_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->behaviours_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->behaviours_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->behaviours_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->behaviours_length); + for( uint32_t i = 0; i < behaviours_length; i++){ + offset += this->behaviours[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t behaviours_lengthT = ((uint32_t) (*(inbuffer + offset))); + behaviours_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + behaviours_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + behaviours_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->behaviours_length); + if(behaviours_lengthT > behaviours_length) + this->behaviours = (py_trees_msgs::Behaviour*)realloc(this->behaviours, behaviours_lengthT * sizeof(py_trees_msgs::Behaviour)); + behaviours_length = behaviours_lengthT; + for( uint32_t i = 0; i < behaviours_length; i++){ + offset += this->st_behaviours.deserialize(inbuffer + offset); + memcpy( &(this->behaviours[i]), &(this->st_behaviours), sizeof(py_trees_msgs::Behaviour)); + } + return offset; + } + + const char * getType(){ return "py_trees_msgs/BehaviourTree"; }; + const char * getMD5(){ return "239023f5538cba34a10a3a5cd6610fa0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/CloseBlackboardWatcher.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/CloseBlackboardWatcher.h new file mode 100644 index 0000000000000000000000000000000000000000..5c6d3922acfb310aa0753bdf63451342a00573fe --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/CloseBlackboardWatcher.h @@ -0,0 +1,105 @@ +#ifndef _ROS_SERVICE_CloseBlackboardWatcher_h +#define _ROS_SERVICE_CloseBlackboardWatcher_h +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + +static const char CLOSEBLACKBOARDWATCHER[] = "py_trees_msgs/CloseBlackboardWatcher"; + + class CloseBlackboardWatcherRequest : public ros::Msg + { + public: + typedef const char* _topic_name_type; + _topic_name_type topic_name; + + CloseBlackboardWatcherRequest(): + topic_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic_name = strlen(this->topic_name); + varToArr(outbuffer + offset, length_topic_name); + offset += 4; + memcpy(outbuffer + offset, this->topic_name, length_topic_name); + offset += length_topic_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic_name; + arrToVar(length_topic_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic_name-1]=0; + this->topic_name = (char *)(inbuffer + offset-1); + offset += length_topic_name; + return offset; + } + + const char * getType(){ return CLOSEBLACKBOARDWATCHER; }; + const char * getMD5(){ return "b38cc2f19f45368c2db7867751ce95a9"; }; + + }; + + class CloseBlackboardWatcherResponse : public ros::Msg + { + public: + typedef bool _result_type; + _result_type result; + + CloseBlackboardWatcherResponse(): + result(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_result; + u_result.real = this->result; + *(outbuffer + offset + 0) = (u_result.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->result); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_result; + u_result.base = 0; + u_result.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->result = u_result.real; + offset += sizeof(this->result); + return offset; + } + + const char * getType(){ return CLOSEBLACKBOARDWATCHER; }; + const char * getMD5(){ return "eb13ac1f1354ccecb7941ee8fa2192e8"; }; + + }; + + class CloseBlackboardWatcher { + public: + typedef CloseBlackboardWatcherRequest Request; + typedef CloseBlackboardWatcherResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockAction.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockAction.h new file mode 100644 index 0000000000000000000000000000000000000000..d9945d023e8243937a54ebd9db130197da19c45e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_DockAction_h +#define _ROS_py_trees_msgs_DockAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "py_trees_msgs/DockActionGoal.h" +#include "py_trees_msgs/DockActionResult.h" +#include "py_trees_msgs/DockActionFeedback.h" + +namespace py_trees_msgs +{ + + class DockAction : public ros::Msg + { + public: + typedef py_trees_msgs::DockActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef py_trees_msgs::DockActionResult _action_result_type; + _action_result_type action_result; + typedef py_trees_msgs::DockActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + DockAction(): + 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 "py_trees_msgs/DockAction"; }; + const char * getMD5(){ return "1487f2ccdee1636e3fa5ee088040ee3a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockActionFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..f485e2bf2f330fa39b3fd7c909598b4427608134 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_DockActionFeedback_h +#define _ROS_py_trees_msgs_DockActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "py_trees_msgs/DockFeedback.h" + +namespace py_trees_msgs +{ + + class DockActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef py_trees_msgs::DockFeedback _feedback_type; + _feedback_type feedback; + + DockActionFeedback(): + 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 "py_trees_msgs/DockActionFeedback"; }; + const char * getMD5(){ return "2ff213e56f8a13eff9119a87d46f6e06"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockActionGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..e90092988579600144b8c9679681107aad69146d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_DockActionGoal_h +#define _ROS_py_trees_msgs_DockActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "py_trees_msgs/DockGoal.h" + +namespace py_trees_msgs +{ + + class DockActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef py_trees_msgs::DockGoal _goal_type; + _goal_type goal; + + DockActionGoal(): + 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 "py_trees_msgs/DockActionGoal"; }; + const char * getMD5(){ return "792a8f48465c33ddc8270c5f2a92be76"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockActionResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..622b6665d7871ba7940c0cc787a8790fc8c2548c --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_DockActionResult_h +#define _ROS_py_trees_msgs_DockActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "py_trees_msgs/DockResult.h" + +namespace py_trees_msgs +{ + + class DockActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef py_trees_msgs::DockResult _result_type; + _result_type result; + + DockActionResult(): + 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 "py_trees_msgs/DockActionResult"; }; + const char * getMD5(){ return "4eda63f75c02197dafd2a62a0d413ab0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..8f6e2a1f598cd25fb6a3442f20c82d55be4003b2 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockFeedback.h @@ -0,0 +1,62 @@ +#ifndef _ROS_py_trees_msgs_DockFeedback_h +#define _ROS_py_trees_msgs_DockFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + + class DockFeedback : public ros::Msg + { + public: + typedef float _percentage_completed_type; + _percentage_completed_type percentage_completed; + + DockFeedback(): + percentage_completed(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_percentage_completed; + u_percentage_completed.real = this->percentage_completed; + *(outbuffer + offset + 0) = (u_percentage_completed.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_percentage_completed.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_percentage_completed.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_percentage_completed.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->percentage_completed); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_percentage_completed; + u_percentage_completed.base = 0; + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->percentage_completed = u_percentage_completed.real; + offset += sizeof(this->percentage_completed); + return offset; + } + + const char * getType(){ return "py_trees_msgs/DockFeedback"; }; + const char * getMD5(){ return "26e2c7154b190781742892deccb6c8f0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..ac04af8ea1ba1cb169a39a9c89e515a30d6a4983 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_DockGoal_h +#define _ROS_py_trees_msgs_DockGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + + class DockGoal : public ros::Msg + { + public: + typedef bool _dock_type; + _dock_type dock; + + DockGoal(): + dock(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_dock; + u_dock.real = this->dock; + *(outbuffer + offset + 0) = (u_dock.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->dock); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_dock; + u_dock.base = 0; + u_dock.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->dock = u_dock.real; + offset += sizeof(this->dock); + return offset; + } + + const char * getType(){ return "py_trees_msgs/DockGoal"; }; + const char * getMD5(){ return "035360b0bb03f7f742a0b2d734a3a660"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockResult.h new file mode 100644 index 0000000000000000000000000000000000000000..685ba137251b2b04811050a30c57ba134bb2680a --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/DockResult.h @@ -0,0 +1,75 @@ +#ifndef _ROS_py_trees_msgs_DockResult_h +#define _ROS_py_trees_msgs_DockResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + + class DockResult : public ros::Msg + { + public: + typedef int8_t _value_type; + _value_type value; + typedef const char* _message_type; + _message_type message; + enum { SUCCESS = 0 }; + enum { ERROR = 1 }; + + DockResult(): + value(0), + message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_value; + u_value.real = this->value; + *(outbuffer + offset + 0) = (u_value.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->value); + uint32_t length_message = strlen(this->message); + varToArr(outbuffer + offset, length_message); + offset += 4; + memcpy(outbuffer + offset, this->message, length_message); + offset += length_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_value; + u_value.base = 0; + u_value.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->value = u_value.real; + offset += sizeof(this->value); + uint32_t length_message; + arrToVar(length_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message-1]=0; + this->message = (char *)(inbuffer + offset-1); + offset += length_message; + return offset; + } + + const char * getType(){ return "py_trees_msgs/DockResult"; }; + const char * getMD5(){ return "7e3448b3518ac363f90f534593733372"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/GetBlackboardVariables.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/GetBlackboardVariables.h new file mode 100644 index 0000000000000000000000000000000000000000..cd90747425dedcd77baf86916c341a5de93b3993 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/GetBlackboardVariables.h @@ -0,0 +1,107 @@ +#ifndef _ROS_SERVICE_GetBlackboardVariables_h +#define _ROS_SERVICE_GetBlackboardVariables_h +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + +static const char GETBLACKBOARDVARIABLES[] = "py_trees_msgs/GetBlackboardVariables"; + + class GetBlackboardVariablesRequest : public ros::Msg + { + public: + + GetBlackboardVariablesRequest() + { + } + + 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 GETBLACKBOARDVARIABLES; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetBlackboardVariablesResponse : public ros::Msg + { + public: + uint32_t variables_length; + typedef char* _variables_type; + _variables_type st_variables; + _variables_type * variables; + + GetBlackboardVariablesResponse(): + variables_length(0), variables(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->variables_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->variables_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->variables_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->variables_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->variables_length); + for( uint32_t i = 0; i < variables_length; i++){ + uint32_t length_variablesi = strlen(this->variables[i]); + varToArr(outbuffer + offset, length_variablesi); + offset += 4; + memcpy(outbuffer + offset, this->variables[i], length_variablesi); + offset += length_variablesi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t variables_lengthT = ((uint32_t) (*(inbuffer + offset))); + variables_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + variables_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + variables_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->variables_length); + if(variables_lengthT > variables_length) + this->variables = (char**)realloc(this->variables, variables_lengthT * sizeof(char*)); + variables_length = variables_lengthT; + for( uint32_t i = 0; i < variables_length; i++){ + uint32_t length_st_variables; + arrToVar(length_st_variables, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_variables; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_variables-1]=0; + this->st_variables = (char *)(inbuffer + offset-1); + offset += length_st_variables; + memcpy( &(this->variables[i]), &(this->st_variables), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return GETBLACKBOARDVARIABLES; }; + const char * getMD5(){ return "8f184382c36d538fab610317191b119e"; }; + + }; + + class GetBlackboardVariables { + public: + typedef GetBlackboardVariablesRequest Request; + typedef GetBlackboardVariablesResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/OpenBlackboardWatcher.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/OpenBlackboardWatcher.h new file mode 100644 index 0000000000000000000000000000000000000000..e4fb7633ed794a72f4cb29d07ac472c363254f4f --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/OpenBlackboardWatcher.h @@ -0,0 +1,124 @@ +#ifndef _ROS_SERVICE_OpenBlackboardWatcher_h +#define _ROS_SERVICE_OpenBlackboardWatcher_h +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + +static const char OPENBLACKBOARDWATCHER[] = "py_trees_msgs/OpenBlackboardWatcher"; + + class OpenBlackboardWatcherRequest : public ros::Msg + { + public: + uint32_t variables_length; + typedef char* _variables_type; + _variables_type st_variables; + _variables_type * variables; + + OpenBlackboardWatcherRequest(): + variables_length(0), variables(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->variables_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->variables_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->variables_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->variables_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->variables_length); + for( uint32_t i = 0; i < variables_length; i++){ + uint32_t length_variablesi = strlen(this->variables[i]); + varToArr(outbuffer + offset, length_variablesi); + offset += 4; + memcpy(outbuffer + offset, this->variables[i], length_variablesi); + offset += length_variablesi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t variables_lengthT = ((uint32_t) (*(inbuffer + offset))); + variables_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + variables_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + variables_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->variables_length); + if(variables_lengthT > variables_length) + this->variables = (char**)realloc(this->variables, variables_lengthT * sizeof(char*)); + variables_length = variables_lengthT; + for( uint32_t i = 0; i < variables_length; i++){ + uint32_t length_st_variables; + arrToVar(length_st_variables, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_variables; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_variables-1]=0; + this->st_variables = (char *)(inbuffer + offset-1); + offset += length_st_variables; + memcpy( &(this->variables[i]), &(this->st_variables), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return OPENBLACKBOARDWATCHER; }; + const char * getMD5(){ return "8f184382c36d538fab610317191b119e"; }; + + }; + + class OpenBlackboardWatcherResponse : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + + OpenBlackboardWatcherResponse(): + topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + return offset; + } + + const char * getType(){ return OPENBLACKBOARDWATCHER; }; + const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; }; + + }; + + class OpenBlackboardWatcher { + public: + typedef OpenBlackboardWatcherRequest Request; + typedef OpenBlackboardWatcherResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateAction.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateAction.h new file mode 100644 index 0000000000000000000000000000000000000000..dda6c2f17acccc74eeca287f78067ae8319a2562 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_RotateAction_h +#define _ROS_py_trees_msgs_RotateAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "py_trees_msgs/RotateActionGoal.h" +#include "py_trees_msgs/RotateActionResult.h" +#include "py_trees_msgs/RotateActionFeedback.h" + +namespace py_trees_msgs +{ + + class RotateAction : public ros::Msg + { + public: + typedef py_trees_msgs::RotateActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef py_trees_msgs::RotateActionResult _action_result_type; + _action_result_type action_result; + typedef py_trees_msgs::RotateActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + RotateAction(): + 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 "py_trees_msgs/RotateAction"; }; + const char * getMD5(){ return "c68d9e0a719660a32868a081a56942db"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateActionFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..e1a7f5bf88549af58d4fac0f2defa7ba0e8752c9 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_RotateActionFeedback_h +#define _ROS_py_trees_msgs_RotateActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "py_trees_msgs/RotateFeedback.h" + +namespace py_trees_msgs +{ + + class RotateActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef py_trees_msgs::RotateFeedback _feedback_type; + _feedback_type feedback; + + RotateActionFeedback(): + 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 "py_trees_msgs/RotateActionFeedback"; }; + const char * getMD5(){ return "344ed0daa120e01d5801edcb980cf618"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateActionGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..1afb37b85cf212f6cb4b200830bd01f08983edbb --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_RotateActionGoal_h +#define _ROS_py_trees_msgs_RotateActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "py_trees_msgs/RotateGoal.h" + +namespace py_trees_msgs +{ + + class RotateActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef py_trees_msgs::RotateGoal _goal_type; + _goal_type goal; + + RotateActionGoal(): + 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 "py_trees_msgs/RotateActionGoal"; }; + const char * getMD5(){ return "4b30be6cd12b9e72826df56b481f40e0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateActionResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..72914314140d4fe2d2430f981536cba4382c30d6 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_RotateActionResult_h +#define _ROS_py_trees_msgs_RotateActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "py_trees_msgs/RotateResult.h" + +namespace py_trees_msgs +{ + + class RotateActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef py_trees_msgs::RotateResult _result_type; + _result_type result; + + RotateActionResult(): + 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 "py_trees_msgs/RotateActionResult"; }; + const char * getMD5(){ return "4eda63f75c02197dafd2a62a0d413ab0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..52aa269941c973aff1c654fd862821079503533e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateFeedback.h @@ -0,0 +1,86 @@ +#ifndef _ROS_py_trees_msgs_RotateFeedback_h +#define _ROS_py_trees_msgs_RotateFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + + class RotateFeedback : public ros::Msg + { + public: + typedef float _percentage_completed_type; + _percentage_completed_type percentage_completed; + typedef float _angle_rotated_type; + _angle_rotated_type angle_rotated; + + RotateFeedback(): + percentage_completed(0), + angle_rotated(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_percentage_completed; + u_percentage_completed.real = this->percentage_completed; + *(outbuffer + offset + 0) = (u_percentage_completed.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_percentage_completed.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_percentage_completed.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_percentage_completed.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->percentage_completed); + union { + float real; + uint32_t base; + } u_angle_rotated; + u_angle_rotated.real = this->angle_rotated; + *(outbuffer + offset + 0) = (u_angle_rotated.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angle_rotated.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angle_rotated.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angle_rotated.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angle_rotated); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_percentage_completed; + u_percentage_completed.base = 0; + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->percentage_completed = u_percentage_completed.real; + offset += sizeof(this->percentage_completed); + union { + float real; + uint32_t base; + } u_angle_rotated; + u_angle_rotated.base = 0; + u_angle_rotated.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angle_rotated.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angle_rotated.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angle_rotated.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angle_rotated = u_angle_rotated.real; + offset += sizeof(this->angle_rotated); + return offset; + } + + const char * getType(){ return "py_trees_msgs/RotateFeedback"; }; + const char * getMD5(){ return "f1088922e17b4a9f4319356ac8d99645"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..4d196edae8ec3ef76bcf8afa4625f23015095d3d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateGoal.h @@ -0,0 +1,38 @@ +#ifndef _ROS_py_trees_msgs_RotateGoal_h +#define _ROS_py_trees_msgs_RotateGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + + class RotateGoal : public ros::Msg + { + public: + + RotateGoal() + { + } + + 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 "py_trees_msgs/RotateGoal"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateResult.h new file mode 100644 index 0000000000000000000000000000000000000000..d84dc6125db11c09cd72f56013bbc66f706e3ad3 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/py_trees_msgs/RotateResult.h @@ -0,0 +1,75 @@ +#ifndef _ROS_py_trees_msgs_RotateResult_h +#define _ROS_py_trees_msgs_RotateResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + + class RotateResult : public ros::Msg + { + public: + typedef int8_t _value_type; + _value_type value; + typedef const char* _message_type; + _message_type message; + enum { SUCCESS = 0 }; + enum { ERROR = 1 }; + + RotateResult(): + value(0), + message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_value; + u_value.real = this->value; + *(outbuffer + offset + 0) = (u_value.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->value); + uint32_t length_message = strlen(this->message); + varToArr(outbuffer + offset, length_message); + offset += 4; + memcpy(outbuffer + offset, this->message, length_message); + offset += length_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_value; + u_value.base = 0; + u_value.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->value = u_value.real; + offset += sizeof(this->value); + uint32_t length_message; + arrToVar(length_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message-1]=0; + this->message = (char *)(inbuffer + offset-1); + offset += length_message; + return offset; + } + + const char * getType(){ return "py_trees_msgs/RotateResult"; }; + const char * getMD5(){ return "7e3448b3518ac363f90f534593733372"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/robot_pose_ekf/GetStatus.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/robot_pose_ekf/GetStatus.h new file mode 100644 index 0000000000000000000000000000000000000000..155cde3422aec6a6f2d131d7573c06e6889ee279 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/robot_pose_ekf/GetStatus.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_GetStatus_h +#define _ROS_SERVICE_GetStatus_h +#include +#include +#include +#include "ros/msg.h" + +namespace robot_pose_ekf +{ + +static const char GETSTATUS[] = "robot_pose_ekf/GetStatus"; + + class GetStatusRequest : public ros::Msg + { + public: + + GetStatusRequest() + { + } + + 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 GETSTATUS; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetStatusResponse : public ros::Msg + { + public: + typedef const char* _status_type; + _status_type status; + + GetStatusResponse(): + status("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_status = strlen(this->status); + varToArr(outbuffer + offset, length_status); + offset += 4; + memcpy(outbuffer + offset, this->status, length_status); + offset += length_status; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_status; + arrToVar(length_status, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status-1]=0; + this->status = (char *)(inbuffer + offset-1); + offset += length_status; + return offset; + } + + const char * getType(){ return GETSTATUS; }; + const char * getMD5(){ return "4fe5af303955c287688e7347e9b00278"; }; + + }; + + class GetStatus { + public: + typedef GetStatusRequest Request; + typedef GetStatusResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesPair.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesPair.h new file mode 100644 index 0000000000000000000000000000000000000000..4ea6cfdea2fc8f69281a83b2134d89ffc4793d69 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesPair.h @@ -0,0 +1,50 @@ +#ifndef _ROS_rocon_service_pair_msgs_TestiesPair_h +#define _ROS_rocon_service_pair_msgs_TestiesPair_h + +#include +#include +#include +#include "ros/msg.h" +#include "rocon_service_pair_msgs/TestiesPairRequest.h" +#include "rocon_service_pair_msgs/TestiesPairResponse.h" + +namespace rocon_service_pair_msgs +{ + + class TestiesPair : public ros::Msg + { + public: + typedef rocon_service_pair_msgs::TestiesPairRequest _pair_request_type; + _pair_request_type pair_request; + typedef rocon_service_pair_msgs::TestiesPairResponse _pair_response_type; + _pair_response_type pair_response; + + TestiesPair(): + pair_request(), + pair_response() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->pair_request.serialize(outbuffer + offset); + offset += this->pair_response.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->pair_request.deserialize(inbuffer + offset); + offset += this->pair_response.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "rocon_service_pair_msgs/TestiesPair"; }; + const char * getMD5(){ return "7b5cb9b4ccdb74840ce04ea92d2a141d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesPairRequest.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesPairRequest.h new file mode 100644 index 0000000000000000000000000000000000000000..8da52e4bfb190b844885b8761e774a21601aaf75 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesPairRequest.h @@ -0,0 +1,50 @@ +#ifndef _ROS_rocon_service_pair_msgs_TestiesPairRequest_h +#define _ROS_rocon_service_pair_msgs_TestiesPairRequest_h + +#include +#include +#include +#include "ros/msg.h" +#include "uuid_msgs/UniqueID.h" +#include "rocon_service_pair_msgs/TestiesRequest.h" + +namespace rocon_service_pair_msgs +{ + + class TestiesPairRequest : public ros::Msg + { + public: + typedef uuid_msgs::UniqueID _id_type; + _id_type id; + typedef rocon_service_pair_msgs::TestiesRequest _request_type; + _request_type request; + + TestiesPairRequest(): + id(), + request() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->id.serialize(outbuffer + offset); + offset += this->request.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->id.deserialize(inbuffer + offset); + offset += this->request.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "rocon_service_pair_msgs/TestiesPairRequest"; }; + const char * getMD5(){ return "71ec95e384ce52aa32491f3b69a62027"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesPairResponse.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesPairResponse.h new file mode 100644 index 0000000000000000000000000000000000000000..4fec039a918024d32c747d50156938adbc1c8df7 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesPairResponse.h @@ -0,0 +1,50 @@ +#ifndef _ROS_rocon_service_pair_msgs_TestiesPairResponse_h +#define _ROS_rocon_service_pair_msgs_TestiesPairResponse_h + +#include +#include +#include +#include "ros/msg.h" +#include "uuid_msgs/UniqueID.h" +#include "rocon_service_pair_msgs/TestiesResponse.h" + +namespace rocon_service_pair_msgs +{ + + class TestiesPairResponse : public ros::Msg + { + public: + typedef uuid_msgs::UniqueID _id_type; + _id_type id; + typedef rocon_service_pair_msgs::TestiesResponse _response_type; + _response_type response; + + TestiesPairResponse(): + id(), + response() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->id.serialize(outbuffer + offset); + offset += this->response.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->id.deserialize(inbuffer + offset); + offset += this->response.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "rocon_service_pair_msgs/TestiesPairResponse"; }; + const char * getMD5(){ return "05404c9fe275eda57650fdfced8cf402"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesRequest.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesRequest.h new file mode 100644 index 0000000000000000000000000000000000000000..058b24d991059a3c14b3687cd12e00f04d917e83 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesRequest.h @@ -0,0 +1,55 @@ +#ifndef _ROS_rocon_service_pair_msgs_TestiesRequest_h +#define _ROS_rocon_service_pair_msgs_TestiesRequest_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_service_pair_msgs +{ + + class TestiesRequest : public ros::Msg + { + public: + typedef const char* _data_type; + _data_type data; + + TestiesRequest(): + data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_data = strlen(this->data); + varToArr(outbuffer + offset, length_data); + offset += 4; + memcpy(outbuffer + offset, this->data, length_data); + offset += length_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_data; + arrToVar(length_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data-1]=0; + this->data = (char *)(inbuffer + offset-1); + offset += length_data; + return offset; + } + + const char * getType(){ return "rocon_service_pair_msgs/TestiesRequest"; }; + const char * getMD5(){ return "992ce8a1687cec8c8bd883ec73ca41d1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesResponse.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesResponse.h new file mode 100644 index 0000000000000000000000000000000000000000..3449e717c709e6359d624af30a96ef9a94b75b9d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_service_pair_msgs/TestiesResponse.h @@ -0,0 +1,61 @@ +#ifndef _ROS_rocon_service_pair_msgs_TestiesResponse_h +#define _ROS_rocon_service_pair_msgs_TestiesResponse_h + +#include +#include +#include +#include "ros/msg.h" +#include "uuid_msgs/UniqueID.h" + +namespace rocon_service_pair_msgs +{ + + class TestiesResponse : public ros::Msg + { + public: + typedef uuid_msgs::UniqueID _id_type; + _id_type id; + typedef const char* _data_type; + _data_type data; + + TestiesResponse(): + id(), + data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->id.serialize(outbuffer + offset); + uint32_t length_data = strlen(this->data); + varToArr(outbuffer + offset, length_data); + offset += 4; + memcpy(outbuffer + offset, this->data, length_data); + offset += length_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->id.deserialize(inbuffer + offset); + uint32_t length_data; + arrToVar(length_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data-1]=0; + this->data = (char *)(inbuffer + offset-1); + offset += length_data; + return offset; + } + + const char * getType(){ return "rocon_service_pair_msgs/TestiesResponse"; }; + const char * getMD5(){ return "f2e0bb16a22dc66826bb64ac8b44aeb3"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Connection.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Connection.h new file mode 100644 index 0000000000000000000000000000000000000000..6b4ac1d7e91dce2526aa548cecb201859a090d64 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Connection.h @@ -0,0 +1,146 @@ +#ifndef _ROS_rocon_std_msgs_Connection_h +#define _ROS_rocon_std_msgs_Connection_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class Connection : public ros::Msg + { + public: + typedef const char* _type_type; + _type_type type; + typedef const char* _name_type; + _name_type name; + typedef const char* _node_type; + _node_type node; + typedef const char* _type_msg_type; + _type_msg_type type_msg; + typedef const char* _type_info_type; + _type_info_type type_info; + typedef const char* _xmlrpc_uri_type; + _xmlrpc_uri_type xmlrpc_uri; + enum { PUBLISHER = publisher }; + enum { SUBSCRIBER = subscriber }; + enum { SERVICE = service }; + enum { ACTION_CLIENT = action_client }; + enum { ACTION_SERVER = action_server }; + enum { INVALID = invalid }; + + Connection(): + type(""), + name(""), + node(""), + type_msg(""), + type_info(""), + xmlrpc_uri("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_type = strlen(this->type); + varToArr(outbuffer + offset, length_type); + offset += 4; + memcpy(outbuffer + offset, this->type, length_type); + offset += length_type; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_node = strlen(this->node); + varToArr(outbuffer + offset, length_node); + offset += 4; + memcpy(outbuffer + offset, this->node, length_node); + offset += length_node; + uint32_t length_type_msg = strlen(this->type_msg); + varToArr(outbuffer + offset, length_type_msg); + offset += 4; + memcpy(outbuffer + offset, this->type_msg, length_type_msg); + offset += length_type_msg; + uint32_t length_type_info = strlen(this->type_info); + varToArr(outbuffer + offset, length_type_info); + offset += 4; + memcpy(outbuffer + offset, this->type_info, length_type_info); + offset += length_type_info; + uint32_t length_xmlrpc_uri = strlen(this->xmlrpc_uri); + varToArr(outbuffer + offset, length_xmlrpc_uri); + offset += 4; + memcpy(outbuffer + offset, this->xmlrpc_uri, length_xmlrpc_uri); + offset += length_xmlrpc_uri; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_type; + arrToVar(length_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type-1]=0; + this->type = (char *)(inbuffer + offset-1); + offset += length_type; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_node; + arrToVar(length_node, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_node; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_node-1]=0; + this->node = (char *)(inbuffer + offset-1); + offset += length_node; + uint32_t length_type_msg; + arrToVar(length_type_msg, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type_msg; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type_msg-1]=0; + this->type_msg = (char *)(inbuffer + offset-1); + offset += length_type_msg; + uint32_t length_type_info; + arrToVar(length_type_info, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type_info; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type_info-1]=0; + this->type_info = (char *)(inbuffer + offset-1); + offset += length_type_info; + uint32_t length_xmlrpc_uri; + arrToVar(length_xmlrpc_uri, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_xmlrpc_uri; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_xmlrpc_uri-1]=0; + this->xmlrpc_uri = (char *)(inbuffer + offset-1); + offset += length_xmlrpc_uri; + return offset; + } + + const char * getType(){ return "rocon_std_msgs/Connection"; }; + const char * getMD5(){ return "0dee991006513320090e2ee648136101"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/ConnectionCacheSpin.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/ConnectionCacheSpin.h new file mode 100644 index 0000000000000000000000000000000000000000..274a4527eb2f2d9cbbebc068127dec8142016db4 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/ConnectionCacheSpin.h @@ -0,0 +1,86 @@ +#ifndef _ROS_rocon_std_msgs_ConnectionCacheSpin_h +#define _ROS_rocon_std_msgs_ConnectionCacheSpin_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class ConnectionCacheSpin : public ros::Msg + { + public: + typedef float _spin_freq_type; + _spin_freq_type spin_freq; + typedef float _spin_timer_type; + _spin_timer_type spin_timer; + + ConnectionCacheSpin(): + spin_freq(0), + spin_timer(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_spin_freq; + u_spin_freq.real = this->spin_freq; + *(outbuffer + offset + 0) = (u_spin_freq.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_spin_freq.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_spin_freq.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_spin_freq.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->spin_freq); + union { + float real; + uint32_t base; + } u_spin_timer; + u_spin_timer.real = this->spin_timer; + *(outbuffer + offset + 0) = (u_spin_timer.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_spin_timer.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_spin_timer.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_spin_timer.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->spin_timer); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_spin_freq; + u_spin_freq.base = 0; + u_spin_freq.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_spin_freq.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_spin_freq.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_spin_freq.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->spin_freq = u_spin_freq.real; + offset += sizeof(this->spin_freq); + union { + float real; + uint32_t base; + } u_spin_timer; + u_spin_timer.base = 0; + u_spin_timer.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_spin_timer.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_spin_timer.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_spin_timer.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->spin_timer = u_spin_timer.real; + offset += sizeof(this->spin_timer); + return offset; + } + + const char * getType(){ return "rocon_std_msgs/ConnectionCacheSpin"; }; + const char * getMD5(){ return "b6c0b0ddb1d2a2de9918dc5f6d87680a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/ConnectionsDiff.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/ConnectionsDiff.h new file mode 100644 index 0000000000000000000000000000000000000000..f7848ac00914249f5873c06a10b9733fc029ef94 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/ConnectionsDiff.h @@ -0,0 +1,89 @@ +#ifndef _ROS_rocon_std_msgs_ConnectionsDiff_h +#define _ROS_rocon_std_msgs_ConnectionsDiff_h + +#include +#include +#include +#include "ros/msg.h" +#include "rocon_std_msgs/Connection.h" + +namespace rocon_std_msgs +{ + + class ConnectionsDiff : public ros::Msg + { + public: + uint32_t added_length; + typedef rocon_std_msgs::Connection _added_type; + _added_type st_added; + _added_type * added; + uint32_t lost_length; + typedef rocon_std_msgs::Connection _lost_type; + _lost_type st_lost; + _lost_type * lost; + + ConnectionsDiff(): + added_length(0), added(NULL), + lost_length(0), lost(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->added_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->added_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->added_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->added_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->added_length); + for( uint32_t i = 0; i < added_length; i++){ + offset += this->added[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->lost_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->lost_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->lost_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->lost_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->lost_length); + for( uint32_t i = 0; i < lost_length; i++){ + offset += this->lost[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t added_lengthT = ((uint32_t) (*(inbuffer + offset))); + added_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + added_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + added_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->added_length); + if(added_lengthT > added_length) + this->added = (rocon_std_msgs::Connection*)realloc(this->added, added_lengthT * sizeof(rocon_std_msgs::Connection)); + added_length = added_lengthT; + for( uint32_t i = 0; i < added_length; i++){ + offset += this->st_added.deserialize(inbuffer + offset); + memcpy( &(this->added[i]), &(this->st_added), sizeof(rocon_std_msgs::Connection)); + } + uint32_t lost_lengthT = ((uint32_t) (*(inbuffer + offset))); + lost_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + lost_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + lost_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->lost_length); + if(lost_lengthT > lost_length) + this->lost = (rocon_std_msgs::Connection*)realloc(this->lost, lost_lengthT * sizeof(rocon_std_msgs::Connection)); + lost_length = lost_lengthT; + for( uint32_t i = 0; i < lost_length; i++){ + offset += this->st_lost.deserialize(inbuffer + offset); + memcpy( &(this->lost[i]), &(this->st_lost), sizeof(rocon_std_msgs::Connection)); + } + return offset; + } + + const char * getType(){ return "rocon_std_msgs/ConnectionsDiff"; }; + const char * getMD5(){ return "19f9e3bef1153b4bc619ec3d21b94718"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/ConnectionsList.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/ConnectionsList.h new file mode 100644 index 0000000000000000000000000000000000000000..3d595df768ea4a55316afd74c181349bc3a59160 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/ConnectionsList.h @@ -0,0 +1,64 @@ +#ifndef _ROS_rocon_std_msgs_ConnectionsList_h +#define _ROS_rocon_std_msgs_ConnectionsList_h + +#include +#include +#include +#include "ros/msg.h" +#include "rocon_std_msgs/Connection.h" + +namespace rocon_std_msgs +{ + + class ConnectionsList : public ros::Msg + { + public: + uint32_t connections_length; + typedef rocon_std_msgs::Connection _connections_type; + _connections_type st_connections; + _connections_type * connections; + + ConnectionsList(): + connections_length(0), connections(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->connections_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->connections_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->connections_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->connections_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->connections_length); + for( uint32_t i = 0; i < connections_length; i++){ + offset += this->connections[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t connections_lengthT = ((uint32_t) (*(inbuffer + offset))); + connections_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + connections_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + connections_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->connections_length); + if(connections_lengthT > connections_length) + this->connections = (rocon_std_msgs::Connection*)realloc(this->connections, connections_lengthT * sizeof(rocon_std_msgs::Connection)); + connections_length = connections_lengthT; + for( uint32_t i = 0; i < connections_length; i++){ + offset += this->st_connections.deserialize(inbuffer + offset); + memcpy( &(this->connections[i]), &(this->st_connections), sizeof(rocon_std_msgs::Connection)); + } + return offset; + } + + const char * getType(){ return "rocon_std_msgs/ConnectionsList"; }; + const char * getMD5(){ return "672d6ad69b684884f8fb6f4acedbd39f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/EmptyString.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/EmptyString.h new file mode 100644 index 0000000000000000000000000000000000000000..a6d873352777b5e88765f613913e516144587d6b --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/EmptyString.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_EmptyString_h +#define _ROS_SERVICE_EmptyString_h +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + +static const char EMPTYSTRING[] = "rocon_std_msgs/EmptyString"; + + class EmptyStringRequest : public ros::Msg + { + public: + + EmptyStringRequest() + { + } + + 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 EMPTYSTRING; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class EmptyStringResponse : public ros::Msg + { + public: + typedef const char* _data_type; + _data_type data; + + EmptyStringResponse(): + data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_data = strlen(this->data); + varToArr(outbuffer + offset, length_data); + offset += 4; + memcpy(outbuffer + offset, this->data, length_data); + offset += length_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_data; + arrToVar(length_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data-1]=0; + this->data = (char *)(inbuffer + offset-1); + offset += length_data; + return offset; + } + + const char * getType(){ return EMPTYSTRING; }; + const char * getMD5(){ return "992ce8a1687cec8c8bd883ec73ca41d1"; }; + + }; + + class EmptyString { + public: + typedef EmptyStringRequest Request; + typedef EmptyStringResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Float32Stamped.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Float32Stamped.h new file mode 100644 index 0000000000000000000000000000000000000000..fd8f5ffc8fc57fc6a6559993596960bcafd2a084 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Float32Stamped.h @@ -0,0 +1,68 @@ +#ifndef _ROS_rocon_std_msgs_Float32Stamped_h +#define _ROS_rocon_std_msgs_Float32Stamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace rocon_std_msgs +{ + + class Float32Stamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef float _data_type; + _data_type data; + + Float32Stamped(): + header(), + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + 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); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + 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); + return offset; + } + + const char * getType(){ return "rocon_std_msgs/Float32Stamped"; }; + const char * getMD5(){ return "ef848af8cf12f6df11682cc76fba477b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Icon.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Icon.h new file mode 100644 index 0000000000000000000000000000000000000000..b30516e81ba691b26d6ce651df72041c98720cc7 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Icon.h @@ -0,0 +1,99 @@ +#ifndef _ROS_rocon_std_msgs_Icon_h +#define _ROS_rocon_std_msgs_Icon_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class Icon : public ros::Msg + { + public: + typedef const char* _resource_name_type; + _resource_name_type resource_name; + typedef const char* _format_type; + _format_type format; + uint32_t data_length; + typedef uint8_t _data_type; + _data_type st_data; + _data_type * data; + + Icon(): + resource_name(""), + format(""), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_resource_name = strlen(this->resource_name); + varToArr(outbuffer + offset, length_resource_name); + offset += 4; + memcpy(outbuffer + offset, this->resource_name, length_resource_name); + offset += length_resource_name; + uint32_t length_format = strlen(this->format); + varToArr(outbuffer + offset, length_format); + offset += 4; + memcpy(outbuffer + offset, this->format, length_format); + offset += length_format; + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_resource_name; + arrToVar(length_resource_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_resource_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_resource_name-1]=0; + this->resource_name = (char *)(inbuffer + offset-1); + offset += length_resource_name; + uint32_t length_format; + arrToVar(length_format, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_format; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_format-1]=0; + this->format = (char *)(inbuffer + offset-1); + offset += length_format; + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint8_t*)realloc(this->data, data_lengthT * sizeof(uint8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint8_t)); + } + return offset; + } + + const char * getType(){ return "rocon_std_msgs/Icon"; }; + const char * getMD5(){ return "2ddacfedd31b6da3f723794afbd3b9de"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/KeyValue.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/KeyValue.h new file mode 100644 index 0000000000000000000000000000000000000000..980b1b5f3b837bca96ac40900f80dfa73781ee5d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/KeyValue.h @@ -0,0 +1,72 @@ +#ifndef _ROS_rocon_std_msgs_KeyValue_h +#define _ROS_rocon_std_msgs_KeyValue_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class KeyValue : public ros::Msg + { + public: + typedef const char* _key_type; + _key_type key; + typedef const char* _value_type; + _value_type value; + + KeyValue(): + key(""), + value("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_key = strlen(this->key); + varToArr(outbuffer + offset, length_key); + offset += 4; + memcpy(outbuffer + offset, this->key, length_key); + offset += length_key; + uint32_t length_value = strlen(this->value); + varToArr(outbuffer + offset, length_value); + offset += 4; + memcpy(outbuffer + offset, this->value, length_value); + offset += length_value; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_key; + arrToVar(length_key, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_key; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_key-1]=0; + this->key = (char *)(inbuffer + offset-1); + offset += length_key; + uint32_t length_value; + arrToVar(length_value, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_value; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_value-1]=0; + this->value = (char *)(inbuffer + offset-1); + offset += length_value; + return offset; + } + + const char * getType(){ return "rocon_std_msgs/KeyValue"; }; + const char * getMD5(){ return "cf57fdc6617a881a88c16e768132149c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/MasterInfo.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/MasterInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..7cf4d4a95c41e39967d583b441ae44ef67c76785 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/MasterInfo.h @@ -0,0 +1,112 @@ +#ifndef _ROS_rocon_std_msgs_MasterInfo_h +#define _ROS_rocon_std_msgs_MasterInfo_h + +#include +#include +#include +#include "ros/msg.h" +#include "rocon_std_msgs/Icon.h" + +namespace rocon_std_msgs +{ + + class MasterInfo : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _rocon_uri_type; + _rocon_uri_type rocon_uri; + typedef const char* _description_type; + _description_type description; + typedef rocon_std_msgs::Icon _icon_type; + _icon_type icon; + typedef const char* _version_type; + _version_type version; + + MasterInfo(): + name(""), + rocon_uri(""), + description(""), + icon(), + version("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_rocon_uri = strlen(this->rocon_uri); + varToArr(outbuffer + offset, length_rocon_uri); + offset += 4; + memcpy(outbuffer + offset, this->rocon_uri, length_rocon_uri); + offset += length_rocon_uri; + uint32_t length_description = strlen(this->description); + varToArr(outbuffer + offset, length_description); + offset += 4; + memcpy(outbuffer + offset, this->description, length_description); + offset += length_description; + offset += this->icon.serialize(outbuffer + offset); + uint32_t length_version = strlen(this->version); + varToArr(outbuffer + offset, length_version); + offset += 4; + memcpy(outbuffer + offset, this->version, length_version); + offset += length_version; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_rocon_uri; + arrToVar(length_rocon_uri, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_rocon_uri; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_rocon_uri-1]=0; + this->rocon_uri = (char *)(inbuffer + offset-1); + offset += length_rocon_uri; + uint32_t length_description; + arrToVar(length_description, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_description; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_description-1]=0; + this->description = (char *)(inbuffer + offset-1); + offset += length_description; + offset += this->icon.deserialize(inbuffer + offset); + uint32_t length_version; + arrToVar(length_version, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_version; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_version-1]=0; + this->version = (char *)(inbuffer + offset-1); + offset += length_version; + return offset; + } + + const char * getType(){ return "rocon_std_msgs/MasterInfo"; }; + const char * getMD5(){ return "e85613ae2e3faade6b77d94b4e0bf4bf"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Remapping.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Remapping.h new file mode 100644 index 0000000000000000000000000000000000000000..5e94955524da6b93c5013fc59393ef62dd1e128a --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Remapping.h @@ -0,0 +1,72 @@ +#ifndef _ROS_rocon_std_msgs_Remapping_h +#define _ROS_rocon_std_msgs_Remapping_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class Remapping : public ros::Msg + { + public: + typedef const char* _remap_from_type; + _remap_from_type remap_from; + typedef const char* _remap_to_type; + _remap_to_type remap_to; + + Remapping(): + remap_from(""), + remap_to("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_remap_from = strlen(this->remap_from); + varToArr(outbuffer + offset, length_remap_from); + offset += 4; + memcpy(outbuffer + offset, this->remap_from, length_remap_from); + offset += length_remap_from; + uint32_t length_remap_to = strlen(this->remap_to); + varToArr(outbuffer + offset, length_remap_to); + offset += 4; + memcpy(outbuffer + offset, this->remap_to, length_remap_to); + offset += length_remap_to; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_remap_from; + arrToVar(length_remap_from, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_remap_from; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_remap_from-1]=0; + this->remap_from = (char *)(inbuffer + offset-1); + offset += length_remap_from; + uint32_t length_remap_to; + arrToVar(length_remap_to, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_remap_to; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_remap_to-1]=0; + this->remap_to = (char *)(inbuffer + offset-1); + offset += length_remap_to; + return offset; + } + + const char * getType(){ return "rocon_std_msgs/Remapping"; }; + const char * getMD5(){ return "26f16c667d483280bc5d040bf2c0cd8d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringArray.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringArray.h new file mode 100644 index 0000000000000000000000000000000000000000..9beb93ab99b69fb28a07aad67e0974a23813ea4f --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringArray.h @@ -0,0 +1,75 @@ +#ifndef _ROS_rocon_std_msgs_StringArray_h +#define _ROS_rocon_std_msgs_StringArray_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class StringArray : public ros::Msg + { + public: + uint32_t strings_length; + typedef char* _strings_type; + _strings_type st_strings; + _strings_type * strings; + + StringArray(): + strings_length(0), strings(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->strings_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->strings_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->strings_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->strings_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->strings_length); + for( uint32_t i = 0; i < strings_length; i++){ + uint32_t length_stringsi = strlen(this->strings[i]); + varToArr(outbuffer + offset, length_stringsi); + offset += 4; + memcpy(outbuffer + offset, this->strings[i], length_stringsi); + offset += length_stringsi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t strings_lengthT = ((uint32_t) (*(inbuffer + offset))); + strings_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + strings_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + strings_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->strings_length); + if(strings_lengthT > strings_length) + this->strings = (char**)realloc(this->strings, strings_lengthT * sizeof(char*)); + strings_length = strings_lengthT; + for( uint32_t i = 0; i < strings_length; i++){ + uint32_t length_st_strings; + arrToVar(length_st_strings, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_strings; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_strings-1]=0; + this->st_strings = (char *)(inbuffer + offset-1); + offset += length_st_strings; + memcpy( &(this->strings[i]), &(this->st_strings), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return "rocon_std_msgs/StringArray"; }; + const char * getMD5(){ return "51789d20146e565223d0963361aecda1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Strings.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Strings.h new file mode 100644 index 0000000000000000000000000000000000000000..71f98091922e3e9728c845555a2df8b2dfac688d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/Strings.h @@ -0,0 +1,83 @@ +#ifndef _ROS_rocon_std_msgs_Strings_h +#define _ROS_rocon_std_msgs_Strings_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class Strings : public ros::Msg + { + public: + enum { ROCON_VERSION = acdc }; + enum { URI_WILDCARD = * }; + enum { HW_PC = pc }; + enum { HW_TURTLEBOT2 = turtlebot2 }; + enum { HW_PR2 = pr2 }; + enum { HW_WAITERBOT = waiterbot }; + enum { HW_ROBOT_OTHER = robot_other }; + enum { HW_GALAXY = galaxy }; + enum { HW_MEGA = mega }; + enum { HW_NOTE3 = note3 }; + enum { HW_PHONE_OTHER = phone_other }; + enum { HW_XOOM = xoom }; + enum { HW_NOTE10 = note10 }; + enum { HW_TABLET_OTHER = tablet_other }; + enum { APPLICATION_FRAMEWORK_OTHER = application_framework_other }; + enum { APPLICATION_FRAMEWORK_OPROS = opros }; + enum { APPLICATION_FRAMEWORK_GROOVY = groovy }; + enum { APPLICATION_FRAMEWORK_HYDRO = hydro }; + enum { APPLICATION_FRAMEWORK_INDIGO = indigo }; + enum { APPLICATION_FRAMEWORK_ROS_OTHER = ros_other }; + enum { OS_OSX = osx }; + enum { OS_FREEBSD = freebsd }; + enum { OS_WINXP = winxp }; + enum { OS_WINDOWS7 = windows7 }; + enum { OS_ARCH = arch }; + enum { OS_DEBIAN = debian }; + enum { OS_FEDORA = fedora }; + enum { OS_GENTOO = gentoo }; + enum { OS_PRECISE = precise }; + enum { OS_QUANTAL = quantal }; + enum { OS_RARING = raring }; + enum { OS_SAUCY = saucy }; + enum { OS_HONEYCOMB = honeycomb }; + enum { OS_ICE_CREAM_SANDWICH = ice_cream_sandwich }; + enum { OS_JELLYBEAN = jellybean }; + enum { OS_KITKAT = kitkat }; + enum { OS_CHROME = chrome }; + enum { OS_FIREFOX = firefox }; + enum { OS_INTERNET_EXPLORER = internet_explorer }; + enum { OS_SAFARI = safari }; + enum { OS_OPERA = opera }; + enum { TAG_SERVICE = concert_service }; + enum { TAG_RAPP = rocon_app }; + enum { TAG_GAZEBO_ROBOT_TYPE = concert_gazebo }; + enum { TAG_SOFTWARE = software_farm }; + + Strings() + { + } + + 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 "rocon_std_msgs/Strings"; }; + const char * getMD5(){ return "58fa1e54e6c0338b3faebae82a13e892"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsPair.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsPair.h new file mode 100644 index 0000000000000000000000000000000000000000..1a8071601845057823ea959a48f1fb8e50210551 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsPair.h @@ -0,0 +1,50 @@ +#ifndef _ROS_rocon_std_msgs_StringsPair_h +#define _ROS_rocon_std_msgs_StringsPair_h + +#include +#include +#include +#include "ros/msg.h" +#include "rocon_std_msgs/StringsPairRequest.h" +#include "rocon_std_msgs/StringsPairResponse.h" + +namespace rocon_std_msgs +{ + + class StringsPair : public ros::Msg + { + public: + typedef rocon_std_msgs::StringsPairRequest _pair_request_type; + _pair_request_type pair_request; + typedef rocon_std_msgs::StringsPairResponse _pair_response_type; + _pair_response_type pair_response; + + StringsPair(): + pair_request(), + pair_response() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->pair_request.serialize(outbuffer + offset); + offset += this->pair_response.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->pair_request.deserialize(inbuffer + offset); + offset += this->pair_response.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "rocon_std_msgs/StringsPair"; }; + const char * getMD5(){ return "d41c9071bd514be249c417a13ec83e65"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsPairRequest.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsPairRequest.h new file mode 100644 index 0000000000000000000000000000000000000000..ba892510b0fbda1c011ddd6f9b12b6319d590f6b --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsPairRequest.h @@ -0,0 +1,50 @@ +#ifndef _ROS_rocon_std_msgs_StringsPairRequest_h +#define _ROS_rocon_std_msgs_StringsPairRequest_h + +#include +#include +#include +#include "ros/msg.h" +#include "uuid_msgs/UniqueID.h" +#include "rocon_std_msgs/StringsRequest.h" + +namespace rocon_std_msgs +{ + + class StringsPairRequest : public ros::Msg + { + public: + typedef uuid_msgs::UniqueID _id_type; + _id_type id; + typedef rocon_std_msgs::StringsRequest _request_type; + _request_type request; + + StringsPairRequest(): + id(), + request() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->id.serialize(outbuffer + offset); + offset += this->request.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->id.deserialize(inbuffer + offset); + offset += this->request.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "rocon_std_msgs/StringsPairRequest"; }; + const char * getMD5(){ return "71ec95e384ce52aa32491f3b69a62027"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsPairResponse.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsPairResponse.h new file mode 100644 index 0000000000000000000000000000000000000000..65e29cd1f446d0014ec2d65af22b01e8a4eb89d9 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsPairResponse.h @@ -0,0 +1,50 @@ +#ifndef _ROS_rocon_std_msgs_StringsPairResponse_h +#define _ROS_rocon_std_msgs_StringsPairResponse_h + +#include +#include +#include +#include "ros/msg.h" +#include "uuid_msgs/UniqueID.h" +#include "rocon_std_msgs/StringsResponse.h" + +namespace rocon_std_msgs +{ + + class StringsPairResponse : public ros::Msg + { + public: + typedef uuid_msgs::UniqueID _id_type; + _id_type id; + typedef rocon_std_msgs::StringsResponse _response_type; + _response_type response; + + StringsPairResponse(): + id(), + response() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->id.serialize(outbuffer + offset); + offset += this->response.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->id.deserialize(inbuffer + offset); + offset += this->response.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "rocon_std_msgs/StringsPairResponse"; }; + const char * getMD5(){ return "7b20492548347a7692aa8c5680af8d1b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsRequest.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsRequest.h new file mode 100644 index 0000000000000000000000000000000000000000..ce30bde171dc96fe5b9c46383ff4ef5eee17a5c8 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsRequest.h @@ -0,0 +1,55 @@ +#ifndef _ROS_rocon_std_msgs_StringsRequest_h +#define _ROS_rocon_std_msgs_StringsRequest_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class StringsRequest : public ros::Msg + { + public: + typedef const char* _data_type; + _data_type data; + + StringsRequest(): + data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_data = strlen(this->data); + varToArr(outbuffer + offset, length_data); + offset += 4; + memcpy(outbuffer + offset, this->data, length_data); + offset += length_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_data; + arrToVar(length_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data-1]=0; + this->data = (char *)(inbuffer + offset-1); + offset += length_data; + return offset; + } + + const char * getType(){ return "rocon_std_msgs/StringsRequest"; }; + const char * getMD5(){ return "992ce8a1687cec8c8bd883ec73ca41d1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsResponse.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsResponse.h new file mode 100644 index 0000000000000000000000000000000000000000..31a9bec25e0ce55de55fa1e5081890e85aa511b4 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rocon_std_msgs/StringsResponse.h @@ -0,0 +1,55 @@ +#ifndef _ROS_rocon_std_msgs_StringsResponse_h +#define _ROS_rocon_std_msgs_StringsResponse_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class StringsResponse : public ros::Msg + { + public: + typedef const char* _data_type; + _data_type data; + + StringsResponse(): + data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_data = strlen(this->data); + varToArr(outbuffer + offset, length_data); + offset += 4; + memcpy(outbuffer + offset, this->data, length_data); + offset += length_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_data; + arrToVar(length_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data-1]=0; + this->data = (char *)(inbuffer + offset-1); + offset += length_data; + return offset; + } + + const char * getType(){ return "rocon_std_msgs/StringsResponse"; }; + const char * getMD5(){ return "992ce8a1687cec8c8bd883ec73ca41d1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros.h new file mode 100644 index 0000000000000000000000000000000000000000..a81550b73005795f7d244d16991c0ecbdce1a4ed --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros.h @@ -0,0 +1,52 @@ +/* + * 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_H_ +#define _ROS_H_ + +#ifndef BUILD_LIBROSSERIALEMBEDDEDLINUX +#include "embedded_linux_comms.c" +#include "duration.cpp" +#include "time.cpp" +#endif + +#include "ros/node_handle.h" +#include "embedded_linux_hardware.h" + +namespace ros +{ +typedef NodeHandle_ NodeHandle; +} + +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/duration.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/duration.h new file mode 100644 index 0000000000000000000000000000000000000000..5ec6d9003024b5e0077bebb1f61d80933f34862d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/duration.h @@ -0,0 +1,75 @@ +/* + * 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_DURATION_H_ +#define _ROS_DURATION_H_ + +#include +#include + +namespace ros +{ + +void normalizeSecNSecSigned(int32_t& sec, int32_t& nsec); + +class Duration +{ +public: + int32_t sec, nsec; + + Duration() : sec(0), nsec(0) {} + Duration(int32_t _sec, int32_t _nsec) : sec(_sec), nsec(_nsec) + { + normalizeSecNSecSigned(sec, nsec); + } + + double toSec() const + { + return (double)sec + 1e-9 * (double)nsec; + }; + void fromSec(double t) + { + sec = (uint32_t) floor(t); + nsec = (uint32_t) round((t - sec) * 1e9); + }; + + Duration& operator+=(const Duration &rhs); + Duration& operator-=(const Duration &rhs); + Duration& operator*=(double scale); +}; + +} + +#endif + diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/msg.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/msg.h new file mode 100644 index 0000000000000000000000000000000000000000..aea0f6f0b506518ca9d2cffb94af57b84104e9a1 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/msg.h @@ -0,0 +1,148 @@ +/* + * 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_MSG_H_ +#define _ROS_MSG_H_ + +#include +#include + +namespace ros +{ + +/* Base Message Type */ +class Msg +{ +public: + virtual int serialize(unsigned char *outbuffer) const = 0; + virtual int deserialize(unsigned char *data) = 0; + virtual const char * getType() = 0; + virtual const char * getMD5() = 0; + + /** + * @brief This tricky function handles promoting a 32bit float to a 64bit + * double, so that AVR can publish messages containing float64 + * fields, despite AVV having no native support for double. + * + * @param[out] outbuffer pointer for buffer to serialize to. + * @param[in] f value to serialize. + * + * @return number of bytes to advance the buffer pointer. + * + */ + static int serializeAvrFloat64(unsigned char* outbuffer, const float f) + { + const int32_t* val = (int32_t*) &f; + int32_t exp = ((*val >> 23) & 255); + if (exp != 0) + { + exp += 1023 - 127; + } + + int32_t sig = *val; + *(outbuffer++) = 0; + *(outbuffer++) = 0; + *(outbuffer++) = 0; + *(outbuffer++) = (sig << 5) & 0xff; + *(outbuffer++) = (sig >> 3) & 0xff; + *(outbuffer++) = (sig >> 11) & 0xff; + *(outbuffer++) = ((exp << 4) & 0xF0) | ((sig >> 19) & 0x0F); + *(outbuffer++) = (exp >> 4) & 0x7F; + + // Mark negative bit as necessary. + if (f < 0) + { + *(outbuffer - 1) |= 0x80; + } + + return 8; + } + + /** + * @brief This tricky function handles demoting a 64bit double to a + * 32bit float, so that AVR can understand messages containing + * float64 fields, despite AVR having no native support for double. + * + * @param[in] inbuffer pointer for buffer to deserialize from. + * @param[out] f pointer to place the deserialized value in. + * + * @return number of bytes to advance the buffer pointer. + */ + static int deserializeAvrFloat64(const unsigned char* inbuffer, float* f) + { + uint32_t* val = (uint32_t*)f; + inbuffer += 3; + + // Copy truncated mantissa. + *val = ((uint32_t)(*(inbuffer++)) >> 5 & 0x07); + *val |= ((uint32_t)(*(inbuffer++)) & 0xff) << 3; + *val |= ((uint32_t)(*(inbuffer++)) & 0xff) << 11; + *val |= ((uint32_t)(*inbuffer) & 0x0f) << 19; + + // Copy truncated exponent. + uint32_t exp = ((uint32_t)(*(inbuffer++)) & 0xf0) >> 4; + exp |= ((uint32_t)(*inbuffer) & 0x7f) << 4; + if (exp != 0) + { + *val |= ((exp) - 1023 + 127) << 23; + } + + // Copy negative sign. + *val |= ((uint32_t)(*(inbuffer++)) & 0x80) << 24; + + return 8; + } + + // Copy data from variable into a byte array + template + static void varToArr(A arr, const V var) + { + for (size_t i = 0; i < sizeof(V); i++) + arr[i] = (var >> (8 * i)); + } + + // Copy data from a byte array into variable + template + static void arrToVar(V& var, const A arr) + { + var = 0; + for (size_t i = 0; i < sizeof(V); i++) + var |= (arr[i] << (8 * i)); + } + +}; + +} // namespace ros + +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/node_handle.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/node_handle.h new file mode 100644 index 0000000000000000000000000000000000000000..9321ed75d4e5f1e93858812ba22e5b000c8dbdb6 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/node_handle.h @@ -0,0 +1,668 @@ +/* + * 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_NODE_HANDLE_H_ +#define ROS_NODE_HANDLE_H_ + +#include + +#include "../std_msgs/Time.h" +#include "../rosserial_msgs/TopicInfo.h" +#include "../rosserial_msgs/Log.h" +#include "../rosserial_msgs/RequestParam.h" + +#include "../ros/msg.h" + +namespace ros +{ + +class NodeHandleBase_ +{ +public: + virtual int publish(int id, const Msg* msg) = 0; + virtual int spinOnce() = 0; + virtual bool connected() = 0; +}; +} + +#include "../ros/publisher.h" +#include "../ros/subscriber.h" +#include "../ros/service_server.h" +#include "../ros/service_client.h" + +namespace ros +{ + +const int SPIN_OK = 0; +const int SPIN_ERR = -1; +const int SPIN_TIMEOUT = -2; + +const uint8_t SYNC_SECONDS = 5; +const uint8_t MODE_FIRST_FF = 0; +/* + * The second sync byte is a protocol version. It's value is 0xff for the first + * version of the rosserial protocol (used up to hydro), 0xfe for the second version + * (introduced in hydro), 0xfd for the next, and so on. Its purpose is to enable + * detection of mismatched protocol versions (e.g. hydro rosserial_python with groovy + * rosserial_arduino. It must be changed in both this file and in + * rosserial_python/src/rosserial_python/SerialClient.py + */ +const uint8_t MODE_PROTOCOL_VER = 1; +const uint8_t PROTOCOL_VER1 = 0xff; // through groovy +const uint8_t PROTOCOL_VER2 = 0xfe; // in hydro +const uint8_t PROTOCOL_VER = PROTOCOL_VER2; +const uint8_t MODE_SIZE_L = 2; +const uint8_t MODE_SIZE_H = 3; +const uint8_t MODE_SIZE_CHECKSUM = 4; // checksum for msg size received from size L and H +const uint8_t MODE_TOPIC_L = 5; // waiting for topic id +const uint8_t MODE_TOPIC_H = 6; +const uint8_t MODE_MESSAGE = 7; +const uint8_t MODE_MSG_CHECKSUM = 8; // checksum for msg and topic id + + +const uint8_t SERIAL_MSG_TIMEOUT = 20; // 20 milliseconds to recieve all of message data + +using rosserial_msgs::TopicInfo; + +/* Node Handle */ +template +class NodeHandle_ : public NodeHandleBase_ +{ +protected: + Hardware hardware_; + + /* time used for syncing */ + uint32_t rt_time; + + /* used for computing current time */ + uint32_t sec_offset, nsec_offset; + + /* Spinonce maximum work timeout */ + uint32_t spin_timeout_; + + uint8_t message_in[INPUT_SIZE]; + uint8_t message_out[OUTPUT_SIZE]; + + Publisher * publishers[MAX_PUBLISHERS]; + Subscriber_ * subscribers[MAX_SUBSCRIBERS]; + + /* + * Setup Functions + */ +public: + NodeHandle_() : configured_(false) + { + + for (unsigned int i = 0; i < MAX_PUBLISHERS; i++) + publishers[i] = 0; + + for (unsigned int i = 0; i < MAX_SUBSCRIBERS; i++) + subscribers[i] = 0; + + for (unsigned int i = 0; i < INPUT_SIZE; i++) + message_in[i] = 0; + + for (unsigned int i = 0; i < OUTPUT_SIZE; i++) + message_out[i] = 0; + + req_param_resp.ints_length = 0; + req_param_resp.ints = NULL; + req_param_resp.floats_length = 0; + req_param_resp.floats = NULL; + req_param_resp.ints_length = 0; + req_param_resp.ints = NULL; + + spin_timeout_ = 0; + } + + Hardware* getHardware() + { + return &hardware_; + } + + /* Start serial, initialize buffers */ + void initNode() + { + hardware_.init(); + mode_ = 0; + bytes_ = 0; + index_ = 0; + topic_ = 0; + }; + + /* Start a named port, which may be network server IP, initialize buffers */ + void initNode(char *portName) + { + hardware_.init(portName); + mode_ = 0; + bytes_ = 0; + index_ = 0; + topic_ = 0; + }; + + /** + * @brief Sets the maximum time in millisconds that spinOnce() can work. + * This will not effect the processing of the buffer, as spinOnce processes + * one byte at a time. It simply sets the maximum time that one call can + * process for. You can choose to clear the buffer if that is beneficial if + * SPIN_TIMEOUT is returned from spinOnce(). + * @param timeout The timeout in milliseconds that spinOnce will function. + */ + void setSpinTimeout(const uint32_t& timeout) + { + spin_timeout_ = timeout; + } + +protected: + //State machine variables for spinOnce + int mode_; + int bytes_; + int topic_; + int index_; + int checksum_; + + bool configured_; + + /* used for syncing the time */ + uint32_t last_sync_time; + uint32_t last_sync_receive_time; + uint32_t last_msg_timeout_time; + +public: + /* This function goes in your loop() function, it handles + * serial input and callbacks for subscribers. + */ + + + virtual int spinOnce() + { + /* restart if timed out */ + uint32_t c_time = hardware_.time(); + if ((c_time - last_sync_receive_time) > (SYNC_SECONDS * 2200)) + { + configured_ = false; + } + + /* reset if message has timed out */ + if (mode_ != MODE_FIRST_FF) + { + if (c_time > last_msg_timeout_time) + { + mode_ = MODE_FIRST_FF; + } + } + + /* while available buffer, read data */ + while (true) + { + // If a timeout has been specified, check how long spinOnce has been running. + if (spin_timeout_ > 0) + { + // If the maximum processing timeout has been exceeded, exit with error. + // The next spinOnce can continue where it left off, or optionally + // based on the application in use, the hardware buffer could be flushed + // and start fresh. + if ((hardware_.time() - c_time) > spin_timeout_) + { + // Exit the spin, processing timeout exceeded. + return SPIN_TIMEOUT; + } + } + int data = hardware_.read(); + if (data < 0) + break; + checksum_ += data; + if (mode_ == MODE_MESSAGE) /* message data being recieved */ + { + message_in[index_++] = data; + bytes_--; + if (bytes_ == 0) /* is message complete? if so, checksum */ + mode_ = MODE_MSG_CHECKSUM; + } + else if (mode_ == MODE_FIRST_FF) + { + if (data == 0xff) + { + mode_++; + last_msg_timeout_time = c_time + SERIAL_MSG_TIMEOUT; + } + else if (hardware_.time() - c_time > (SYNC_SECONDS * 1000)) + { + /* We have been stuck in spinOnce too long, return error */ + configured_ = false; + return SPIN_TIMEOUT; + } + } + else if (mode_ == MODE_PROTOCOL_VER) + { + if (data == PROTOCOL_VER) + { + mode_++; + } + else + { + mode_ = MODE_FIRST_FF; + if (configured_ == false) + requestSyncTime(); /* send a msg back showing our protocol version */ + } + } + else if (mode_ == MODE_SIZE_L) /* bottom half of message size */ + { + bytes_ = data; + index_ = 0; + mode_++; + checksum_ = data; /* first byte for calculating size checksum */ + } + else if (mode_ == MODE_SIZE_H) /* top half of message size */ + { + bytes_ += data << 8; + mode_++; + } + else if (mode_ == MODE_SIZE_CHECKSUM) + { + if ((checksum_ % 256) == 255) + mode_++; + else + mode_ = MODE_FIRST_FF; /* Abandon the frame if the msg len is wrong */ + } + else if (mode_ == MODE_TOPIC_L) /* bottom half of topic id */ + { + topic_ = data; + mode_++; + checksum_ = data; /* first byte included in checksum */ + } + else if (mode_ == MODE_TOPIC_H) /* top half of topic id */ + { + topic_ += data << 8; + mode_ = MODE_MESSAGE; + if (bytes_ == 0) + mode_ = MODE_MSG_CHECKSUM; + } + else if (mode_ == MODE_MSG_CHECKSUM) /* do checksum */ + { + mode_ = MODE_FIRST_FF; + if ((checksum_ % 256) == 255) + { + if (topic_ == TopicInfo::ID_PUBLISHER) + { + requestSyncTime(); + negotiateTopics(); + last_sync_time = c_time; + last_sync_receive_time = c_time; + return SPIN_ERR; + } + else if (topic_ == TopicInfo::ID_TIME) + { + syncTime(message_in); + } + else if (topic_ == TopicInfo::ID_PARAMETER_REQUEST) + { + req_param_resp.deserialize(message_in); + param_recieved = true; + } + else if (topic_ == TopicInfo::ID_TX_STOP) + { + configured_ = false; + } + else + { + if (subscribers[topic_ - 100]) + subscribers[topic_ - 100]->callback(message_in); + } + } + } + } + + /* occasionally sync time */ + if (configured_ && ((c_time - last_sync_time) > (SYNC_SECONDS * 500))) + { + requestSyncTime(); + last_sync_time = c_time; + } + + return SPIN_OK; + } + + + /* Are we connected to the PC? */ + virtual bool connected() + { + return configured_; + }; + + /******************************************************************** + * Time functions + */ + + void requestSyncTime() + { + std_msgs::Time t; + publish(TopicInfo::ID_TIME, &t); + rt_time = hardware_.time(); + } + + void syncTime(uint8_t * data) + { + std_msgs::Time t; + uint32_t offset = hardware_.time() - rt_time; + + t.deserialize(data); + t.data.sec += offset / 1000; + t.data.nsec += (offset % 1000) * 1000000UL; + + this->setNow(t.data); + last_sync_receive_time = hardware_.time(); + } + + Time now() + { + uint32_t ms = hardware_.time(); + Time current_time; + current_time.sec = ms / 1000 + sec_offset; + current_time.nsec = (ms % 1000) * 1000000UL + nsec_offset; + normalizeSecNSec(current_time.sec, current_time.nsec); + return current_time; + } + + void setNow(Time & new_now) + { + uint32_t ms = hardware_.time(); + sec_offset = new_now.sec - ms / 1000 - 1; + nsec_offset = new_now.nsec - (ms % 1000) * 1000000UL + 1000000000UL; + normalizeSecNSec(sec_offset, nsec_offset); + } + + /******************************************************************** + * Topic Management + */ + + /* Register a new publisher */ + bool advertise(Publisher & p) + { + for (int i = 0; i < MAX_PUBLISHERS; i++) + { + if (publishers[i] == 0) // empty slot + { + publishers[i] = &p; + p.id_ = i + 100 + MAX_SUBSCRIBERS; + p.nh_ = this; + return true; + } + } + return false; + } + + /* Register a new subscriber */ + template + bool subscribe(SubscriberT& s) + { + for (int i = 0; i < MAX_SUBSCRIBERS; i++) + { + if (subscribers[i] == 0) // empty slot + { + subscribers[i] = static_cast(&s); + s.id_ = i + 100; + return true; + } + } + return false; + } + + /* Register a new Service Server */ + template + bool advertiseService(ServiceServer& srv) + { + bool v = advertise(srv.pub); + for (int i = 0; i < MAX_SUBSCRIBERS; i++) + { + if (subscribers[i] == 0) // empty slot + { + subscribers[i] = static_cast(&srv); + srv.id_ = i + 100; + return v; + } + } + return false; + } + + /* Register a new Service Client */ + template + bool serviceClient(ServiceClient& srv) + { + bool v = advertise(srv.pub); + for (int i = 0; i < MAX_SUBSCRIBERS; i++) + { + if (subscribers[i] == 0) // empty slot + { + subscribers[i] = static_cast(&srv); + srv.id_ = i + 100; + return v; + } + } + return false; + } + + void negotiateTopics() + { + rosserial_msgs::TopicInfo ti; + int i; + for (i = 0; i < MAX_PUBLISHERS; i++) + { + if (publishers[i] != 0) // non-empty slot + { + ti.topic_id = publishers[i]->id_; + ti.topic_name = (char *) publishers[i]->topic_; + ti.message_type = (char *) publishers[i]->msg_->getType(); + ti.md5sum = (char *) publishers[i]->msg_->getMD5(); + ti.buffer_size = OUTPUT_SIZE; + publish(publishers[i]->getEndpointType(), &ti); + } + } + for (i = 0; i < MAX_SUBSCRIBERS; i++) + { + if (subscribers[i] != 0) // non-empty slot + { + ti.topic_id = subscribers[i]->id_; + ti.topic_name = (char *) subscribers[i]->topic_; + ti.message_type = (char *) subscribers[i]->getMsgType(); + ti.md5sum = (char *) subscribers[i]->getMsgMD5(); + ti.buffer_size = INPUT_SIZE; + publish(subscribers[i]->getEndpointType(), &ti); + } + } + configured_ = true; + } + + virtual int publish(int id, const Msg * msg) + { + if (id >= 100 && !configured_) + return 0; + + /* serialize message */ + int l = msg->serialize(message_out + 7); + + /* setup the header */ + message_out[0] = 0xff; + message_out[1] = PROTOCOL_VER; + message_out[2] = (uint8_t)((uint16_t)l & 255); + message_out[3] = (uint8_t)((uint16_t)l >> 8); + message_out[4] = 255 - ((message_out[2] + message_out[3]) % 256); + message_out[5] = (uint8_t)((int16_t)id & 255); + message_out[6] = (uint8_t)((int16_t)id >> 8); + + /* calculate checksum */ + int chk = 0; + for (int i = 5; i < l + 7; i++) + chk += message_out[i]; + l += 7; + message_out[l++] = 255 - (chk % 256); + + if (l <= OUTPUT_SIZE) + { + hardware_.write(message_out, l); + return l; + } + else + { + logerror("Message from device dropped: message larger than buffer."); + return -1; + } + } + + /******************************************************************** + * Logging + */ + +private: + void log(char byte, const char * msg) + { + rosserial_msgs::Log l; + l.level = byte; + l.msg = (char*)msg; + publish(rosserial_msgs::TopicInfo::ID_LOG, &l); + } + +public: + void logdebug(const char* msg) + { + log(rosserial_msgs::Log::ROSDEBUG, msg); + } + void loginfo(const char * msg) + { + log(rosserial_msgs::Log::INFO, msg); + } + void logwarn(const char *msg) + { + log(rosserial_msgs::Log::WARN, msg); + } + void logerror(const char*msg) + { + log(rosserial_msgs::Log::ERROR, msg); + } + void logfatal(const char*msg) + { + log(rosserial_msgs::Log::FATAL, msg); + } + + /******************************************************************** + * Parameters + */ + +private: + bool param_recieved; + rosserial_msgs::RequestParamResponse req_param_resp; + + bool requestParam(const char * name, int time_out = 1000) + { + param_recieved = false; + rosserial_msgs::RequestParamRequest req; + req.name = (char*)name; + publish(TopicInfo::ID_PARAMETER_REQUEST, &req); + uint32_t end_time = hardware_.time() + time_out; + while (!param_recieved) + { + spinOnce(); + if (hardware_.time() > end_time) + { + logwarn("Failed to get param: timeout expired"); + return false; + } + } + return true; + } + +public: + bool getParam(const char* name, int* param, int length = 1, int timeout = 1000) + { + if (requestParam(name, timeout)) + { + if (length == req_param_resp.ints_length) + { + //copy it over + for (int i = 0; i < length; i++) + param[i] = req_param_resp.ints[i]; + return true; + } + else + { + logwarn("Failed to get param: length mismatch"); + } + } + return false; + } + bool getParam(const char* name, float* param, int length = 1, int timeout = 1000) + { + if (requestParam(name, timeout)) + { + if (length == req_param_resp.floats_length) + { + //copy it over + for (int i = 0; i < length; i++) + param[i] = req_param_resp.floats[i]; + return true; + } + else + { + logwarn("Failed to get param: length mismatch"); + } + } + return false; + } + bool getParam(const char* name, char** param, int length = 1, int timeout = 1000) + { + if (requestParam(name, timeout)) + { + if (length == req_param_resp.strings_length) + { + //copy it over + for (int i = 0; i < length; i++) + strcpy(param[i], req_param_resp.strings[i]); + return true; + } + else + { + logwarn("Failed to get param: length mismatch"); + } + } + return false; + } +}; + +} + +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/publisher.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/publisher.h new file mode 100644 index 0000000000000000000000000000000000000000..86dde386fcad40bd691803279e9e8cf8ef5a3986 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/publisher.h @@ -0,0 +1,74 @@ +/* + * 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_PUBLISHER_H_ +#define _ROS_PUBLISHER_H_ + +#include "../rosserial_msgs/TopicInfo.h" +#include "../ros/node_handle.h" + +namespace ros +{ + +/* Generic Publisher */ +class Publisher +{ +public: + Publisher(const char * topic_name, Msg * msg, int endpoint = rosserial_msgs::TopicInfo::ID_PUBLISHER) : + topic_(topic_name), + msg_(msg), + endpoint_(endpoint) {}; + + int publish(const Msg * msg) + { + return nh_->publish(id_, msg); + }; + int getEndpointType() + { + return endpoint_; + } + + const char * topic_; + Msg *msg_; + // id_ and no_ are set by NodeHandle when we advertise + int id_; + NodeHandleBase_* nh_; + +private: + int endpoint_; +}; + +} + +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/service_client.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/service_client.h new file mode 100644 index 0000000000000000000000000000000000000000..d0629a462e24af2687c03cab925d5e23cf04b68f --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/service_client.h @@ -0,0 +1,95 @@ +/* + * 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_SERVICE_CLIENT_H_ +#define _ROS_SERVICE_CLIENT_H_ + +#include "../rosserial_msgs/TopicInfo.h" + +#include "../ros/publisher.h" +#include "../ros/subscriber.h" + +namespace ros +{ + +template +class ServiceClient : public Subscriber_ +{ +public: + ServiceClient(const char* topic_name) : + pub(topic_name, &req, rosserial_msgs::TopicInfo::ID_SERVICE_CLIENT + rosserial_msgs::TopicInfo::ID_PUBLISHER) + { + this->topic_ = topic_name; + this->waiting = true; + } + + virtual void call(const MReq & request, MRes & response) + { + if (!pub.nh_->connected()) return; + ret = &response; + waiting = true; + pub.publish(&request); + while (waiting && pub.nh_->connected()) + if (pub.nh_->spinOnce() < 0) break; + } + + // these refer to the subscriber + virtual void callback(unsigned char *data) + { + ret->deserialize(data); + waiting = false; + } + virtual const char * getMsgType() + { + return this->resp.getType(); + } + virtual const char * getMsgMD5() + { + return this->resp.getMD5(); + } + virtual int getEndpointType() + { + return rosserial_msgs::TopicInfo::ID_SERVICE_CLIENT + rosserial_msgs::TopicInfo::ID_SUBSCRIBER; + } + + MReq req; + MRes resp; + MRes * ret; + bool waiting; + Publisher pub; +}; + +} + +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/service_server.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/service_server.h new file mode 100644 index 0000000000000000000000000000000000000000..1b95a9e863abc65e73c191d6a6ee3f890a3e9d0b --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/service_server.h @@ -0,0 +1,130 @@ +/* + * 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_SERVICE_SERVER_H_ +#define _ROS_SERVICE_SERVER_H_ + +#include "../rosserial_msgs/TopicInfo.h" + +#include "../ros/publisher.h" +#include "../ros/subscriber.h" + +namespace ros +{ + +template +class ServiceServer : public Subscriber_ +{ +public: + typedef void(ObjT::*CallbackT)(const MReq&, MRes&); + + ServiceServer(const char* topic_name, CallbackT cb, ObjT* obj) : + pub(topic_name, &resp, rosserial_msgs::TopicInfo::ID_SERVICE_SERVER + rosserial_msgs::TopicInfo::ID_PUBLISHER), + obj_(obj) + { + this->topic_ = topic_name; + this->cb_ = cb; + } + + // these refer to the subscriber + virtual void callback(unsigned char *data) + { + req.deserialize(data); + (obj_->*cb_)(req, resp); + pub.publish(&resp); + } + virtual const char * getMsgType() + { + return this->req.getType(); + } + virtual const char * getMsgMD5() + { + return this->req.getMD5(); + } + virtual int getEndpointType() + { + return rosserial_msgs::TopicInfo::ID_SERVICE_SERVER + rosserial_msgs::TopicInfo::ID_SUBSCRIBER; + } + + MReq req; + MRes resp; + Publisher pub; +private: + CallbackT cb_; + ObjT* obj_; +}; + +template +class ServiceServer : public Subscriber_ +{ +public: + typedef void(*CallbackT)(const MReq&, MRes&); + + ServiceServer(const char* topic_name, CallbackT cb) : + pub(topic_name, &resp, rosserial_msgs::TopicInfo::ID_SERVICE_SERVER + rosserial_msgs::TopicInfo::ID_PUBLISHER) + { + this->topic_ = topic_name; + this->cb_ = cb; + } + + // these refer to the subscriber + virtual void callback(unsigned char *data) + { + req.deserialize(data); + cb_(req, resp); + pub.publish(&resp); + } + virtual const char * getMsgType() + { + return this->req.getType(); + } + virtual const char * getMsgMD5() + { + return this->req.getMD5(); + } + virtual int getEndpointType() + { + return rosserial_msgs::TopicInfo::ID_SERVICE_SERVER + rosserial_msgs::TopicInfo::ID_SUBSCRIBER; + } + + MReq req; + MRes resp; + Publisher pub; +private: + CallbackT cb_; +}; + +} + +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/subscriber.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/subscriber.h new file mode 100644 index 0000000000000000000000000000000000000000..0f7364afbf9f864d0920dcd4b72c6ecab4583d4f --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/subscriber.h @@ -0,0 +1,140 @@ +/* + * 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_SUBSCRIBER_H_ +#define ROS_SUBSCRIBER_H_ + +#include "../rosserial_msgs/TopicInfo.h" + +namespace ros +{ + +/* Base class for objects subscribers. */ +class Subscriber_ +{ +public: + virtual void callback(unsigned char *data) = 0; + virtual int getEndpointType() = 0; + + // id_ is set by NodeHandle when we advertise + int id_; + + virtual const char * getMsgType() = 0; + virtual const char * getMsgMD5() = 0; + const char * topic_; +}; + +/* Bound function subscriber. */ +template +class Subscriber: public Subscriber_ +{ +public: + typedef void(ObjT::*CallbackT)(const MsgT&); + MsgT msg; + + Subscriber(const char * topic_name, CallbackT cb, ObjT* obj, int endpoint = rosserial_msgs::TopicInfo::ID_SUBSCRIBER) : + cb_(cb), + obj_(obj), + endpoint_(endpoint) + { + topic_ = topic_name; + }; + + virtual void callback(unsigned char* data) + { + msg.deserialize(data); + (obj_->*cb_)(msg); + } + + virtual const char * getMsgType() + { + return this->msg.getType(); + } + virtual const char * getMsgMD5() + { + return this->msg.getMD5(); + } + virtual int getEndpointType() + { + return endpoint_; + } + +private: + CallbackT cb_; + ObjT* obj_; + int endpoint_; +}; + +/* Standalone function subscriber. */ +template +class Subscriber: public Subscriber_ +{ +public: + typedef void(*CallbackT)(const MsgT&); + MsgT msg; + + Subscriber(const char * topic_name, CallbackT cb, int endpoint = rosserial_msgs::TopicInfo::ID_SUBSCRIBER) : + cb_(cb), + endpoint_(endpoint) + { + topic_ = topic_name; + }; + + virtual void callback(unsigned char* data) + { + msg.deserialize(data); + this->cb_(msg); + } + + virtual const char * getMsgType() + { + return this->msg.getType(); + } + virtual const char * getMsgMD5() + { + return this->msg.getMD5(); + } + virtual int getEndpointType() + { + return endpoint_; + } + +private: + CallbackT cb_; + int endpoint_; +}; + +} + +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/time.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/time.h new file mode 100644 index 0000000000000000000000000000000000000000..72657cb357e7511a124a397a9c6a24bfee61f9d1 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/ros/time.h @@ -0,0 +1,82 @@ +/* + * 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_TIME_H_ +#define ROS_TIME_H_ + +#include "duration.h" +#include +#include + +namespace ros +{ +void normalizeSecNSec(uint32_t &sec, uint32_t &nsec); + +class Time +{ +public: + uint32_t sec, nsec; + + Time() : sec(0), nsec(0) {} + Time(uint32_t _sec, uint32_t _nsec) : sec(_sec), nsec(_nsec) + { + normalizeSecNSec(sec, nsec); + } + + double toSec() const + { + return (double)sec + 1e-9 * (double)nsec; + }; + void fromSec(double t) + { + sec = (uint32_t) floor(t); + nsec = (uint32_t) round((t - sec) * 1e9); + }; + + uint32_t toNsec() + { + return (uint32_t)sec * 1000000000ull + (uint32_t)nsec; + }; + Time& fromNSec(int32_t t); + + Time& operator +=(const Duration &rhs); + Time& operator -=(const Duration &rhs); + + static Time now(); + static void setNow(Time & new_now); +}; + +} + +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/roscpp/Empty.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/roscpp/Empty.h new file mode 100644 index 0000000000000000000000000000000000000000..df021b79188f55ba4e5a3bbf468ad0d2f0c7605f --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/roscpp/Empty.h @@ -0,0 +1,70 @@ +#ifndef _ROS_SERVICE_Empty_h +#define _ROS_SERVICE_Empty_h +#include +#include +#include +#include "ros/msg.h" + +namespace roscpp +{ + +static const char EMPTY[] = "roscpp/Empty"; + + class EmptyRequest : public ros::Msg + { + public: + + EmptyRequest() + { + } + + 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 EMPTY; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class EmptyResponse : public ros::Msg + { + public: + + EmptyResponse() + { + } + + 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 EMPTY; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class Empty { + public: + typedef EmptyRequest Request; + typedef EmptyResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/roscpp/GetLoggers.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/roscpp/GetLoggers.h new file mode 100644 index 0000000000000000000000000000000000000000..35f67fbc4a8447280e69c6560841888e868d738e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/roscpp/GetLoggers.h @@ -0,0 +1,96 @@ +#ifndef _ROS_SERVICE_GetLoggers_h +#define _ROS_SERVICE_GetLoggers_h +#include +#include +#include +#include "ros/msg.h" +#include "roscpp/Logger.h" + +namespace roscpp +{ + +static const char GETLOGGERS[] = "roscpp/GetLoggers"; + + class GetLoggersRequest : public ros::Msg + { + public: + + GetLoggersRequest() + { + } + + 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 GETLOGGERS; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetLoggersResponse : public ros::Msg + { + public: + uint32_t loggers_length; + typedef roscpp::Logger _loggers_type; + _loggers_type st_loggers; + _loggers_type * loggers; + + GetLoggersResponse(): + loggers_length(0), loggers(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->loggers_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->loggers_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->loggers_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->loggers_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->loggers_length); + for( uint32_t i = 0; i < loggers_length; i++){ + offset += this->loggers[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t loggers_lengthT = ((uint32_t) (*(inbuffer + offset))); + loggers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + loggers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + loggers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->loggers_length); + if(loggers_lengthT > loggers_length) + this->loggers = (roscpp::Logger*)realloc(this->loggers, loggers_lengthT * sizeof(roscpp::Logger)); + loggers_length = loggers_lengthT; + for( uint32_t i = 0; i < loggers_length; i++){ + offset += this->st_loggers.deserialize(inbuffer + offset); + memcpy( &(this->loggers[i]), &(this->st_loggers), sizeof(roscpp::Logger)); + } + return offset; + } + + const char * getType(){ return GETLOGGERS; }; + const char * getMD5(){ return "32e97e85527d4678a8f9279894bb64b0"; }; + + }; + + class GetLoggers { + public: + typedef GetLoggersRequest Request; + typedef GetLoggersResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/roscpp/Logger.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/roscpp/Logger.h new file mode 100644 index 0000000000000000000000000000000000000000..b954b7160dc01fd98c96757a7090910e8dc578b6 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/roscpp/Logger.h @@ -0,0 +1,72 @@ +#ifndef _ROS_roscpp_Logger_h +#define _ROS_roscpp_Logger_h + +#include +#include +#include +#include "ros/msg.h" + +namespace roscpp +{ + + class Logger : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _level_type; + _level_type level; + + Logger(): + name(""), + level("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_level = strlen(this->level); + varToArr(outbuffer + offset, length_level); + offset += 4; + memcpy(outbuffer + offset, this->level, length_level); + offset += length_level; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_level; + arrToVar(length_level, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_level; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_level-1]=0; + this->level = (char *)(inbuffer + offset-1); + offset += length_level; + return offset; + } + + const char * getType(){ return "roscpp/Logger"; }; + const char * getMD5(){ return "a6069a2ff40db7bd32143dd66e1f408e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/roscpp/SetLoggerLevel.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/roscpp/SetLoggerLevel.h new file mode 100644 index 0000000000000000000000000000000000000000..64f2a24b39a0c9ec1fd675db08fa64401395fe77 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/roscpp/SetLoggerLevel.h @@ -0,0 +1,104 @@ +#ifndef _ROS_SERVICE_SetLoggerLevel_h +#define _ROS_SERVICE_SetLoggerLevel_h +#include +#include +#include +#include "ros/msg.h" + +namespace roscpp +{ + +static const char SETLOGGERLEVEL[] = "roscpp/SetLoggerLevel"; + + class SetLoggerLevelRequest : public ros::Msg + { + public: + typedef const char* _logger_type; + _logger_type logger; + typedef const char* _level_type; + _level_type level; + + SetLoggerLevelRequest(): + logger(""), + level("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_logger = strlen(this->logger); + varToArr(outbuffer + offset, length_logger); + offset += 4; + memcpy(outbuffer + offset, this->logger, length_logger); + offset += length_logger; + uint32_t length_level = strlen(this->level); + varToArr(outbuffer + offset, length_level); + offset += 4; + memcpy(outbuffer + offset, this->level, length_level); + offset += length_level; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_logger; + arrToVar(length_logger, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_logger; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_logger-1]=0; + this->logger = (char *)(inbuffer + offset-1); + offset += length_logger; + uint32_t length_level; + arrToVar(length_level, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_level; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_level-1]=0; + this->level = (char *)(inbuffer + offset-1); + offset += length_level; + return offset; + } + + const char * getType(){ return SETLOGGERLEVEL; }; + const char * getMD5(){ return "51da076440d78ca1684d36c868df61ea"; }; + + }; + + class SetLoggerLevelResponse : public ros::Msg + { + public: + + SetLoggerLevelResponse() + { + } + + 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 SETLOGGERLEVEL; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class SetLoggerLevel { + public: + typedef SetLoggerLevelRequest Request; + typedef SetLoggerLevelResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/roscpp_tutorials/TwoInts.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/roscpp_tutorials/TwoInts.h new file mode 100644 index 0000000000000000000000000000000000000000..03510bb864554e7e9682522d3ac7f046171fd5d4 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/roscpp_tutorials/TwoInts.h @@ -0,0 +1,166 @@ +#ifndef _ROS_SERVICE_TwoInts_h +#define _ROS_SERVICE_TwoInts_h +#include +#include +#include +#include "ros/msg.h" + +namespace roscpp_tutorials +{ + +static const char TWOINTS[] = "roscpp_tutorials/TwoInts"; + + class TwoIntsRequest : public ros::Msg + { + public: + typedef int64_t _a_type; + _a_type a; + typedef int64_t _b_type; + _b_type b; + + TwoIntsRequest(): + 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 TWOINTS; }; + const char * getMD5(){ return "36d09b846be0b371c5f190354dd3153e"; }; + + }; + + class TwoIntsResponse : public ros::Msg + { + public: + typedef int64_t _sum_type; + _sum_type sum; + + TwoIntsResponse(): + 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 TWOINTS; }; + const char * getMD5(){ return "b88405221c77b1878a3cbbfff53428d7"; }; + + }; + + class TwoInts { + public: + typedef TwoIntsRequest Request; + typedef TwoIntsResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosgraph_msgs/Clock.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosgraph_msgs/Clock.h new file mode 100644 index 0000000000000000000000000000000000000000..4d8736ce012dd58632c5f345f83b9de45dd2958e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosgraph_msgs/Clock.h @@ -0,0 +1,62 @@ +#ifndef _ROS_rosgraph_msgs_Clock_h +#define _ROS_rosgraph_msgs_Clock_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" + +namespace rosgraph_msgs +{ + + class Clock : public ros::Msg + { + public: + typedef ros::Time _clock_type; + _clock_type clock; + + Clock(): + clock() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->clock.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->clock.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->clock.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->clock.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->clock.sec); + *(outbuffer + offset + 0) = (this->clock.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->clock.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->clock.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->clock.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->clock.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->clock.sec = ((uint32_t) (*(inbuffer + offset))); + this->clock.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->clock.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->clock.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->clock.sec); + this->clock.nsec = ((uint32_t) (*(inbuffer + offset))); + this->clock.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->clock.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->clock.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->clock.nsec); + return offset; + } + + const char * getType(){ return "rosgraph_msgs/Clock"; }; + const char * getMD5(){ return "a9c97c1d230cfc112e270351a944ee47"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosgraph_msgs/Log.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosgraph_msgs/Log.h new file mode 100644 index 0000000000000000000000000000000000000000..45c45669743c22a1283c3099ea16e0387a3dd4c6 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosgraph_msgs/Log.h @@ -0,0 +1,185 @@ +#ifndef _ROS_rosgraph_msgs_Log_h +#define _ROS_rosgraph_msgs_Log_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace rosgraph_msgs +{ + + class Log : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef int8_t _level_type; + _level_type level; + typedef const char* _name_type; + _name_type name; + typedef const char* _msg_type; + _msg_type msg; + typedef const char* _file_type; + _file_type file; + typedef const char* _function_type; + _function_type function; + typedef uint32_t _line_type; + _line_type line; + uint32_t topics_length; + typedef char* _topics_type; + _topics_type st_topics; + _topics_type * topics; + enum { DEBUG = 1 }; + enum { INFO = 2 }; + enum { WARN = 4 }; + enum { ERROR = 8 }; + enum { FATAL = 16 }; + + Log(): + header(), + level(0), + name(""), + msg(""), + file(""), + function(""), + line(0), + topics_length(0), topics(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + int8_t real; + uint8_t base; + } u_level; + u_level.real = this->level; + *(outbuffer + offset + 0) = (u_level.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->level); + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_msg = strlen(this->msg); + varToArr(outbuffer + offset, length_msg); + offset += 4; + memcpy(outbuffer + offset, this->msg, length_msg); + offset += length_msg; + uint32_t length_file = strlen(this->file); + varToArr(outbuffer + offset, length_file); + offset += 4; + memcpy(outbuffer + offset, this->file, length_file); + offset += length_file; + uint32_t length_function = strlen(this->function); + varToArr(outbuffer + offset, length_function); + offset += 4; + memcpy(outbuffer + offset, this->function, length_function); + offset += length_function; + *(outbuffer + offset + 0) = (this->line >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->line >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->line >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->line >> (8 * 3)) & 0xFF; + offset += sizeof(this->line); + *(outbuffer + offset + 0) = (this->topics_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->topics_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->topics_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->topics_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->topics_length); + for( uint32_t i = 0; i < topics_length; i++){ + uint32_t length_topicsi = strlen(this->topics[i]); + varToArr(outbuffer + offset, length_topicsi); + offset += 4; + memcpy(outbuffer + offset, this->topics[i], length_topicsi); + offset += length_topicsi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + int8_t real; + uint8_t base; + } u_level; + u_level.base = 0; + u_level.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->level = u_level.real; + offset += sizeof(this->level); + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_msg; + arrToVar(length_msg, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_msg; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_msg-1]=0; + this->msg = (char *)(inbuffer + offset-1); + offset += length_msg; + uint32_t length_file; + arrToVar(length_file, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_file; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_file-1]=0; + this->file = (char *)(inbuffer + offset-1); + offset += length_file; + uint32_t length_function; + arrToVar(length_function, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_function; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_function-1]=0; + this->function = (char *)(inbuffer + offset-1); + offset += length_function; + this->line = ((uint32_t) (*(inbuffer + offset))); + this->line |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->line |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->line |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->line); + uint32_t topics_lengthT = ((uint32_t) (*(inbuffer + offset))); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->topics_length); + if(topics_lengthT > topics_length) + this->topics = (char**)realloc(this->topics, topics_lengthT * sizeof(char*)); + topics_length = topics_lengthT; + for( uint32_t i = 0; i < topics_length; i++){ + uint32_t length_st_topics; + arrToVar(length_st_topics, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_topics; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_topics-1]=0; + this->st_topics = (char *)(inbuffer + offset-1); + offset += length_st_topics; + memcpy( &(this->topics[i]), &(this->st_topics), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return "rosgraph_msgs/Log"; }; + const char * getMD5(){ return "acffd30cd6b6de30f120938c17c593fb"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosgraph_msgs/TopicStatistics.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosgraph_msgs/TopicStatistics.h new file mode 100644 index 0000000000000000000000000000000000000000..c62f2f901e82215291a8f3885de2cb996a7b27aa --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosgraph_msgs/TopicStatistics.h @@ -0,0 +1,347 @@ +#ifndef _ROS_rosgraph_msgs_TopicStatistics_h +#define _ROS_rosgraph_msgs_TopicStatistics_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" +#include "ros/duration.h" + +namespace rosgraph_msgs +{ + + class TopicStatistics : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + typedef const char* _node_pub_type; + _node_pub_type node_pub; + typedef const char* _node_sub_type; + _node_sub_type node_sub; + typedef ros::Time _window_start_type; + _window_start_type window_start; + typedef ros::Time _window_stop_type; + _window_stop_type window_stop; + typedef int32_t _delivered_msgs_type; + _delivered_msgs_type delivered_msgs; + typedef int32_t _dropped_msgs_type; + _dropped_msgs_type dropped_msgs; + typedef int32_t _traffic_type; + _traffic_type traffic; + typedef ros::Duration _period_mean_type; + _period_mean_type period_mean; + typedef ros::Duration _period_stddev_type; + _period_stddev_type period_stddev; + typedef ros::Duration _period_max_type; + _period_max_type period_max; + typedef ros::Duration _stamp_age_mean_type; + _stamp_age_mean_type stamp_age_mean; + typedef ros::Duration _stamp_age_stddev_type; + _stamp_age_stddev_type stamp_age_stddev; + typedef ros::Duration _stamp_age_max_type; + _stamp_age_max_type stamp_age_max; + + TopicStatistics(): + topic(""), + node_pub(""), + node_sub(""), + window_start(), + window_stop(), + delivered_msgs(0), + dropped_msgs(0), + traffic(0), + period_mean(), + period_stddev(), + period_max(), + stamp_age_mean(), + stamp_age_stddev(), + stamp_age_max() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + uint32_t length_node_pub = strlen(this->node_pub); + varToArr(outbuffer + offset, length_node_pub); + offset += 4; + memcpy(outbuffer + offset, this->node_pub, length_node_pub); + offset += length_node_pub; + uint32_t length_node_sub = strlen(this->node_sub); + varToArr(outbuffer + offset, length_node_sub); + offset += 4; + memcpy(outbuffer + offset, this->node_sub, length_node_sub); + offset += length_node_sub; + *(outbuffer + offset + 0) = (this->window_start.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->window_start.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->window_start.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->window_start.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->window_start.sec); + *(outbuffer + offset + 0) = (this->window_start.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->window_start.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->window_start.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->window_start.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->window_start.nsec); + *(outbuffer + offset + 0) = (this->window_stop.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->window_stop.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->window_stop.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->window_stop.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->window_stop.sec); + *(outbuffer + offset + 0) = (this->window_stop.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->window_stop.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->window_stop.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->window_stop.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->window_stop.nsec); + union { + int32_t real; + uint32_t base; + } u_delivered_msgs; + u_delivered_msgs.real = this->delivered_msgs; + *(outbuffer + offset + 0) = (u_delivered_msgs.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_delivered_msgs.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_delivered_msgs.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_delivered_msgs.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->delivered_msgs); + union { + int32_t real; + uint32_t base; + } u_dropped_msgs; + u_dropped_msgs.real = this->dropped_msgs; + *(outbuffer + offset + 0) = (u_dropped_msgs.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_dropped_msgs.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_dropped_msgs.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_dropped_msgs.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->dropped_msgs); + union { + int32_t real; + uint32_t base; + } u_traffic; + u_traffic.real = this->traffic; + *(outbuffer + offset + 0) = (u_traffic.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_traffic.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_traffic.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_traffic.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->traffic); + *(outbuffer + offset + 0) = (this->period_mean.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->period_mean.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->period_mean.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->period_mean.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->period_mean.sec); + *(outbuffer + offset + 0) = (this->period_mean.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->period_mean.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->period_mean.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->period_mean.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->period_mean.nsec); + *(outbuffer + offset + 0) = (this->period_stddev.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->period_stddev.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->period_stddev.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->period_stddev.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->period_stddev.sec); + *(outbuffer + offset + 0) = (this->period_stddev.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->period_stddev.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->period_stddev.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->period_stddev.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->period_stddev.nsec); + *(outbuffer + offset + 0) = (this->period_max.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->period_max.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->period_max.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->period_max.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->period_max.sec); + *(outbuffer + offset + 0) = (this->period_max.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->period_max.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->period_max.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->period_max.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->period_max.nsec); + *(outbuffer + offset + 0) = (this->stamp_age_mean.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp_age_mean.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp_age_mean.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp_age_mean.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp_age_mean.sec); + *(outbuffer + offset + 0) = (this->stamp_age_mean.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp_age_mean.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp_age_mean.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp_age_mean.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp_age_mean.nsec); + *(outbuffer + offset + 0) = (this->stamp_age_stddev.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp_age_stddev.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp_age_stddev.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp_age_stddev.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp_age_stddev.sec); + *(outbuffer + offset + 0) = (this->stamp_age_stddev.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp_age_stddev.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp_age_stddev.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp_age_stddev.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp_age_stddev.nsec); + *(outbuffer + offset + 0) = (this->stamp_age_max.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp_age_max.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp_age_max.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp_age_max.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp_age_max.sec); + *(outbuffer + offset + 0) = (this->stamp_age_max.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp_age_max.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp_age_max.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp_age_max.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp_age_max.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + uint32_t length_node_pub; + arrToVar(length_node_pub, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_node_pub; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_node_pub-1]=0; + this->node_pub = (char *)(inbuffer + offset-1); + offset += length_node_pub; + uint32_t length_node_sub; + arrToVar(length_node_sub, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_node_sub; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_node_sub-1]=0; + this->node_sub = (char *)(inbuffer + offset-1); + offset += length_node_sub; + this->window_start.sec = ((uint32_t) (*(inbuffer + offset))); + this->window_start.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->window_start.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->window_start.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->window_start.sec); + this->window_start.nsec = ((uint32_t) (*(inbuffer + offset))); + this->window_start.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->window_start.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->window_start.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->window_start.nsec); + this->window_stop.sec = ((uint32_t) (*(inbuffer + offset))); + this->window_stop.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->window_stop.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->window_stop.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->window_stop.sec); + this->window_stop.nsec = ((uint32_t) (*(inbuffer + offset))); + this->window_stop.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->window_stop.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->window_stop.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->window_stop.nsec); + union { + int32_t real; + uint32_t base; + } u_delivered_msgs; + u_delivered_msgs.base = 0; + u_delivered_msgs.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_delivered_msgs.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_delivered_msgs.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_delivered_msgs.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->delivered_msgs = u_delivered_msgs.real; + offset += sizeof(this->delivered_msgs); + union { + int32_t real; + uint32_t base; + } u_dropped_msgs; + u_dropped_msgs.base = 0; + u_dropped_msgs.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_dropped_msgs.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_dropped_msgs.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_dropped_msgs.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->dropped_msgs = u_dropped_msgs.real; + offset += sizeof(this->dropped_msgs); + union { + int32_t real; + uint32_t base; + } u_traffic; + u_traffic.base = 0; + u_traffic.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_traffic.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_traffic.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_traffic.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->traffic = u_traffic.real; + offset += sizeof(this->traffic); + this->period_mean.sec = ((uint32_t) (*(inbuffer + offset))); + this->period_mean.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->period_mean.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->period_mean.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->period_mean.sec); + this->period_mean.nsec = ((uint32_t) (*(inbuffer + offset))); + this->period_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->period_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->period_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->period_mean.nsec); + this->period_stddev.sec = ((uint32_t) (*(inbuffer + offset))); + this->period_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->period_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->period_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->period_stddev.sec); + this->period_stddev.nsec = ((uint32_t) (*(inbuffer + offset))); + this->period_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->period_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->period_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->period_stddev.nsec); + this->period_max.sec = ((uint32_t) (*(inbuffer + offset))); + this->period_max.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->period_max.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->period_max.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->period_max.sec); + this->period_max.nsec = ((uint32_t) (*(inbuffer + offset))); + this->period_max.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->period_max.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->period_max.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->period_max.nsec); + this->stamp_age_mean.sec = ((uint32_t) (*(inbuffer + offset))); + this->stamp_age_mean.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp_age_mean.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp_age_mean.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp_age_mean.sec); + this->stamp_age_mean.nsec = ((uint32_t) (*(inbuffer + offset))); + this->stamp_age_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp_age_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp_age_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp_age_mean.nsec); + this->stamp_age_stddev.sec = ((uint32_t) (*(inbuffer + offset))); + this->stamp_age_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp_age_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp_age_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp_age_stddev.sec); + this->stamp_age_stddev.nsec = ((uint32_t) (*(inbuffer + offset))); + this->stamp_age_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp_age_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp_age_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp_age_stddev.nsec); + this->stamp_age_max.sec = ((uint32_t) (*(inbuffer + offset))); + this->stamp_age_max.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp_age_max.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp_age_max.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp_age_max.sec); + this->stamp_age_max.nsec = ((uint32_t) (*(inbuffer + offset))); + this->stamp_age_max.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp_age_max.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp_age_max.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp_age_max.nsec); + return offset; + } + + const char * getType(){ return "rosgraph_msgs/TopicStatistics"; }; + const char * getMD5(){ return "10152ed868c5097a5e2e4a89d7daa710"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rospy_tutorials/AddTwoInts.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rospy_tutorials/AddTwoInts.h new file mode 100644 index 0000000000000000000000000000000000000000..04dec98e8a895f29413a923b7f906c41ad5e66fa --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rospy_tutorials/AddTwoInts.h @@ -0,0 +1,166 @@ +#ifndef _ROS_SERVICE_AddTwoInts_h +#define _ROS_SERVICE_AddTwoInts_h +#include +#include +#include +#include "ros/msg.h" + +namespace rospy_tutorials +{ + +static const char ADDTWOINTS[] = "rospy_tutorials/AddTwoInts"; + + class AddTwoIntsRequest : public ros::Msg + { + public: + typedef int64_t _a_type; + _a_type a; + typedef int64_t _b_type; + _b_type b; + + AddTwoIntsRequest(): + 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 ADDTWOINTS; }; + const char * getMD5(){ return "36d09b846be0b371c5f190354dd3153e"; }; + + }; + + class AddTwoIntsResponse : public ros::Msg + { + public: + typedef int64_t _sum_type; + _sum_type sum; + + AddTwoIntsResponse(): + 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 ADDTWOINTS; }; + const char * getMD5(){ return "b88405221c77b1878a3cbbfff53428d7"; }; + + }; + + class AddTwoInts { + public: + typedef AddTwoIntsRequest Request; + typedef AddTwoIntsResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rospy_tutorials/BadTwoInts.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rospy_tutorials/BadTwoInts.h new file mode 100644 index 0000000000000000000000000000000000000000..0218f5495c586af59f4e2c28f315e255f2451f20 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rospy_tutorials/BadTwoInts.h @@ -0,0 +1,150 @@ +#ifndef _ROS_SERVICE_BadTwoInts_h +#define _ROS_SERVICE_BadTwoInts_h +#include +#include +#include +#include "ros/msg.h" + +namespace rospy_tutorials +{ + +static const char BADTWOINTS[] = "rospy_tutorials/BadTwoInts"; + + class BadTwoIntsRequest : public ros::Msg + { + public: + typedef int64_t _a_type; + _a_type a; + typedef int32_t _b_type; + _b_type b; + + BadTwoIntsRequest(): + 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 { + int32_t real; + uint32_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; + 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 { + int32_t real; + uint32_t base; + } u_b; + u_b.base = 0; + u_b.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_b.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_b.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_b.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->b = u_b.real; + offset += sizeof(this->b); + return offset; + } + + const char * getType(){ return BADTWOINTS; }; + const char * getMD5(){ return "29bb5c7dea8bf822f53e94b0ee5a3a56"; }; + + }; + + class BadTwoIntsResponse : public ros::Msg + { + public: + typedef int32_t _sum_type; + _sum_type sum; + + BadTwoIntsResponse(): + sum(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int32_t real; + uint32_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; + offset += sizeof(this->sum); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int32_t real; + uint32_t base; + } u_sum; + u_sum.base = 0; + u_sum.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_sum.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_sum.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_sum.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->sum = u_sum.real; + offset += sizeof(this->sum); + return offset; + } + + const char * getType(){ return BADTWOINTS; }; + const char * getMD5(){ return "0ba699c25c9418c0366f3595c0c8e8ec"; }; + + }; + + class BadTwoInts { + public: + typedef BadTwoIntsRequest Request; + typedef BadTwoIntsResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rospy_tutorials/Floats.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rospy_tutorials/Floats.h new file mode 100644 index 0000000000000000000000000000000000000000..c0d284cbcac9b8273fc6ee332a9c4a41d716ad77 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rospy_tutorials/Floats.h @@ -0,0 +1,82 @@ +#ifndef _ROS_rospy_tutorials_Floats_h +#define _ROS_rospy_tutorials_Floats_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rospy_tutorials +{ + + class Floats : public ros::Msg + { + public: + uint32_t data_length; + typedef float _data_type; + _data_type st_data; + _data_type * data; + + Floats(): + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + float real; + uint32_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_datai.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_datai.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_datai.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (float*)realloc(this->data, data_lengthT * sizeof(float)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + float real; + uint32_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(float)); + } + return offset; + } + + const char * getType(){ return "rospy_tutorials/Floats"; }; + const char * getMD5(){ return "420cd38b6b071cd49f2970c3e2cee511"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rospy_tutorials/HeaderString.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rospy_tutorials/HeaderString.h new file mode 100644 index 0000000000000000000000000000000000000000..9fac4ef37291651ef6bb05c4b1f07cd77f9a5825 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rospy_tutorials/HeaderString.h @@ -0,0 +1,61 @@ +#ifndef _ROS_rospy_tutorials_HeaderString_h +#define _ROS_rospy_tutorials_HeaderString_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace rospy_tutorials +{ + + class HeaderString : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _data_type; + _data_type data; + + HeaderString(): + header(), + data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_data = strlen(this->data); + varToArr(outbuffer + offset, length_data); + offset += 4; + memcpy(outbuffer + offset, this->data, length_data); + offset += length_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_data; + arrToVar(length_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data-1]=0; + this->data = (char *)(inbuffer + offset-1); + offset += length_data; + return offset; + } + + const char * getType(){ return "rospy_tutorials/HeaderString"; }; + const char * getMD5(){ return "c99a9440709e4d4a9716d55b8270d5e7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_arduino/Adc.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_arduino/Adc.h new file mode 100644 index 0000000000000000000000000000000000000000..ac48677904be7de9b5f1eca577b9f3252fa45b6d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_arduino/Adc.h @@ -0,0 +1,92 @@ +#ifndef _ROS_rosserial_arduino_Adc_h +#define _ROS_rosserial_arduino_Adc_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rosserial_arduino +{ + + class Adc : public ros::Msg + { + public: + typedef uint16_t _adc0_type; + _adc0_type adc0; + typedef uint16_t _adc1_type; + _adc1_type adc1; + typedef uint16_t _adc2_type; + _adc2_type adc2; + typedef uint16_t _adc3_type; + _adc3_type adc3; + typedef uint16_t _adc4_type; + _adc4_type adc4; + typedef uint16_t _adc5_type; + _adc5_type adc5; + + Adc(): + adc0(0), + adc1(0), + adc2(0), + adc3(0), + adc4(0), + adc5(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->adc0 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc0 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc0); + *(outbuffer + offset + 0) = (this->adc1 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc1 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc1); + *(outbuffer + offset + 0) = (this->adc2 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc2 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc2); + *(outbuffer + offset + 0) = (this->adc3 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc3 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc3); + *(outbuffer + offset + 0) = (this->adc4 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc4 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc4); + *(outbuffer + offset + 0) = (this->adc5 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc5 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc5); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->adc0 = ((uint16_t) (*(inbuffer + offset))); + this->adc0 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc0); + this->adc1 = ((uint16_t) (*(inbuffer + offset))); + this->adc1 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc1); + this->adc2 = ((uint16_t) (*(inbuffer + offset))); + this->adc2 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc2); + this->adc3 = ((uint16_t) (*(inbuffer + offset))); + this->adc3 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc3); + this->adc4 = ((uint16_t) (*(inbuffer + offset))); + this->adc4 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc4); + this->adc5 = ((uint16_t) (*(inbuffer + offset))); + this->adc5 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc5); + return offset; + } + + const char * getType(){ return "rosserial_arduino/Adc"; }; + const char * getMD5(){ return "6d7853a614e2e821319068311f2af25b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_arduino/Test.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_arduino/Test.h new file mode 100644 index 0000000000000000000000000000000000000000..cd806db905309e7ab4aaba03279d8b625ab84514 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_arduino/Test.h @@ -0,0 +1,104 @@ +#ifndef _ROS_SERVICE_Test_h +#define _ROS_SERVICE_Test_h +#include +#include +#include +#include "ros/msg.h" + +namespace rosserial_arduino +{ + +static const char TEST[] = "rosserial_arduino/Test"; + + class TestRequest : public ros::Msg + { + public: + typedef const char* _input_type; + _input_type input; + + TestRequest(): + input("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_input = strlen(this->input); + varToArr(outbuffer + offset, length_input); + offset += 4; + memcpy(outbuffer + offset, this->input, length_input); + offset += length_input; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_input; + arrToVar(length_input, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_input; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_input-1]=0; + this->input = (char *)(inbuffer + offset-1); + offset += length_input; + return offset; + } + + const char * getType(){ return TEST; }; + const char * getMD5(){ return "39e92f1778057359c64c7b8a7d7b19de"; }; + + }; + + class TestResponse : public ros::Msg + { + public: + typedef const char* _output_type; + _output_type output; + + TestResponse(): + output("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_output = strlen(this->output); + varToArr(outbuffer + offset, length_output); + offset += 4; + memcpy(outbuffer + offset, this->output, length_output); + offset += length_output; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_output; + arrToVar(length_output, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_output; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_output-1]=0; + this->output = (char *)(inbuffer + offset-1); + offset += length_output; + return offset; + } + + const char * getType(){ return TEST; }; + const char * getMD5(){ return "0825d95fdfa2c8f4bbb4e9c74bccd3fd"; }; + + }; + + class Test { + public: + typedef TestRequest Request; + typedef TestResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_mbed/Adc.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_mbed/Adc.h new file mode 100644 index 0000000000000000000000000000000000000000..0de6480b705aba28fbb63d1043e77956188642d1 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_mbed/Adc.h @@ -0,0 +1,92 @@ +#ifndef _ROS_rosserial_mbed_Adc_h +#define _ROS_rosserial_mbed_Adc_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rosserial_mbed +{ + + class Adc : public ros::Msg + { + public: + typedef uint16_t _adc0_type; + _adc0_type adc0; + typedef uint16_t _adc1_type; + _adc1_type adc1; + typedef uint16_t _adc2_type; + _adc2_type adc2; + typedef uint16_t _adc3_type; + _adc3_type adc3; + typedef uint16_t _adc4_type; + _adc4_type adc4; + typedef uint16_t _adc5_type; + _adc5_type adc5; + + Adc(): + adc0(0), + adc1(0), + adc2(0), + adc3(0), + adc4(0), + adc5(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->adc0 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc0 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc0); + *(outbuffer + offset + 0) = (this->adc1 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc1 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc1); + *(outbuffer + offset + 0) = (this->adc2 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc2 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc2); + *(outbuffer + offset + 0) = (this->adc3 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc3 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc3); + *(outbuffer + offset + 0) = (this->adc4 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc4 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc4); + *(outbuffer + offset + 0) = (this->adc5 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc5 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc5); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->adc0 = ((uint16_t) (*(inbuffer + offset))); + this->adc0 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc0); + this->adc1 = ((uint16_t) (*(inbuffer + offset))); + this->adc1 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc1); + this->adc2 = ((uint16_t) (*(inbuffer + offset))); + this->adc2 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc2); + this->adc3 = ((uint16_t) (*(inbuffer + offset))); + this->adc3 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc3); + this->adc4 = ((uint16_t) (*(inbuffer + offset))); + this->adc4 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc4); + this->adc5 = ((uint16_t) (*(inbuffer + offset))); + this->adc5 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc5); + return offset; + } + + const char * getType(){ return "rosserial_mbed/Adc"; }; + const char * getMD5(){ return "6d7853a614e2e821319068311f2af25b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_mbed/Test.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_mbed/Test.h new file mode 100644 index 0000000000000000000000000000000000000000..6a2658fad5970c71bfe524bf281e9de27c96fcb3 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_mbed/Test.h @@ -0,0 +1,104 @@ +#ifndef _ROS_SERVICE_Test_h +#define _ROS_SERVICE_Test_h +#include +#include +#include +#include "ros/msg.h" + +namespace rosserial_mbed +{ + +static const char TEST[] = "rosserial_mbed/Test"; + + class TestRequest : public ros::Msg + { + public: + typedef const char* _input_type; + _input_type input; + + TestRequest(): + input("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_input = strlen(this->input); + varToArr(outbuffer + offset, length_input); + offset += 4; + memcpy(outbuffer + offset, this->input, length_input); + offset += length_input; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_input; + arrToVar(length_input, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_input; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_input-1]=0; + this->input = (char *)(inbuffer + offset-1); + offset += length_input; + return offset; + } + + const char * getType(){ return TEST; }; + const char * getMD5(){ return "39e92f1778057359c64c7b8a7d7b19de"; }; + + }; + + class TestResponse : public ros::Msg + { + public: + typedef const char* _output_type; + _output_type output; + + TestResponse(): + output("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_output = strlen(this->output); + varToArr(outbuffer + offset, length_output); + offset += 4; + memcpy(outbuffer + offset, this->output, length_output); + offset += length_output; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_output; + arrToVar(length_output, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_output; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_output-1]=0; + this->output = (char *)(inbuffer + offset-1); + offset += length_output; + return offset; + } + + const char * getType(){ return TEST; }; + const char * getMD5(){ return "0825d95fdfa2c8f4bbb4e9c74bccd3fd"; }; + + }; + + class Test { + public: + typedef TestRequest Request; + typedef TestResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_msgs/Log.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_msgs/Log.h new file mode 100644 index 0000000000000000000000000000000000000000..a162ca8e5e1cfa559c69fe29dc61a2b62a58b813 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_msgs/Log.h @@ -0,0 +1,67 @@ +#ifndef _ROS_rosserial_msgs_Log_h +#define _ROS_rosserial_msgs_Log_h + +#include +#include +#include +#include "../ros/msg.h" + +namespace rosserial_msgs +{ + + class Log : public ros::Msg + { + public: + typedef uint8_t _level_type; + _level_type level; + typedef const char* _msg_type; + _msg_type msg; + enum { ROSDEBUG = 0 }; + enum { INFO = 1 }; + enum { WARN = 2 }; + enum { ERROR = 3 }; + enum { FATAL = 4 }; + + Log(): + level(0), + msg("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->level >> (8 * 0)) & 0xFF; + offset += sizeof(this->level); + uint32_t length_msg = strlen(this->msg); + varToArr(outbuffer + offset, length_msg); + offset += 4; + memcpy(outbuffer + offset, this->msg, length_msg); + offset += length_msg; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->level = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->level); + uint32_t length_msg; + arrToVar(length_msg, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_msg; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_msg-1]=0; + this->msg = (char *)(inbuffer + offset-1); + offset += length_msg; + return offset; + } + + const char * getType(){ return "rosserial_msgs/Log"; }; + const char * getMD5(){ return "11abd731c25933261cd6183bd12d6295"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_msgs/RequestMessageInfo.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_msgs/RequestMessageInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..3466ddc463df63b573ca65efdaf125b5d40429ec --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_msgs/RequestMessageInfo.h @@ -0,0 +1,121 @@ +#ifndef _ROS_SERVICE_RequestMessageInfo_h +#define _ROS_SERVICE_RequestMessageInfo_h +#include +#include +#include +#include "ros/msg.h" + +namespace rosserial_msgs +{ + +static const char REQUESTMESSAGEINFO[] = "rosserial_msgs/RequestMessageInfo"; + + class RequestMessageInfoRequest : public ros::Msg + { + public: + typedef const char* _type_type; + _type_type type; + + RequestMessageInfoRequest(): + type("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_type = strlen(this->type); + varToArr(outbuffer + offset, length_type); + offset += 4; + memcpy(outbuffer + offset, this->type, length_type); + offset += length_type; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_type; + arrToVar(length_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type-1]=0; + this->type = (char *)(inbuffer + offset-1); + offset += length_type; + return offset; + } + + const char * getType(){ return REQUESTMESSAGEINFO; }; + const char * getMD5(){ return "dc67331de85cf97091b7d45e5c64ab75"; }; + + }; + + class RequestMessageInfoResponse : public ros::Msg + { + public: + typedef const char* _md5_type; + _md5_type md5; + typedef const char* _definition_type; + _definition_type definition; + + RequestMessageInfoResponse(): + md5(""), + definition("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_md5 = strlen(this->md5); + varToArr(outbuffer + offset, length_md5); + offset += 4; + memcpy(outbuffer + offset, this->md5, length_md5); + offset += length_md5; + uint32_t length_definition = strlen(this->definition); + varToArr(outbuffer + offset, length_definition); + offset += 4; + memcpy(outbuffer + offset, this->definition, length_definition); + offset += length_definition; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_md5; + arrToVar(length_md5, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_md5; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_md5-1]=0; + this->md5 = (char *)(inbuffer + offset-1); + offset += length_md5; + uint32_t length_definition; + arrToVar(length_definition, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_definition; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_definition-1]=0; + this->definition = (char *)(inbuffer + offset-1); + offset += length_definition; + return offset; + } + + const char * getType(){ return REQUESTMESSAGEINFO; }; + const char * getMD5(){ return "fe452186a069bed40f09b8628fe5eac8"; }; + + }; + + class RequestMessageInfo { + public: + typedef RequestMessageInfoRequest Request; + typedef RequestMessageInfoResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_msgs/RequestParam.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_msgs/RequestParam.h new file mode 100644 index 0000000000000000000000000000000000000000..aaecd13d17f3d223d13e8cfe9180abbeed995712 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_msgs/RequestParam.h @@ -0,0 +1,212 @@ +#ifndef _ROS_SERVICE_RequestParam_h +#define _ROS_SERVICE_RequestParam_h +#include +#include +#include +#include "../ros/msg.h" + +namespace rosserial_msgs +{ + +static const char REQUESTPARAM[] = "rosserial_msgs/RequestParam"; + + class RequestParamRequest : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + + RequestParamRequest(): + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return REQUESTPARAM; }; + const char * getMD5(){ return "c1f3d28f1b044c871e6eff2e9fc3c667"; }; + + }; + + class RequestParamResponse : public ros::Msg + { + public: + uint32_t ints_length; + typedef int32_t _ints_type; + _ints_type st_ints; + _ints_type * ints; + uint32_t floats_length; + typedef float _floats_type; + _floats_type st_floats; + _floats_type * floats; + uint32_t strings_length; + typedef char* _strings_type; + _strings_type st_strings; + _strings_type * strings; + + RequestParamResponse(): + ints_length(0), ints(NULL), + floats_length(0), floats(NULL), + strings_length(0), strings(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->ints_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->ints_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->ints_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->ints_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->ints_length); + for( uint32_t i = 0; i < ints_length; i++){ + union { + int32_t real; + uint32_t base; + } u_intsi; + u_intsi.real = this->ints[i]; + *(outbuffer + offset + 0) = (u_intsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_intsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_intsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_intsi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->ints[i]); + } + *(outbuffer + offset + 0) = (this->floats_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->floats_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->floats_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->floats_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->floats_length); + for( uint32_t i = 0; i < floats_length; i++){ + union { + float real; + uint32_t base; + } u_floatsi; + u_floatsi.real = this->floats[i]; + *(outbuffer + offset + 0) = (u_floatsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_floatsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_floatsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_floatsi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->floats[i]); + } + *(outbuffer + offset + 0) = (this->strings_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->strings_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->strings_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->strings_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->strings_length); + for( uint32_t i = 0; i < strings_length; i++){ + uint32_t length_stringsi = strlen(this->strings[i]); + varToArr(outbuffer + offset, length_stringsi); + offset += 4; + memcpy(outbuffer + offset, this->strings[i], length_stringsi); + offset += length_stringsi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t ints_lengthT = ((uint32_t) (*(inbuffer + offset))); + ints_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + ints_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + ints_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->ints_length); + if(ints_lengthT > ints_length) + this->ints = (int32_t*)realloc(this->ints, ints_lengthT * sizeof(int32_t)); + ints_length = ints_lengthT; + for( uint32_t i = 0; i < ints_length; i++){ + union { + int32_t real; + uint32_t base; + } u_st_ints; + u_st_ints.base = 0; + u_st_ints.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_ints.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_ints.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_ints.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_ints = u_st_ints.real; + offset += sizeof(this->st_ints); + memcpy( &(this->ints[i]), &(this->st_ints), sizeof(int32_t)); + } + uint32_t floats_lengthT = ((uint32_t) (*(inbuffer + offset))); + floats_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + floats_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + floats_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->floats_length); + if(floats_lengthT > floats_length) + this->floats = (float*)realloc(this->floats, floats_lengthT * sizeof(float)); + floats_length = floats_lengthT; + for( uint32_t i = 0; i < floats_length; i++){ + union { + float real; + uint32_t base; + } u_st_floats; + u_st_floats.base = 0; + u_st_floats.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_floats.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_floats.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_floats.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_floats = u_st_floats.real; + offset += sizeof(this->st_floats); + memcpy( &(this->floats[i]), &(this->st_floats), sizeof(float)); + } + uint32_t strings_lengthT = ((uint32_t) (*(inbuffer + offset))); + strings_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + strings_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + strings_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->strings_length); + if(strings_lengthT > strings_length) + this->strings = (char**)realloc(this->strings, strings_lengthT * sizeof(char*)); + strings_length = strings_lengthT; + for( uint32_t i = 0; i < strings_length; i++){ + uint32_t length_st_strings; + arrToVar(length_st_strings, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_strings; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_strings-1]=0; + this->st_strings = (char *)(inbuffer + offset-1); + offset += length_st_strings; + memcpy( &(this->strings[i]), &(this->st_strings), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return REQUESTPARAM; }; + const char * getMD5(){ return "9f0e98bda65981986ddf53afa7a40e49"; }; + + }; + + class RequestParam { + public: + typedef RequestParamRequest Request; + typedef RequestParamResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_msgs/RequestServiceInfo.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_msgs/RequestServiceInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..b18cf9dbf7303c65a387a0ac622708bc054f96fc --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_msgs/RequestServiceInfo.h @@ -0,0 +1,138 @@ +#ifndef _ROS_SERVICE_RequestServiceInfo_h +#define _ROS_SERVICE_RequestServiceInfo_h +#include +#include +#include +#include "ros/msg.h" + +namespace rosserial_msgs +{ + +static const char REQUESTSERVICEINFO[] = "rosserial_msgs/RequestServiceInfo"; + + class RequestServiceInfoRequest : public ros::Msg + { + public: + typedef const char* _service_type; + _service_type service; + + RequestServiceInfoRequest(): + service("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_service = strlen(this->service); + varToArr(outbuffer + offset, length_service); + offset += 4; + memcpy(outbuffer + offset, this->service, length_service); + offset += length_service; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_service; + arrToVar(length_service, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_service; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_service-1]=0; + this->service = (char *)(inbuffer + offset-1); + offset += length_service; + return offset; + } + + const char * getType(){ return REQUESTSERVICEINFO; }; + const char * getMD5(){ return "1cbcfa13b08f6d36710b9af8741e6112"; }; + + }; + + class RequestServiceInfoResponse : public ros::Msg + { + public: + typedef const char* _service_md5_type; + _service_md5_type service_md5; + typedef const char* _request_md5_type; + _request_md5_type request_md5; + typedef const char* _response_md5_type; + _response_md5_type response_md5; + + RequestServiceInfoResponse(): + service_md5(""), + request_md5(""), + response_md5("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_service_md5 = strlen(this->service_md5); + varToArr(outbuffer + offset, length_service_md5); + offset += 4; + memcpy(outbuffer + offset, this->service_md5, length_service_md5); + offset += length_service_md5; + uint32_t length_request_md5 = strlen(this->request_md5); + varToArr(outbuffer + offset, length_request_md5); + offset += 4; + memcpy(outbuffer + offset, this->request_md5, length_request_md5); + offset += length_request_md5; + uint32_t length_response_md5 = strlen(this->response_md5); + varToArr(outbuffer + offset, length_response_md5); + offset += 4; + memcpy(outbuffer + offset, this->response_md5, length_response_md5); + offset += length_response_md5; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_service_md5; + arrToVar(length_service_md5, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_service_md5; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_service_md5-1]=0; + this->service_md5 = (char *)(inbuffer + offset-1); + offset += length_service_md5; + uint32_t length_request_md5; + arrToVar(length_request_md5, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_request_md5; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_request_md5-1]=0; + this->request_md5 = (char *)(inbuffer + offset-1); + offset += length_request_md5; + uint32_t length_response_md5; + arrToVar(length_response_md5, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_response_md5; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_response_md5-1]=0; + this->response_md5 = (char *)(inbuffer + offset-1); + offset += length_response_md5; + return offset; + } + + const char * getType(){ return REQUESTSERVICEINFO; }; + const char * getMD5(){ return "c3d6dd25b909596479fbbc6559fa6874"; }; + + }; + + class RequestServiceInfo { + public: + typedef RequestServiceInfoRequest Request; + typedef RequestServiceInfoResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_msgs/TopicInfo.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_msgs/TopicInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..987c16105223e25ff1c371cf5eb2c8f76ec6093d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/rosserial_msgs/TopicInfo.h @@ -0,0 +1,130 @@ +#ifndef _ROS_rosserial_msgs_TopicInfo_h +#define _ROS_rosserial_msgs_TopicInfo_h + +#include +#include +#include +#include "../ros/msg.h" + +namespace rosserial_msgs +{ + + class TopicInfo : public ros::Msg + { + public: + typedef uint16_t _topic_id_type; + _topic_id_type topic_id; + typedef const char* _topic_name_type; + _topic_name_type topic_name; + typedef const char* _message_type_type; + _message_type_type message_type; + typedef const char* _md5sum_type; + _md5sum_type md5sum; + typedef int32_t _buffer_size_type; + _buffer_size_type buffer_size; + enum { ID_PUBLISHER = 0 }; + enum { ID_SUBSCRIBER = 1 }; + enum { ID_SERVICE_SERVER = 2 }; + enum { ID_SERVICE_CLIENT = 4 }; + enum { ID_PARAMETER_REQUEST = 6 }; + enum { ID_LOG = 7 }; + enum { ID_TIME = 10 }; + enum { ID_TX_STOP = 11 }; + + TopicInfo(): + topic_id(0), + topic_name(""), + message_type(""), + md5sum(""), + buffer_size(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->topic_id >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->topic_id >> (8 * 1)) & 0xFF; + offset += sizeof(this->topic_id); + uint32_t length_topic_name = strlen(this->topic_name); + varToArr(outbuffer + offset, length_topic_name); + offset += 4; + memcpy(outbuffer + offset, this->topic_name, length_topic_name); + offset += length_topic_name; + uint32_t length_message_type = strlen(this->message_type); + varToArr(outbuffer + offset, length_message_type); + offset += 4; + memcpy(outbuffer + offset, this->message_type, length_message_type); + offset += length_message_type; + uint32_t length_md5sum = strlen(this->md5sum); + varToArr(outbuffer + offset, length_md5sum); + offset += 4; + memcpy(outbuffer + offset, this->md5sum, length_md5sum); + offset += length_md5sum; + union { + int32_t real; + uint32_t base; + } u_buffer_size; + u_buffer_size.real = this->buffer_size; + *(outbuffer + offset + 0) = (u_buffer_size.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_buffer_size.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_buffer_size.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_buffer_size.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->buffer_size); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->topic_id = ((uint16_t) (*(inbuffer + offset))); + this->topic_id |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->topic_id); + uint32_t length_topic_name; + arrToVar(length_topic_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic_name-1]=0; + this->topic_name = (char *)(inbuffer + offset-1); + offset += length_topic_name; + uint32_t length_message_type; + arrToVar(length_message_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message_type-1]=0; + this->message_type = (char *)(inbuffer + offset-1); + offset += length_message_type; + uint32_t length_md5sum; + arrToVar(length_md5sum, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_md5sum; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_md5sum-1]=0; + this->md5sum = (char *)(inbuffer + offset-1); + offset += length_md5sum; + union { + int32_t real; + uint32_t base; + } u_buffer_size; + u_buffer_size.base = 0; + u_buffer_size.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_buffer_size.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_buffer_size.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_buffer_size.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->buffer_size = u_buffer_size.real; + offset += sizeof(this->buffer_size); + return offset; + } + + const char * getType(){ return "rosserial_msgs/TopicInfo"; }; + const char * getMD5(){ return "0ad51f88fc44892f8c10684077646005"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/BatteryState.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/BatteryState.h new file mode 100644 index 0000000000000000000000000000000000000000..4e9cba443efd4e2644114d45c9de7a31f4e13d0d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/BatteryState.h @@ -0,0 +1,326 @@ +#ifndef _ROS_sensor_msgs_BatteryState_h +#define _ROS_sensor_msgs_BatteryState_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class BatteryState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef float _voltage_type; + _voltage_type voltage; + typedef float _current_type; + _current_type current; + typedef float _charge_type; + _charge_type charge; + typedef float _capacity_type; + _capacity_type capacity; + typedef float _design_capacity_type; + _design_capacity_type design_capacity; + typedef float _percentage_type; + _percentage_type percentage; + typedef uint8_t _power_supply_status_type; + _power_supply_status_type power_supply_status; + typedef uint8_t _power_supply_health_type; + _power_supply_health_type power_supply_health; + typedef uint8_t _power_supply_technology_type; + _power_supply_technology_type power_supply_technology; + typedef bool _present_type; + _present_type present; + uint32_t cell_voltage_length; + typedef float _cell_voltage_type; + _cell_voltage_type st_cell_voltage; + _cell_voltage_type * cell_voltage; + typedef const char* _location_type; + _location_type location; + typedef const char* _serial_number_type; + _serial_number_type serial_number; + enum { POWER_SUPPLY_STATUS_UNKNOWN = 0 }; + enum { POWER_SUPPLY_STATUS_CHARGING = 1 }; + enum { POWER_SUPPLY_STATUS_DISCHARGING = 2 }; + enum { POWER_SUPPLY_STATUS_NOT_CHARGING = 3 }; + enum { POWER_SUPPLY_STATUS_FULL = 4 }; + enum { POWER_SUPPLY_HEALTH_UNKNOWN = 0 }; + enum { POWER_SUPPLY_HEALTH_GOOD = 1 }; + enum { POWER_SUPPLY_HEALTH_OVERHEAT = 2 }; + enum { POWER_SUPPLY_HEALTH_DEAD = 3 }; + enum { POWER_SUPPLY_HEALTH_OVERVOLTAGE = 4 }; + enum { POWER_SUPPLY_HEALTH_UNSPEC_FAILURE = 5 }; + enum { POWER_SUPPLY_HEALTH_COLD = 6 }; + enum { POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE = 7 }; + enum { POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE = 8 }; + enum { POWER_SUPPLY_TECHNOLOGY_UNKNOWN = 0 }; + enum { POWER_SUPPLY_TECHNOLOGY_NIMH = 1 }; + enum { POWER_SUPPLY_TECHNOLOGY_LION = 2 }; + enum { POWER_SUPPLY_TECHNOLOGY_LIPO = 3 }; + enum { POWER_SUPPLY_TECHNOLOGY_LIFE = 4 }; + enum { POWER_SUPPLY_TECHNOLOGY_NICD = 5 }; + enum { POWER_SUPPLY_TECHNOLOGY_LIMN = 6 }; + + BatteryState(): + header(), + voltage(0), + current(0), + charge(0), + capacity(0), + design_capacity(0), + percentage(0), + power_supply_status(0), + power_supply_health(0), + power_supply_technology(0), + present(0), + cell_voltage_length(0), cell_voltage(NULL), + location(""), + serial_number("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_voltage; + u_voltage.real = this->voltage; + *(outbuffer + offset + 0) = (u_voltage.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_voltage.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_voltage.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_voltage.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->voltage); + union { + float real; + uint32_t base; + } u_current; + u_current.real = this->current; + *(outbuffer + offset + 0) = (u_current.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_current.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_current.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_current.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->current); + union { + float real; + uint32_t base; + } u_charge; + u_charge.real = this->charge; + *(outbuffer + offset + 0) = (u_charge.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_charge.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_charge.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_charge.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->charge); + union { + float real; + uint32_t base; + } u_capacity; + u_capacity.real = this->capacity; + *(outbuffer + offset + 0) = (u_capacity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_capacity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_capacity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_capacity.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->capacity); + union { + float real; + uint32_t base; + } u_design_capacity; + u_design_capacity.real = this->design_capacity; + *(outbuffer + offset + 0) = (u_design_capacity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_design_capacity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_design_capacity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_design_capacity.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->design_capacity); + union { + float real; + uint32_t base; + } u_percentage; + u_percentage.real = this->percentage; + *(outbuffer + offset + 0) = (u_percentage.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_percentage.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_percentage.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_percentage.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->percentage); + *(outbuffer + offset + 0) = (this->power_supply_status >> (8 * 0)) & 0xFF; + offset += sizeof(this->power_supply_status); + *(outbuffer + offset + 0) = (this->power_supply_health >> (8 * 0)) & 0xFF; + offset += sizeof(this->power_supply_health); + *(outbuffer + offset + 0) = (this->power_supply_technology >> (8 * 0)) & 0xFF; + offset += sizeof(this->power_supply_technology); + union { + bool real; + uint8_t base; + } u_present; + u_present.real = this->present; + *(outbuffer + offset + 0) = (u_present.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->present); + *(outbuffer + offset + 0) = (this->cell_voltage_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->cell_voltage_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->cell_voltage_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->cell_voltage_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->cell_voltage_length); + for( uint32_t i = 0; i < cell_voltage_length; i++){ + union { + float real; + uint32_t base; + } u_cell_voltagei; + u_cell_voltagei.real = this->cell_voltage[i]; + *(outbuffer + offset + 0) = (u_cell_voltagei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_cell_voltagei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_cell_voltagei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_cell_voltagei.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->cell_voltage[i]); + } + uint32_t length_location = strlen(this->location); + varToArr(outbuffer + offset, length_location); + offset += 4; + memcpy(outbuffer + offset, this->location, length_location); + offset += length_location; + uint32_t length_serial_number = strlen(this->serial_number); + varToArr(outbuffer + offset, length_serial_number); + offset += 4; + memcpy(outbuffer + offset, this->serial_number, length_serial_number); + offset += length_serial_number; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_voltage; + u_voltage.base = 0; + u_voltage.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_voltage.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_voltage.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_voltage.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->voltage = u_voltage.real; + offset += sizeof(this->voltage); + union { + float real; + uint32_t base; + } u_current; + u_current.base = 0; + u_current.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_current.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_current.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_current.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->current = u_current.real; + offset += sizeof(this->current); + union { + float real; + uint32_t base; + } u_charge; + u_charge.base = 0; + u_charge.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_charge.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_charge.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_charge.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->charge = u_charge.real; + offset += sizeof(this->charge); + union { + float real; + uint32_t base; + } u_capacity; + u_capacity.base = 0; + u_capacity.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_capacity.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_capacity.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_capacity.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->capacity = u_capacity.real; + offset += sizeof(this->capacity); + union { + float real; + uint32_t base; + } u_design_capacity; + u_design_capacity.base = 0; + u_design_capacity.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_design_capacity.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_design_capacity.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_design_capacity.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->design_capacity = u_design_capacity.real; + offset += sizeof(this->design_capacity); + union { + float real; + uint32_t base; + } u_percentage; + u_percentage.base = 0; + u_percentage.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_percentage.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_percentage.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_percentage.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->percentage = u_percentage.real; + offset += sizeof(this->percentage); + this->power_supply_status = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->power_supply_status); + this->power_supply_health = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->power_supply_health); + this->power_supply_technology = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->power_supply_technology); + union { + bool real; + uint8_t base; + } u_present; + u_present.base = 0; + u_present.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->present = u_present.real; + offset += sizeof(this->present); + uint32_t cell_voltage_lengthT = ((uint32_t) (*(inbuffer + offset))); + cell_voltage_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + cell_voltage_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + cell_voltage_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->cell_voltage_length); + if(cell_voltage_lengthT > cell_voltage_length) + this->cell_voltage = (float*)realloc(this->cell_voltage, cell_voltage_lengthT * sizeof(float)); + cell_voltage_length = cell_voltage_lengthT; + for( uint32_t i = 0; i < cell_voltage_length; i++){ + union { + float real; + uint32_t base; + } u_st_cell_voltage; + u_st_cell_voltage.base = 0; + u_st_cell_voltage.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_cell_voltage.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_cell_voltage.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_cell_voltage.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_cell_voltage = u_st_cell_voltage.real; + offset += sizeof(this->st_cell_voltage); + memcpy( &(this->cell_voltage[i]), &(this->st_cell_voltage), sizeof(float)); + } + uint32_t length_location; + arrToVar(length_location, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_location; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_location-1]=0; + this->location = (char *)(inbuffer + offset-1); + offset += length_location; + uint32_t length_serial_number; + arrToVar(length_serial_number, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_serial_number; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_serial_number-1]=0; + this->serial_number = (char *)(inbuffer + offset-1); + offset += length_serial_number; + return offset; + } + + const char * getType(){ return "sensor_msgs/BatteryState"; }; + const char * getMD5(){ return "476f837fa6771f6e16e3bf4ef96f8770"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/CameraInfo.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/CameraInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..5bd1c7d0f7009f851b0d92fa837752575de5c78d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/CameraInfo.h @@ -0,0 +1,276 @@ +#ifndef _ROS_sensor_msgs_CameraInfo_h +#define _ROS_sensor_msgs_CameraInfo_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/RegionOfInterest.h" + +namespace sensor_msgs +{ + + class CameraInfo : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef uint32_t _height_type; + _height_type height; + typedef uint32_t _width_type; + _width_type width; + typedef const char* _distortion_model_type; + _distortion_model_type distortion_model; + uint32_t D_length; + typedef double _D_type; + _D_type st_D; + _D_type * D; + double K[9]; + double R[9]; + double P[12]; + typedef uint32_t _binning_x_type; + _binning_x_type binning_x; + typedef uint32_t _binning_y_type; + _binning_y_type binning_y; + typedef sensor_msgs::RegionOfInterest _roi_type; + _roi_type roi; + + CameraInfo(): + header(), + height(0), + width(0), + distortion_model(""), + D_length(0), D(NULL), + K(), + R(), + P(), + binning_x(0), + binning_y(0), + roi() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF; + offset += sizeof(this->height); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF; + offset += sizeof(this->width); + uint32_t length_distortion_model = strlen(this->distortion_model); + varToArr(outbuffer + offset, length_distortion_model); + offset += 4; + memcpy(outbuffer + offset, this->distortion_model, length_distortion_model); + offset += length_distortion_model; + *(outbuffer + offset + 0) = (this->D_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->D_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->D_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->D_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->D_length); + for( uint32_t i = 0; i < D_length; i++){ + union { + double real; + uint64_t base; + } u_Di; + u_Di.real = this->D[i]; + *(outbuffer + offset + 0) = (u_Di.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_Di.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_Di.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_Di.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_Di.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_Di.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_Di.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_Di.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->D[i]); + } + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_Ki; + u_Ki.real = this->K[i]; + *(outbuffer + offset + 0) = (u_Ki.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_Ki.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_Ki.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_Ki.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_Ki.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_Ki.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_Ki.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_Ki.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->K[i]); + } + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_Ri; + u_Ri.real = this->R[i]; + *(outbuffer + offset + 0) = (u_Ri.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_Ri.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_Ri.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_Ri.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_Ri.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_Ri.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_Ri.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_Ri.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->R[i]); + } + for( uint32_t i = 0; i < 12; i++){ + union { + double real; + uint64_t base; + } u_Pi; + u_Pi.real = this->P[i]; + *(outbuffer + offset + 0) = (u_Pi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_Pi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_Pi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_Pi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_Pi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_Pi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_Pi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_Pi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->P[i]); + } + *(outbuffer + offset + 0) = (this->binning_x >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->binning_x >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->binning_x >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->binning_x >> (8 * 3)) & 0xFF; + offset += sizeof(this->binning_x); + *(outbuffer + offset + 0) = (this->binning_y >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->binning_y >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->binning_y >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->binning_y >> (8 * 3)) & 0xFF; + offset += sizeof(this->binning_y); + offset += this->roi.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->height = ((uint32_t) (*(inbuffer + offset))); + this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->height); + this->width = ((uint32_t) (*(inbuffer + offset))); + this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->width); + uint32_t length_distortion_model; + arrToVar(length_distortion_model, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_distortion_model; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_distortion_model-1]=0; + this->distortion_model = (char *)(inbuffer + offset-1); + offset += length_distortion_model; + uint32_t D_lengthT = ((uint32_t) (*(inbuffer + offset))); + D_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + D_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + D_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->D_length); + if(D_lengthT > D_length) + this->D = (double*)realloc(this->D, D_lengthT * sizeof(double)); + D_length = D_lengthT; + for( uint32_t i = 0; i < D_length; i++){ + union { + double real; + uint64_t base; + } u_st_D; + u_st_D.base = 0; + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_D = u_st_D.real; + offset += sizeof(this->st_D); + memcpy( &(this->D[i]), &(this->st_D), sizeof(double)); + } + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_Ki; + u_Ki.base = 0; + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->K[i] = u_Ki.real; + offset += sizeof(this->K[i]); + } + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_Ri; + u_Ri.base = 0; + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->R[i] = u_Ri.real; + offset += sizeof(this->R[i]); + } + for( uint32_t i = 0; i < 12; i++){ + union { + double real; + uint64_t base; + } u_Pi; + u_Pi.base = 0; + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->P[i] = u_Pi.real; + offset += sizeof(this->P[i]); + } + this->binning_x = ((uint32_t) (*(inbuffer + offset))); + this->binning_x |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->binning_x |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->binning_x |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->binning_x); + this->binning_y = ((uint32_t) (*(inbuffer + offset))); + this->binning_y |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->binning_y |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->binning_y |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->binning_y); + offset += this->roi.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "sensor_msgs/CameraInfo"; }; + const char * getMD5(){ return "c9a58c1b0b154e0e6da7578cb991d214"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/ChannelFloat32.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/ChannelFloat32.h new file mode 100644 index 0000000000000000000000000000000000000000..c5c433d0955ee12593cbeeed9feeed55b64de93e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/ChannelFloat32.h @@ -0,0 +1,99 @@ +#ifndef _ROS_sensor_msgs_ChannelFloat32_h +#define _ROS_sensor_msgs_ChannelFloat32_h + +#include +#include +#include +#include "ros/msg.h" + +namespace sensor_msgs +{ + + class ChannelFloat32 : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + uint32_t values_length; + typedef float _values_type; + _values_type st_values; + _values_type * values; + + ChannelFloat32(): + name(""), + values_length(0), values(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + *(outbuffer + offset + 0) = (this->values_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->values_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->values_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->values_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->values_length); + for( uint32_t i = 0; i < values_length; i++){ + union { + float real; + uint32_t base; + } u_valuesi; + u_valuesi.real = this->values[i]; + *(outbuffer + offset + 0) = (u_valuesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_valuesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_valuesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_valuesi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->values[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t values_lengthT = ((uint32_t) (*(inbuffer + offset))); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->values_length); + if(values_lengthT > values_length) + this->values = (float*)realloc(this->values, values_lengthT * sizeof(float)); + values_length = values_lengthT; + for( uint32_t i = 0; i < values_length; i++){ + union { + float real; + uint32_t base; + } u_st_values; + u_st_values.base = 0; + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_values = u_st_values.real; + offset += sizeof(this->st_values); + memcpy( &(this->values[i]), &(this->st_values), sizeof(float)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/ChannelFloat32"; }; + const char * getMD5(){ return "3d40139cdd33dfedcb71ffeeeb42ae7f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/CompressedImage.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/CompressedImage.h new file mode 100644 index 0000000000000000000000000000000000000000..a11f62cb0a9f26464f20eea8d37a2e19a8bc70ed --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/CompressedImage.h @@ -0,0 +1,88 @@ +#ifndef _ROS_sensor_msgs_CompressedImage_h +#define _ROS_sensor_msgs_CompressedImage_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class CompressedImage : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _format_type; + _format_type format; + uint32_t data_length; + typedef uint8_t _data_type; + _data_type st_data; + _data_type * data; + + CompressedImage(): + header(), + format(""), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_format = strlen(this->format); + varToArr(outbuffer + offset, length_format); + offset += 4; + memcpy(outbuffer + offset, this->format, length_format); + offset += length_format; + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_format; + arrToVar(length_format, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_format; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_format-1]=0; + this->format = (char *)(inbuffer + offset-1); + offset += length_format; + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint8_t*)realloc(this->data, data_lengthT * sizeof(uint8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint8_t)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/CompressedImage"; }; + const char * getMD5(){ return "8f7a12909da2c9d3332d540a0977563f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/FluidPressure.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/FluidPressure.h new file mode 100644 index 0000000000000000000000000000000000000000..3df5165ba51be21aa37a946e1e935c3a5e3dabae --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/FluidPressure.h @@ -0,0 +1,108 @@ +#ifndef _ROS_sensor_msgs_FluidPressure_h +#define _ROS_sensor_msgs_FluidPressure_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class FluidPressure : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef double _fluid_pressure_type; + _fluid_pressure_type fluid_pressure; + typedef double _variance_type; + _variance_type variance; + + FluidPressure(): + header(), + fluid_pressure(0), + variance(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_fluid_pressure; + u_fluid_pressure.real = this->fluid_pressure; + *(outbuffer + offset + 0) = (u_fluid_pressure.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_fluid_pressure.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_fluid_pressure.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_fluid_pressure.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_fluid_pressure.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_fluid_pressure.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_fluid_pressure.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_fluid_pressure.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->fluid_pressure); + union { + double real; + uint64_t base; + } u_variance; + u_variance.real = this->variance; + *(outbuffer + offset + 0) = (u_variance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_variance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_variance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_variance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_variance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_variance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_variance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_variance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->variance); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_fluid_pressure; + u_fluid_pressure.base = 0; + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->fluid_pressure = u_fluid_pressure.real; + offset += sizeof(this->fluid_pressure); + union { + double real; + uint64_t base; + } u_variance; + u_variance.base = 0; + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->variance = u_variance.real; + offset += sizeof(this->variance); + return offset; + } + + const char * getType(){ return "sensor_msgs/FluidPressure"; }; + const char * getMD5(){ return "804dc5cea1c5306d6a2eb80b9833befe"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/Illuminance.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/Illuminance.h new file mode 100644 index 0000000000000000000000000000000000000000..d6fbb2cd1a4759faadb228357f7e00126bf5f2b4 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/Illuminance.h @@ -0,0 +1,108 @@ +#ifndef _ROS_sensor_msgs_Illuminance_h +#define _ROS_sensor_msgs_Illuminance_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class Illuminance : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef double _illuminance_type; + _illuminance_type illuminance; + typedef double _variance_type; + _variance_type variance; + + Illuminance(): + header(), + illuminance(0), + variance(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_illuminance; + u_illuminance.real = this->illuminance; + *(outbuffer + offset + 0) = (u_illuminance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_illuminance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_illuminance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_illuminance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_illuminance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_illuminance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_illuminance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_illuminance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->illuminance); + union { + double real; + uint64_t base; + } u_variance; + u_variance.real = this->variance; + *(outbuffer + offset + 0) = (u_variance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_variance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_variance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_variance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_variance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_variance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_variance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_variance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->variance); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_illuminance; + u_illuminance.base = 0; + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->illuminance = u_illuminance.real; + offset += sizeof(this->illuminance); + union { + double real; + uint64_t base; + } u_variance; + u_variance.base = 0; + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->variance = u_variance.real; + offset += sizeof(this->variance); + return offset; + } + + const char * getType(){ return "sensor_msgs/Illuminance"; }; + const char * getMD5(){ return "8cf5febb0952fca9d650c3d11a81a188"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/Image.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/Image.h new file mode 100644 index 0000000000000000000000000000000000000000..15842a3a734170d22be223a8886c8d8f605b4fb0 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/Image.h @@ -0,0 +1,134 @@ +#ifndef _ROS_sensor_msgs_Image_h +#define _ROS_sensor_msgs_Image_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class Image : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef uint32_t _height_type; + _height_type height; + typedef uint32_t _width_type; + _width_type width; + typedef const char* _encoding_type; + _encoding_type encoding; + typedef uint8_t _is_bigendian_type; + _is_bigendian_type is_bigendian; + typedef uint32_t _step_type; + _step_type step; + uint32_t data_length; + typedef uint8_t _data_type; + _data_type st_data; + _data_type * data; + + Image(): + header(), + height(0), + width(0), + encoding(""), + is_bigendian(0), + step(0), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF; + offset += sizeof(this->height); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF; + offset += sizeof(this->width); + uint32_t length_encoding = strlen(this->encoding); + varToArr(outbuffer + offset, length_encoding); + offset += 4; + memcpy(outbuffer + offset, this->encoding, length_encoding); + offset += length_encoding; + *(outbuffer + offset + 0) = (this->is_bigendian >> (8 * 0)) & 0xFF; + offset += sizeof(this->is_bigendian); + *(outbuffer + offset + 0) = (this->step >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->step >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->step >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->step >> (8 * 3)) & 0xFF; + offset += sizeof(this->step); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->height = ((uint32_t) (*(inbuffer + offset))); + this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->height); + this->width = ((uint32_t) (*(inbuffer + offset))); + this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->width); + uint32_t length_encoding; + arrToVar(length_encoding, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_encoding; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_encoding-1]=0; + this->encoding = (char *)(inbuffer + offset-1); + offset += length_encoding; + this->is_bigendian = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->is_bigendian); + this->step = ((uint32_t) (*(inbuffer + offset))); + this->step |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->step |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->step |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->step); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint8_t*)realloc(this->data, data_lengthT * sizeof(uint8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint8_t)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/Image"; }; + const char * getMD5(){ return "060021388200f6f0f447d0fcd9c64743"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/Imu.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/Imu.h new file mode 100644 index 0000000000000000000000000000000000000000..c18b5835d3a1839d633380d62ab632fc924d7138 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/Imu.h @@ -0,0 +1,166 @@ +#ifndef _ROS_sensor_msgs_Imu_h +#define _ROS_sensor_msgs_Imu_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../std_msgs/Header.h" +#include "../geometry_msgs/Quaternion.h" +#include "../geometry_msgs/Vector3.h" + +namespace sensor_msgs +{ + + class Imu : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Quaternion _orientation_type; + _orientation_type orientation; + double orientation_covariance[9]; + typedef geometry_msgs::Vector3 _angular_velocity_type; + _angular_velocity_type angular_velocity; + double angular_velocity_covariance[9]; + typedef geometry_msgs::Vector3 _linear_acceleration_type; + _linear_acceleration_type linear_acceleration; + double linear_acceleration_covariance[9]; + + Imu(): + header(), + orientation(), + orientation_covariance(), + angular_velocity(), + angular_velocity_covariance(), + linear_acceleration(), + linear_acceleration_covariance() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->orientation.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_orientation_covariancei; + u_orientation_covariancei.real = this->orientation_covariance[i]; + *(outbuffer + offset + 0) = (u_orientation_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_orientation_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_orientation_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_orientation_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_orientation_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_orientation_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_orientation_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_orientation_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->orientation_covariance[i]); + } + offset += this->angular_velocity.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_angular_velocity_covariancei; + u_angular_velocity_covariancei.real = this->angular_velocity_covariance[i]; + *(outbuffer + offset + 0) = (u_angular_velocity_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angular_velocity_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angular_velocity_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angular_velocity_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_angular_velocity_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_angular_velocity_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_angular_velocity_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_angular_velocity_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->angular_velocity_covariance[i]); + } + offset += this->linear_acceleration.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_linear_acceleration_covariancei; + u_linear_acceleration_covariancei.real = this->linear_acceleration_covariance[i]; + *(outbuffer + offset + 0) = (u_linear_acceleration_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_linear_acceleration_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_linear_acceleration_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_linear_acceleration_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_linear_acceleration_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_linear_acceleration_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_linear_acceleration_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_linear_acceleration_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->linear_acceleration_covariance[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->orientation.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_orientation_covariancei; + u_orientation_covariancei.base = 0; + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->orientation_covariance[i] = u_orientation_covariancei.real; + offset += sizeof(this->orientation_covariance[i]); + } + offset += this->angular_velocity.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_angular_velocity_covariancei; + u_angular_velocity_covariancei.base = 0; + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->angular_velocity_covariance[i] = u_angular_velocity_covariancei.real; + offset += sizeof(this->angular_velocity_covariance[i]); + } + offset += this->linear_acceleration.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_linear_acceleration_covariancei; + u_linear_acceleration_covariancei.base = 0; + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->linear_acceleration_covariance[i] = u_linear_acceleration_covariancei.real; + offset += sizeof(this->linear_acceleration_covariance[i]); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/Imu"; }; + const char * getMD5(){ return "6a62c6daae103f4ff57a132d6f95cec2"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/JointState.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/JointState.h new file mode 100644 index 0000000000000000000000000000000000000000..6195757e3b6eb2a53e0103703239eacf8e826080 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/JointState.h @@ -0,0 +1,237 @@ +#ifndef _ROS_sensor_msgs_JointState_h +#define _ROS_sensor_msgs_JointState_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../std_msgs/Header.h" + +namespace sensor_msgs +{ + + class JointState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t name_length; + typedef char* _name_type; + _name_type st_name; + _name_type * name; + uint32_t position_length; + typedef double _position_type; + _position_type st_position; + _position_type * position; + uint32_t velocity_length; + typedef double _velocity_type; + _velocity_type st_velocity; + _velocity_type * velocity; + uint32_t effort_length; + typedef double _effort_type; + _effort_type st_effort; + _effort_type * effort; + + JointState(): + header(), + name_length(0), name(NULL), + position_length(0), position(NULL), + velocity_length(0), velocity(NULL), + effort_length(0), effort(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->name_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->name_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->name_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->name_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->name_length); + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_namei = strlen(this->name[i]); + varToArr(outbuffer + offset, length_namei); + offset += 4; + memcpy(outbuffer + offset, this->name[i], length_namei); + offset += length_namei; + } + *(outbuffer + offset + 0) = (this->position_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->position_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->position_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->position_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->position_length); + for( uint32_t i = 0; i < position_length; i++){ + union { + double real; + uint64_t base; + } u_positioni; + u_positioni.real = this->position[i]; + *(outbuffer + offset + 0) = (u_positioni.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_positioni.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_positioni.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_positioni.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_positioni.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_positioni.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_positioni.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_positioni.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position[i]); + } + *(outbuffer + offset + 0) = (this->velocity_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->velocity_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->velocity_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->velocity_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->velocity_length); + for( uint32_t i = 0; i < velocity_length; i++){ + union { + double real; + uint64_t base; + } u_velocityi; + u_velocityi.real = this->velocity[i]; + *(outbuffer + offset + 0) = (u_velocityi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_velocityi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_velocityi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_velocityi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_velocityi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_velocityi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_velocityi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_velocityi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->velocity[i]); + } + *(outbuffer + offset + 0) = (this->effort_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->effort_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->effort_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->effort_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->effort_length); + for( uint32_t i = 0; i < effort_length; i++){ + union { + double real; + uint64_t base; + } u_efforti; + u_efforti.real = this->effort[i]; + *(outbuffer + offset + 0) = (u_efforti.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_efforti.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_efforti.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_efforti.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_efforti.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_efforti.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_efforti.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_efforti.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->effort[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t name_lengthT = ((uint32_t) (*(inbuffer + offset))); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->name_length); + if(name_lengthT > name_length) + this->name = (char**)realloc(this->name, name_lengthT * sizeof(char*)); + name_length = name_lengthT; + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_st_name; + arrToVar(length_st_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_name-1]=0; + this->st_name = (char *)(inbuffer + offset-1); + offset += length_st_name; + memcpy( &(this->name[i]), &(this->st_name), sizeof(char*)); + } + uint32_t position_lengthT = ((uint32_t) (*(inbuffer + offset))); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->position_length); + if(position_lengthT > position_length) + this->position = (double*)realloc(this->position, position_lengthT * sizeof(double)); + position_length = position_lengthT; + for( uint32_t i = 0; i < position_length; i++){ + union { + double real; + uint64_t base; + } u_st_position; + u_st_position.base = 0; + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_position = u_st_position.real; + offset += sizeof(this->st_position); + memcpy( &(this->position[i]), &(this->st_position), sizeof(double)); + } + uint32_t velocity_lengthT = ((uint32_t) (*(inbuffer + offset))); + velocity_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + velocity_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + velocity_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->velocity_length); + if(velocity_lengthT > velocity_length) + this->velocity = (double*)realloc(this->velocity, velocity_lengthT * sizeof(double)); + velocity_length = velocity_lengthT; + for( uint32_t i = 0; i < velocity_length; i++){ + union { + double real; + uint64_t base; + } u_st_velocity; + u_st_velocity.base = 0; + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_velocity = u_st_velocity.real; + offset += sizeof(this->st_velocity); + memcpy( &(this->velocity[i]), &(this->st_velocity), sizeof(double)); + } + uint32_t effort_lengthT = ((uint32_t) (*(inbuffer + offset))); + effort_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + effort_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + effort_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->effort_length); + if(effort_lengthT > effort_length) + this->effort = (double*)realloc(this->effort, effort_lengthT * sizeof(double)); + effort_length = effort_lengthT; + for( uint32_t i = 0; i < effort_length; i++){ + union { + double real; + uint64_t base; + } u_st_effort; + u_st_effort.base = 0; + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_effort = u_st_effort.real; + offset += sizeof(this->st_effort); + memcpy( &(this->effort[i]), &(this->st_effort), sizeof(double)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/JointState"; }; + const char * getMD5(){ return "3066dcd76a6cfaef579bd0f34173e9fd"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/Joy.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/Joy.h new file mode 100644 index 0000000000000000000000000000000000000000..bd56d41028b363cbaa6ca7a391e3d768fab45de7 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/Joy.h @@ -0,0 +1,132 @@ +#ifndef _ROS_sensor_msgs_Joy_h +#define _ROS_sensor_msgs_Joy_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class Joy : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t axes_length; + typedef float _axes_type; + _axes_type st_axes; + _axes_type * axes; + uint32_t buttons_length; + typedef int32_t _buttons_type; + _buttons_type st_buttons; + _buttons_type * buttons; + + Joy(): + header(), + axes_length(0), axes(NULL), + buttons_length(0), buttons(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->axes_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->axes_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->axes_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->axes_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->axes_length); + for( uint32_t i = 0; i < axes_length; i++){ + union { + float real; + uint32_t base; + } u_axesi; + u_axesi.real = this->axes[i]; + *(outbuffer + offset + 0) = (u_axesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_axesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_axesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_axesi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->axes[i]); + } + *(outbuffer + offset + 0) = (this->buttons_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->buttons_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->buttons_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->buttons_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->buttons_length); + for( uint32_t i = 0; i < buttons_length; i++){ + union { + int32_t real; + uint32_t base; + } u_buttonsi; + u_buttonsi.real = this->buttons[i]; + *(outbuffer + offset + 0) = (u_buttonsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_buttonsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_buttonsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_buttonsi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->buttons[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t axes_lengthT = ((uint32_t) (*(inbuffer + offset))); + axes_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + axes_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + axes_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->axes_length); + if(axes_lengthT > axes_length) + this->axes = (float*)realloc(this->axes, axes_lengthT * sizeof(float)); + axes_length = axes_lengthT; + for( uint32_t i = 0; i < axes_length; i++){ + union { + float real; + uint32_t base; + } u_st_axes; + u_st_axes.base = 0; + u_st_axes.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_axes.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_axes.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_axes.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_axes = u_st_axes.real; + offset += sizeof(this->st_axes); + memcpy( &(this->axes[i]), &(this->st_axes), sizeof(float)); + } + uint32_t buttons_lengthT = ((uint32_t) (*(inbuffer + offset))); + buttons_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + buttons_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + buttons_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->buttons_length); + if(buttons_lengthT > buttons_length) + this->buttons = (int32_t*)realloc(this->buttons, buttons_lengthT * sizeof(int32_t)); + buttons_length = buttons_lengthT; + for( uint32_t i = 0; i < buttons_length; i++){ + union { + int32_t real; + uint32_t base; + } u_st_buttons; + u_st_buttons.base = 0; + u_st_buttons.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_buttons.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_buttons.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_buttons.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_buttons = u_st_buttons.real; + offset += sizeof(this->st_buttons); + memcpy( &(this->buttons[i]), &(this->st_buttons), sizeof(int32_t)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/Joy"; }; + const char * getMD5(){ return "5a9ea5f83505693b71e785041e67a8bb"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/JoyFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/JoyFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..7a129935146da1651dfbb596810ce31ed5eb36ae --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/JoyFeedback.h @@ -0,0 +1,79 @@ +#ifndef _ROS_sensor_msgs_JoyFeedback_h +#define _ROS_sensor_msgs_JoyFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace sensor_msgs +{ + + class JoyFeedback : public ros::Msg + { + public: + typedef uint8_t _type_type; + _type_type type; + typedef uint8_t _id_type; + _id_type id; + typedef float _intensity_type; + _intensity_type intensity; + enum { TYPE_LED = 0 }; + enum { TYPE_RUMBLE = 1 }; + enum { TYPE_BUZZER = 2 }; + + JoyFeedback(): + type(0), + id(0), + intensity(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->type >> (8 * 0)) & 0xFF; + offset += sizeof(this->type); + *(outbuffer + offset + 0) = (this->id >> (8 * 0)) & 0xFF; + offset += sizeof(this->id); + union { + float real; + uint32_t base; + } u_intensity; + u_intensity.real = this->intensity; + *(outbuffer + offset + 0) = (u_intensity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_intensity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_intensity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_intensity.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->intensity); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->type); + this->id = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->id); + union { + float real; + uint32_t base; + } u_intensity; + u_intensity.base = 0; + u_intensity.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_intensity.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_intensity.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_intensity.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->intensity = u_intensity.real; + offset += sizeof(this->intensity); + return offset; + } + + const char * getType(){ return "sensor_msgs/JoyFeedback"; }; + const char * getMD5(){ return "f4dcd73460360d98f36e55ee7f2e46f1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/JoyFeedbackArray.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/JoyFeedbackArray.h new file mode 100644 index 0000000000000000000000000000000000000000..8fe80646273d4242839bc8d1da965ac83f9603cb --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/JoyFeedbackArray.h @@ -0,0 +1,64 @@ +#ifndef _ROS_sensor_msgs_JoyFeedbackArray_h +#define _ROS_sensor_msgs_JoyFeedbackArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "sensor_msgs/JoyFeedback.h" + +namespace sensor_msgs +{ + + class JoyFeedbackArray : public ros::Msg + { + public: + uint32_t array_length; + typedef sensor_msgs::JoyFeedback _array_type; + _array_type st_array; + _array_type * array; + + JoyFeedbackArray(): + array_length(0), array(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->array_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->array_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->array_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->array_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->array_length); + for( uint32_t i = 0; i < array_length; i++){ + offset += this->array[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t array_lengthT = ((uint32_t) (*(inbuffer + offset))); + array_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + array_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + array_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->array_length); + if(array_lengthT > array_length) + this->array = (sensor_msgs::JoyFeedback*)realloc(this->array, array_lengthT * sizeof(sensor_msgs::JoyFeedback)); + array_length = array_lengthT; + for( uint32_t i = 0; i < array_length; i++){ + offset += this->st_array.deserialize(inbuffer + offset); + memcpy( &(this->array[i]), &(this->st_array), sizeof(sensor_msgs::JoyFeedback)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/JoyFeedbackArray"; }; + const char * getMD5(){ return "cde5730a895b1fc4dee6f91b754b213d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/LaserEcho.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/LaserEcho.h new file mode 100644 index 0000000000000000000000000000000000000000..b8f4c49c8df3f4466c58bdec9ff5e5f90f5b79e7 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/LaserEcho.h @@ -0,0 +1,82 @@ +#ifndef _ROS_sensor_msgs_LaserEcho_h +#define _ROS_sensor_msgs_LaserEcho_h + +#include +#include +#include +#include "ros/msg.h" + +namespace sensor_msgs +{ + + class LaserEcho : public ros::Msg + { + public: + uint32_t echoes_length; + typedef float _echoes_type; + _echoes_type st_echoes; + _echoes_type * echoes; + + LaserEcho(): + echoes_length(0), echoes(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->echoes_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->echoes_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->echoes_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->echoes_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->echoes_length); + for( uint32_t i = 0; i < echoes_length; i++){ + union { + float real; + uint32_t base; + } u_echoesi; + u_echoesi.real = this->echoes[i]; + *(outbuffer + offset + 0) = (u_echoesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_echoesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_echoesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_echoesi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->echoes[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t echoes_lengthT = ((uint32_t) (*(inbuffer + offset))); + echoes_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + echoes_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + echoes_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->echoes_length); + if(echoes_lengthT > echoes_length) + this->echoes = (float*)realloc(this->echoes, echoes_lengthT * sizeof(float)); + echoes_length = echoes_lengthT; + for( uint32_t i = 0; i < echoes_length; i++){ + union { + float real; + uint32_t base; + } u_st_echoes; + u_st_echoes.base = 0; + u_st_echoes.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_echoes.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_echoes.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_echoes.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_echoes = u_st_echoes.real; + offset += sizeof(this->st_echoes); + memcpy( &(this->echoes[i]), &(this->st_echoes), sizeof(float)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/LaserEcho"; }; + const char * getMD5(){ return "8bc5ae449b200fba4d552b4225586696"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/LaserScan.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/LaserScan.h new file mode 100644 index 0000000000000000000000000000000000000000..203e73939a1d8429cfc89737b0cef8ba87c85584 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/LaserScan.h @@ -0,0 +1,300 @@ +#ifndef _ROS_sensor_msgs_LaserScan_h +#define _ROS_sensor_msgs_LaserScan_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../std_msgs/Header.h" + +namespace sensor_msgs +{ + + class LaserScan : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef float _angle_min_type; + _angle_min_type angle_min; + typedef float _angle_max_type; + _angle_max_type angle_max; + typedef float _angle_increment_type; + _angle_increment_type angle_increment; + typedef float _time_increment_type; + _time_increment_type time_increment; + typedef float _scan_time_type; + _scan_time_type scan_time; + typedef float _range_min_type; + _range_min_type range_min; + typedef float _range_max_type; + _range_max_type range_max; + uint32_t ranges_length; + typedef float _ranges_type; + _ranges_type st_ranges; + _ranges_type * ranges; + uint32_t intensities_length; + typedef float _intensities_type; + _intensities_type st_intensities; + _intensities_type * intensities; + + LaserScan(): + header(), + angle_min(0), + angle_max(0), + angle_increment(0), + time_increment(0), + scan_time(0), + range_min(0), + range_max(0), + ranges_length(0), ranges(NULL), + intensities_length(0), intensities(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_angle_min; + u_angle_min.real = this->angle_min; + *(outbuffer + offset + 0) = (u_angle_min.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angle_min.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angle_min.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angle_min.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angle_min); + union { + float real; + uint32_t base; + } u_angle_max; + u_angle_max.real = this->angle_max; + *(outbuffer + offset + 0) = (u_angle_max.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angle_max.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angle_max.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angle_max.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angle_max); + union { + float real; + uint32_t base; + } u_angle_increment; + u_angle_increment.real = this->angle_increment; + *(outbuffer + offset + 0) = (u_angle_increment.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angle_increment.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angle_increment.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angle_increment.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angle_increment); + union { + float real; + uint32_t base; + } u_time_increment; + u_time_increment.real = this->time_increment; + *(outbuffer + offset + 0) = (u_time_increment.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_time_increment.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_time_increment.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_time_increment.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_increment); + union { + float real; + uint32_t base; + } u_scan_time; + u_scan_time.real = this->scan_time; + *(outbuffer + offset + 0) = (u_scan_time.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_scan_time.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_scan_time.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_scan_time.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->scan_time); + union { + float real; + uint32_t base; + } u_range_min; + u_range_min.real = this->range_min; + *(outbuffer + offset + 0) = (u_range_min.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_range_min.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_range_min.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_range_min.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->range_min); + union { + float real; + uint32_t base; + } u_range_max; + u_range_max.real = this->range_max; + *(outbuffer + offset + 0) = (u_range_max.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_range_max.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_range_max.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_range_max.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->range_max); + *(outbuffer + offset + 0) = (this->ranges_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->ranges_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->ranges_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->ranges_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->ranges_length); + for( uint32_t i = 0; i < ranges_length; i++){ + union { + float real; + uint32_t base; + } u_rangesi; + u_rangesi.real = this->ranges[i]; + *(outbuffer + offset + 0) = (u_rangesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_rangesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_rangesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_rangesi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->ranges[i]); + } + *(outbuffer + offset + 0) = (this->intensities_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->intensities_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->intensities_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->intensities_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->intensities_length); + for( uint32_t i = 0; i < intensities_length; i++){ + union { + float real; + uint32_t base; + } u_intensitiesi; + u_intensitiesi.real = this->intensities[i]; + *(outbuffer + offset + 0) = (u_intensitiesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_intensitiesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_intensitiesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_intensitiesi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->intensities[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_angle_min; + u_angle_min.base = 0; + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angle_min = u_angle_min.real; + offset += sizeof(this->angle_min); + union { + float real; + uint32_t base; + } u_angle_max; + u_angle_max.base = 0; + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angle_max = u_angle_max.real; + offset += sizeof(this->angle_max); + union { + float real; + uint32_t base; + } u_angle_increment; + u_angle_increment.base = 0; + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angle_increment = u_angle_increment.real; + offset += sizeof(this->angle_increment); + union { + float real; + uint32_t base; + } u_time_increment; + u_time_increment.base = 0; + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->time_increment = u_time_increment.real; + offset += sizeof(this->time_increment); + union { + float real; + uint32_t base; + } u_scan_time; + u_scan_time.base = 0; + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->scan_time = u_scan_time.real; + offset += sizeof(this->scan_time); + union { + float real; + uint32_t base; + } u_range_min; + u_range_min.base = 0; + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->range_min = u_range_min.real; + offset += sizeof(this->range_min); + union { + float real; + uint32_t base; + } u_range_max; + u_range_max.base = 0; + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->range_max = u_range_max.real; + offset += sizeof(this->range_max); + uint32_t ranges_lengthT = ((uint32_t) (*(inbuffer + offset))); + ranges_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + ranges_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + ranges_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->ranges_length); + if(ranges_lengthT > ranges_length) + this->ranges = (float*)realloc(this->ranges, ranges_lengthT * sizeof(float)); + ranges_length = ranges_lengthT; + for( uint32_t i = 0; i < ranges_length; i++){ + union { + float real; + uint32_t base; + } u_st_ranges; + u_st_ranges.base = 0; + u_st_ranges.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_ranges.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_ranges.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_ranges.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_ranges = u_st_ranges.real; + offset += sizeof(this->st_ranges); + memcpy( &(this->ranges[i]), &(this->st_ranges), sizeof(float)); + } + uint32_t intensities_lengthT = ((uint32_t) (*(inbuffer + offset))); + intensities_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + intensities_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + intensities_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->intensities_length); + if(intensities_lengthT > intensities_length) + this->intensities = (float*)realloc(this->intensities, intensities_lengthT * sizeof(float)); + intensities_length = intensities_lengthT; + for( uint32_t i = 0; i < intensities_length; i++){ + union { + float real; + uint32_t base; + } u_st_intensities; + u_st_intensities.base = 0; + u_st_intensities.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_intensities.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_intensities.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_intensities.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_intensities = u_st_intensities.real; + offset += sizeof(this->st_intensities); + memcpy( &(this->intensities[i]), &(this->st_intensities), sizeof(float)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/LaserScan"; }; + const char * getMD5(){ return "90c7ef2dc6895d81024acba2ac42f369"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/MagneticField.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/MagneticField.h new file mode 100644 index 0000000000000000000000000000000000000000..69a73444bc60614a4b2cc3da6cf92400e603442e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/MagneticField.h @@ -0,0 +1,85 @@ +#ifndef _ROS_sensor_msgs_MagneticField_h +#define _ROS_sensor_msgs_MagneticField_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Vector3.h" + +namespace sensor_msgs +{ + + class MagneticField : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Vector3 _magnetic_field_type; + _magnetic_field_type magnetic_field; + double magnetic_field_covariance[9]; + + MagneticField(): + header(), + magnetic_field(), + magnetic_field_covariance() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->magnetic_field.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_magnetic_field_covariancei; + u_magnetic_field_covariancei.real = this->magnetic_field_covariance[i]; + *(outbuffer + offset + 0) = (u_magnetic_field_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_magnetic_field_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_magnetic_field_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_magnetic_field_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_magnetic_field_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_magnetic_field_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_magnetic_field_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_magnetic_field_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->magnetic_field_covariance[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->magnetic_field.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_magnetic_field_covariancei; + u_magnetic_field_covariancei.base = 0; + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->magnetic_field_covariance[i] = u_magnetic_field_covariancei.real; + offset += sizeof(this->magnetic_field_covariance[i]); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/MagneticField"; }; + const char * getMD5(){ return "2f3b0b43eed0c9501de0fa3ff89a45aa"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/MultiDOFJointState.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/MultiDOFJointState.h new file mode 100644 index 0000000000000000000000000000000000000000..ed0779776f4c98fe26d8c4bbc58bc6f891ebad0d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/MultiDOFJointState.h @@ -0,0 +1,159 @@ +#ifndef _ROS_sensor_msgs_MultiDOFJointState_h +#define _ROS_sensor_msgs_MultiDOFJointState_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Transform.h" +#include "geometry_msgs/Twist.h" +#include "geometry_msgs/Wrench.h" + +namespace sensor_msgs +{ + + class MultiDOFJointState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t joint_names_length; + typedef char* _joint_names_type; + _joint_names_type st_joint_names; + _joint_names_type * joint_names; + uint32_t transforms_length; + typedef geometry_msgs::Transform _transforms_type; + _transforms_type st_transforms; + _transforms_type * transforms; + uint32_t twist_length; + typedef geometry_msgs::Twist _twist_type; + _twist_type st_twist; + _twist_type * twist; + uint32_t wrench_length; + typedef geometry_msgs::Wrench _wrench_type; + _wrench_type st_wrench; + _wrench_type * wrench; + + MultiDOFJointState(): + header(), + joint_names_length(0), joint_names(NULL), + transforms_length(0), transforms(NULL), + twist_length(0), twist(NULL), + wrench_length(0), wrench(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_names_length); + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_joint_namesi = strlen(this->joint_names[i]); + varToArr(outbuffer + offset, length_joint_namesi); + offset += 4; + memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); + offset += length_joint_namesi; + } + *(outbuffer + offset + 0) = (this->transforms_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->transforms_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->transforms_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->transforms_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->transforms_length); + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->transforms[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->twist_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->twist_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->twist_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->twist_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->twist_length); + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->twist[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->wrench_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->wrench_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->wrench_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->wrench_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->wrench_length); + for( uint32_t i = 0; i < wrench_length; i++){ + offset += this->wrench[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_names_length); + if(joint_names_lengthT > joint_names_length) + this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); + joint_names_length = joint_names_lengthT; + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_st_joint_names; + arrToVar(length_st_joint_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_joint_names-1]=0; + this->st_joint_names = (char *)(inbuffer + offset-1); + offset += length_st_joint_names; + memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); + } + uint32_t transforms_lengthT = ((uint32_t) (*(inbuffer + offset))); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->transforms_length); + if(transforms_lengthT > transforms_length) + this->transforms = (geometry_msgs::Transform*)realloc(this->transforms, transforms_lengthT * sizeof(geometry_msgs::Transform)); + transforms_length = transforms_lengthT; + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->st_transforms.deserialize(inbuffer + offset); + memcpy( &(this->transforms[i]), &(this->st_transforms), sizeof(geometry_msgs::Transform)); + } + uint32_t twist_lengthT = ((uint32_t) (*(inbuffer + offset))); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->twist_length); + if(twist_lengthT > twist_length) + this->twist = (geometry_msgs::Twist*)realloc(this->twist, twist_lengthT * sizeof(geometry_msgs::Twist)); + twist_length = twist_lengthT; + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->st_twist.deserialize(inbuffer + offset); + memcpy( &(this->twist[i]), &(this->st_twist), sizeof(geometry_msgs::Twist)); + } + uint32_t wrench_lengthT = ((uint32_t) (*(inbuffer + offset))); + wrench_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + wrench_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + wrench_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->wrench_length); + if(wrench_lengthT > wrench_length) + this->wrench = (geometry_msgs::Wrench*)realloc(this->wrench, wrench_lengthT * sizeof(geometry_msgs::Wrench)); + wrench_length = wrench_lengthT; + for( uint32_t i = 0; i < wrench_length; i++){ + offset += this->st_wrench.deserialize(inbuffer + offset); + memcpy( &(this->wrench[i]), &(this->st_wrench), sizeof(geometry_msgs::Wrench)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/MultiDOFJointState"; }; + const char * getMD5(){ return "690f272f0640d2631c305eeb8301e59d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/MultiEchoLaserScan.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/MultiEchoLaserScan.h new file mode 100644 index 0000000000000000000000000000000000000000..35af2b2126eef449ac05513a68ec9f3aa6587038 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/MultiEchoLaserScan.h @@ -0,0 +1,263 @@ +#ifndef _ROS_sensor_msgs_MultiEchoLaserScan_h +#define _ROS_sensor_msgs_MultiEchoLaserScan_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/LaserEcho.h" + +namespace sensor_msgs +{ + + class MultiEchoLaserScan : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef float _angle_min_type; + _angle_min_type angle_min; + typedef float _angle_max_type; + _angle_max_type angle_max; + typedef float _angle_increment_type; + _angle_increment_type angle_increment; + typedef float _time_increment_type; + _time_increment_type time_increment; + typedef float _scan_time_type; + _scan_time_type scan_time; + typedef float _range_min_type; + _range_min_type range_min; + typedef float _range_max_type; + _range_max_type range_max; + uint32_t ranges_length; + typedef sensor_msgs::LaserEcho _ranges_type; + _ranges_type st_ranges; + _ranges_type * ranges; + uint32_t intensities_length; + typedef sensor_msgs::LaserEcho _intensities_type; + _intensities_type st_intensities; + _intensities_type * intensities; + + MultiEchoLaserScan(): + header(), + angle_min(0), + angle_max(0), + angle_increment(0), + time_increment(0), + scan_time(0), + range_min(0), + range_max(0), + ranges_length(0), ranges(NULL), + intensities_length(0), intensities(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_angle_min; + u_angle_min.real = this->angle_min; + *(outbuffer + offset + 0) = (u_angle_min.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angle_min.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angle_min.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angle_min.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angle_min); + union { + float real; + uint32_t base; + } u_angle_max; + u_angle_max.real = this->angle_max; + *(outbuffer + offset + 0) = (u_angle_max.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angle_max.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angle_max.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angle_max.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angle_max); + union { + float real; + uint32_t base; + } u_angle_increment; + u_angle_increment.real = this->angle_increment; + *(outbuffer + offset + 0) = (u_angle_increment.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angle_increment.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angle_increment.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angle_increment.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angle_increment); + union { + float real; + uint32_t base; + } u_time_increment; + u_time_increment.real = this->time_increment; + *(outbuffer + offset + 0) = (u_time_increment.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_time_increment.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_time_increment.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_time_increment.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_increment); + union { + float real; + uint32_t base; + } u_scan_time; + u_scan_time.real = this->scan_time; + *(outbuffer + offset + 0) = (u_scan_time.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_scan_time.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_scan_time.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_scan_time.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->scan_time); + union { + float real; + uint32_t base; + } u_range_min; + u_range_min.real = this->range_min; + *(outbuffer + offset + 0) = (u_range_min.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_range_min.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_range_min.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_range_min.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->range_min); + union { + float real; + uint32_t base; + } u_range_max; + u_range_max.real = this->range_max; + *(outbuffer + offset + 0) = (u_range_max.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_range_max.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_range_max.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_range_max.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->range_max); + *(outbuffer + offset + 0) = (this->ranges_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->ranges_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->ranges_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->ranges_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->ranges_length); + for( uint32_t i = 0; i < ranges_length; i++){ + offset += this->ranges[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->intensities_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->intensities_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->intensities_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->intensities_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->intensities_length); + for( uint32_t i = 0; i < intensities_length; i++){ + offset += this->intensities[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_angle_min; + u_angle_min.base = 0; + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angle_min = u_angle_min.real; + offset += sizeof(this->angle_min); + union { + float real; + uint32_t base; + } u_angle_max; + u_angle_max.base = 0; + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angle_max = u_angle_max.real; + offset += sizeof(this->angle_max); + union { + float real; + uint32_t base; + } u_angle_increment; + u_angle_increment.base = 0; + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angle_increment = u_angle_increment.real; + offset += sizeof(this->angle_increment); + union { + float real; + uint32_t base; + } u_time_increment; + u_time_increment.base = 0; + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->time_increment = u_time_increment.real; + offset += sizeof(this->time_increment); + union { + float real; + uint32_t base; + } u_scan_time; + u_scan_time.base = 0; + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->scan_time = u_scan_time.real; + offset += sizeof(this->scan_time); + union { + float real; + uint32_t base; + } u_range_min; + u_range_min.base = 0; + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->range_min = u_range_min.real; + offset += sizeof(this->range_min); + union { + float real; + uint32_t base; + } u_range_max; + u_range_max.base = 0; + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->range_max = u_range_max.real; + offset += sizeof(this->range_max); + uint32_t ranges_lengthT = ((uint32_t) (*(inbuffer + offset))); + ranges_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + ranges_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + ranges_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->ranges_length); + if(ranges_lengthT > ranges_length) + this->ranges = (sensor_msgs::LaserEcho*)realloc(this->ranges, ranges_lengthT * sizeof(sensor_msgs::LaserEcho)); + ranges_length = ranges_lengthT; + for( uint32_t i = 0; i < ranges_length; i++){ + offset += this->st_ranges.deserialize(inbuffer + offset); + memcpy( &(this->ranges[i]), &(this->st_ranges), sizeof(sensor_msgs::LaserEcho)); + } + uint32_t intensities_lengthT = ((uint32_t) (*(inbuffer + offset))); + intensities_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + intensities_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + intensities_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->intensities_length); + if(intensities_lengthT > intensities_length) + this->intensities = (sensor_msgs::LaserEcho*)realloc(this->intensities, intensities_lengthT * sizeof(sensor_msgs::LaserEcho)); + intensities_length = intensities_lengthT; + for( uint32_t i = 0; i < intensities_length; i++){ + offset += this->st_intensities.deserialize(inbuffer + offset); + memcpy( &(this->intensities[i]), &(this->st_intensities), sizeof(sensor_msgs::LaserEcho)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/MultiEchoLaserScan"; }; + const char * getMD5(){ return "6fefb0c6da89d7c8abe4b339f5c2f8fb"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/NavSatFix.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/NavSatFix.h new file mode 100644 index 0000000000000000000000000000000000000000..9edc7c13b8dd723d2ad518253c21db5d6618ea26 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/NavSatFix.h @@ -0,0 +1,192 @@ +#ifndef _ROS_sensor_msgs_NavSatFix_h +#define _ROS_sensor_msgs_NavSatFix_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/NavSatStatus.h" + +namespace sensor_msgs +{ + + class NavSatFix : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef sensor_msgs::NavSatStatus _status_type; + _status_type status; + typedef double _latitude_type; + _latitude_type latitude; + typedef double _longitude_type; + _longitude_type longitude; + typedef double _altitude_type; + _altitude_type altitude; + double position_covariance[9]; + typedef uint8_t _position_covariance_type_type; + _position_covariance_type_type position_covariance_type; + enum { COVARIANCE_TYPE_UNKNOWN = 0 }; + enum { COVARIANCE_TYPE_APPROXIMATED = 1 }; + enum { COVARIANCE_TYPE_DIAGONAL_KNOWN = 2 }; + enum { COVARIANCE_TYPE_KNOWN = 3 }; + + NavSatFix(): + header(), + status(), + latitude(0), + longitude(0), + altitude(0), + position_covariance(), + position_covariance_type(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_latitude; + u_latitude.real = this->latitude; + *(outbuffer + offset + 0) = (u_latitude.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_latitude.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_latitude.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_latitude.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_latitude.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_latitude.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_latitude.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_latitude.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->latitude); + union { + double real; + uint64_t base; + } u_longitude; + u_longitude.real = this->longitude; + *(outbuffer + offset + 0) = (u_longitude.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_longitude.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_longitude.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_longitude.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_longitude.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_longitude.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_longitude.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_longitude.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->longitude); + union { + double real; + uint64_t base; + } u_altitude; + u_altitude.real = this->altitude; + *(outbuffer + offset + 0) = (u_altitude.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_altitude.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_altitude.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_altitude.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_altitude.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_altitude.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_altitude.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_altitude.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->altitude); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_position_covariancei; + u_position_covariancei.real = this->position_covariance[i]; + *(outbuffer + offset + 0) = (u_position_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_position_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_position_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_position_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_position_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_position_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_position_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_position_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position_covariance[i]); + } + *(outbuffer + offset + 0) = (this->position_covariance_type >> (8 * 0)) & 0xFF; + offset += sizeof(this->position_covariance_type); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_latitude; + u_latitude.base = 0; + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->latitude = u_latitude.real; + offset += sizeof(this->latitude); + union { + double real; + uint64_t base; + } u_longitude; + u_longitude.base = 0; + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->longitude = u_longitude.real; + offset += sizeof(this->longitude); + union { + double real; + uint64_t base; + } u_altitude; + u_altitude.base = 0; + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->altitude = u_altitude.real; + offset += sizeof(this->altitude); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_position_covariancei; + u_position_covariancei.base = 0; + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->position_covariance[i] = u_position_covariancei.real; + offset += sizeof(this->position_covariance[i]); + } + this->position_covariance_type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->position_covariance_type); + return offset; + } + + const char * getType(){ return "sensor_msgs/NavSatFix"; }; + const char * getMD5(){ return "2d3a8cd499b9b4a0249fb98fd05cfa48"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/NavSatStatus.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/NavSatStatus.h new file mode 100644 index 0000000000000000000000000000000000000000..79d8abd95fb4f306810d678c72da7c9e28660ba6 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/NavSatStatus.h @@ -0,0 +1,73 @@ +#ifndef _ROS_sensor_msgs_NavSatStatus_h +#define _ROS_sensor_msgs_NavSatStatus_h + +#include +#include +#include +#include "ros/msg.h" + +namespace sensor_msgs +{ + + class NavSatStatus : public ros::Msg + { + public: + typedef int8_t _status_type; + _status_type status; + typedef uint16_t _service_type; + _service_type service; + enum { STATUS_NO_FIX = -1 }; + enum { STATUS_FIX = 0 }; + enum { STATUS_SBAS_FIX = 1 }; + enum { STATUS_GBAS_FIX = 2 }; + enum { SERVICE_GPS = 1 }; + enum { SERVICE_GLONASS = 2 }; + enum { SERVICE_COMPASS = 4 }; + enum { SERVICE_GALILEO = 8 }; + + NavSatStatus(): + status(0), + service(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_status; + u_status.real = this->status; + *(outbuffer + offset + 0) = (u_status.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->status); + *(outbuffer + offset + 0) = (this->service >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->service >> (8 * 1)) & 0xFF; + offset += sizeof(this->service); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_status; + u_status.base = 0; + u_status.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->status = u_status.real; + offset += sizeof(this->status); + this->service = ((uint16_t) (*(inbuffer + offset))); + this->service |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->service); + return offset; + } + + const char * getType(){ return "sensor_msgs/NavSatStatus"; }; + const char * getMD5(){ return "331cdbddfa4bc96ffc3b9ad98900a54c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/PointCloud.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/PointCloud.h new file mode 100644 index 0000000000000000000000000000000000000000..f56e8d773b65a4d7c95126da78ae03fd75fb7772 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/PointCloud.h @@ -0,0 +1,96 @@ +#ifndef _ROS_sensor_msgs_PointCloud_h +#define _ROS_sensor_msgs_PointCloud_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Point32.h" +#include "sensor_msgs/ChannelFloat32.h" + +namespace sensor_msgs +{ + + class PointCloud : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t points_length; + typedef geometry_msgs::Point32 _points_type; + _points_type st_points; + _points_type * points; + uint32_t channels_length; + typedef sensor_msgs::ChannelFloat32 _channels_type; + _channels_type st_channels; + _channels_type * channels; + + PointCloud(): + header(), + points_length(0), points(NULL), + channels_length(0), channels(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->points_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->points_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->points_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->points_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->points_length); + for( uint32_t i = 0; i < points_length; i++){ + offset += this->points[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->channels_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->channels_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->channels_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->channels_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->channels_length); + for( uint32_t i = 0; i < channels_length; i++){ + offset += this->channels[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t points_lengthT = ((uint32_t) (*(inbuffer + offset))); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->points_length); + if(points_lengthT > points_length) + this->points = (geometry_msgs::Point32*)realloc(this->points, points_lengthT * sizeof(geometry_msgs::Point32)); + points_length = points_lengthT; + for( uint32_t i = 0; i < points_length; i++){ + offset += this->st_points.deserialize(inbuffer + offset); + memcpy( &(this->points[i]), &(this->st_points), sizeof(geometry_msgs::Point32)); + } + uint32_t channels_lengthT = ((uint32_t) (*(inbuffer + offset))); + channels_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + channels_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + channels_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->channels_length); + if(channels_lengthT > channels_length) + this->channels = (sensor_msgs::ChannelFloat32*)realloc(this->channels, channels_lengthT * sizeof(sensor_msgs::ChannelFloat32)); + channels_length = channels_lengthT; + for( uint32_t i = 0; i < channels_length; i++){ + offset += this->st_channels.deserialize(inbuffer + offset); + memcpy( &(this->channels[i]), &(this->st_channels), sizeof(sensor_msgs::ChannelFloat32)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/PointCloud"; }; + const char * getMD5(){ return "d8e9c3f5afbdd8a130fd1d2763945fca"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/PointCloud2.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/PointCloud2.h new file mode 100644 index 0000000000000000000000000000000000000000..c545de19a4424befaa46f22fd217fb8e63d105b7 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/PointCloud2.h @@ -0,0 +1,185 @@ +#ifndef _ROS_sensor_msgs_PointCloud2_h +#define _ROS_sensor_msgs_PointCloud2_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/PointField.h" + +namespace sensor_msgs +{ + + class PointCloud2 : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef uint32_t _height_type; + _height_type height; + typedef uint32_t _width_type; + _width_type width; + uint32_t fields_length; + typedef sensor_msgs::PointField _fields_type; + _fields_type st_fields; + _fields_type * fields; + typedef bool _is_bigendian_type; + _is_bigendian_type is_bigendian; + typedef uint32_t _point_step_type; + _point_step_type point_step; + typedef uint32_t _row_step_type; + _row_step_type row_step; + uint32_t data_length; + typedef uint8_t _data_type; + _data_type st_data; + _data_type * data; + typedef bool _is_dense_type; + _is_dense_type is_dense; + + PointCloud2(): + header(), + height(0), + width(0), + fields_length(0), fields(NULL), + is_bigendian(0), + point_step(0), + row_step(0), + data_length(0), data(NULL), + is_dense(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF; + offset += sizeof(this->height); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF; + offset += sizeof(this->width); + *(outbuffer + offset + 0) = (this->fields_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->fields_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->fields_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->fields_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->fields_length); + for( uint32_t i = 0; i < fields_length; i++){ + offset += this->fields[i].serialize(outbuffer + offset); + } + union { + bool real; + uint8_t base; + } u_is_bigendian; + u_is_bigendian.real = this->is_bigendian; + *(outbuffer + offset + 0) = (u_is_bigendian.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->is_bigendian); + *(outbuffer + offset + 0) = (this->point_step >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->point_step >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->point_step >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->point_step >> (8 * 3)) & 0xFF; + offset += sizeof(this->point_step); + *(outbuffer + offset + 0) = (this->row_step >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->row_step >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->row_step >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->row_step >> (8 * 3)) & 0xFF; + offset += sizeof(this->row_step); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + union { + bool real; + uint8_t base; + } u_is_dense; + u_is_dense.real = this->is_dense; + *(outbuffer + offset + 0) = (u_is_dense.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->is_dense); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->height = ((uint32_t) (*(inbuffer + offset))); + this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->height); + this->width = ((uint32_t) (*(inbuffer + offset))); + this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->width); + uint32_t fields_lengthT = ((uint32_t) (*(inbuffer + offset))); + fields_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + fields_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + fields_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->fields_length); + if(fields_lengthT > fields_length) + this->fields = (sensor_msgs::PointField*)realloc(this->fields, fields_lengthT * sizeof(sensor_msgs::PointField)); + fields_length = fields_lengthT; + for( uint32_t i = 0; i < fields_length; i++){ + offset += this->st_fields.deserialize(inbuffer + offset); + memcpy( &(this->fields[i]), &(this->st_fields), sizeof(sensor_msgs::PointField)); + } + union { + bool real; + uint8_t base; + } u_is_bigendian; + u_is_bigendian.base = 0; + u_is_bigendian.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->is_bigendian = u_is_bigendian.real; + offset += sizeof(this->is_bigendian); + this->point_step = ((uint32_t) (*(inbuffer + offset))); + this->point_step |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->point_step |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->point_step |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->point_step); + this->row_step = ((uint32_t) (*(inbuffer + offset))); + this->row_step |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->row_step |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->row_step |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->row_step); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint8_t*)realloc(this->data, data_lengthT * sizeof(uint8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint8_t)); + } + union { + bool real; + uint8_t base; + } u_is_dense; + u_is_dense.base = 0; + u_is_dense.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->is_dense = u_is_dense.real; + offset += sizeof(this->is_dense); + return offset; + } + + const char * getType(){ return "sensor_msgs/PointCloud2"; }; + const char * getMD5(){ return "1158d486dd51d683ce2f1be655c3c181"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/PointField.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/PointField.h new file mode 100644 index 0000000000000000000000000000000000000000..7ad0cc451ef562f5c3f4fe12877e15f931039e88 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/PointField.h @@ -0,0 +1,96 @@ +#ifndef _ROS_sensor_msgs_PointField_h +#define _ROS_sensor_msgs_PointField_h + +#include +#include +#include +#include "ros/msg.h" + +namespace sensor_msgs +{ + + class PointField : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef uint32_t _offset_type; + _offset_type offset; + typedef uint8_t _datatype_type; + _datatype_type datatype; + typedef uint32_t _count_type; + _count_type count; + enum { INT8 = 1 }; + enum { UINT8 = 2 }; + enum { INT16 = 3 }; + enum { UINT16 = 4 }; + enum { INT32 = 5 }; + enum { UINT32 = 6 }; + enum { FLOAT32 = 7 }; + enum { FLOAT64 = 8 }; + + PointField(): + name(""), + offset(0), + datatype(0), + count(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + *(outbuffer + offset + 0) = (this->offset >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->offset >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->offset >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->offset >> (8 * 3)) & 0xFF; + offset += sizeof(this->offset); + *(outbuffer + offset + 0) = (this->datatype >> (8 * 0)) & 0xFF; + offset += sizeof(this->datatype); + *(outbuffer + offset + 0) = (this->count >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->count >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->count >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->count >> (8 * 3)) & 0xFF; + offset += sizeof(this->count); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + this->offset = ((uint32_t) (*(inbuffer + offset))); + this->offset |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->offset |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->offset |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->offset); + this->datatype = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->datatype); + this->count = ((uint32_t) (*(inbuffer + offset))); + this->count |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->count |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->count |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->count); + return offset; + } + + const char * getType(){ return "sensor_msgs/PointField"; }; + const char * getMD5(){ return "268eacb2962780ceac86cbd17e328150"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/Range.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/Range.h new file mode 100644 index 0000000000000000000000000000000000000000..bfa827e19bf54cddc332c2ff56d70e6ce606f902 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/Range.h @@ -0,0 +1,149 @@ +#ifndef _ROS_sensor_msgs_Range_h +#define _ROS_sensor_msgs_Range_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class Range : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef uint8_t _radiation_type_type; + _radiation_type_type radiation_type; + typedef float _field_of_view_type; + _field_of_view_type field_of_view; + typedef float _min_range_type; + _min_range_type min_range; + typedef float _max_range_type; + _max_range_type max_range; + typedef float _range_type; + _range_type range; + enum { ULTRASOUND = 0 }; + enum { INFRARED = 1 }; + + Range(): + header(), + radiation_type(0), + field_of_view(0), + min_range(0), + max_range(0), + range(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->radiation_type >> (8 * 0)) & 0xFF; + offset += sizeof(this->radiation_type); + union { + float real; + uint32_t base; + } u_field_of_view; + u_field_of_view.real = this->field_of_view; + *(outbuffer + offset + 0) = (u_field_of_view.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_field_of_view.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_field_of_view.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_field_of_view.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->field_of_view); + union { + float real; + uint32_t base; + } u_min_range; + u_min_range.real = this->min_range; + *(outbuffer + offset + 0) = (u_min_range.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_min_range.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_min_range.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_min_range.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->min_range); + union { + float real; + uint32_t base; + } u_max_range; + u_max_range.real = this->max_range; + *(outbuffer + offset + 0) = (u_max_range.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_range.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_range.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_range.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->max_range); + union { + float real; + uint32_t base; + } u_range; + u_range.real = this->range; + *(outbuffer + offset + 0) = (u_range.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_range.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_range.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_range.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->range); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->radiation_type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->radiation_type); + union { + float real; + uint32_t base; + } u_field_of_view; + u_field_of_view.base = 0; + u_field_of_view.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_field_of_view.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_field_of_view.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_field_of_view.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->field_of_view = u_field_of_view.real; + offset += sizeof(this->field_of_view); + union { + float real; + uint32_t base; + } u_min_range; + u_min_range.base = 0; + u_min_range.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_min_range.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_min_range.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_min_range.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->min_range = u_min_range.real; + offset += sizeof(this->min_range); + union { + float real; + uint32_t base; + } u_max_range; + u_max_range.base = 0; + u_max_range.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_range.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_range.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_range.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->max_range = u_max_range.real; + offset += sizeof(this->max_range); + union { + float real; + uint32_t base; + } u_range; + u_range.base = 0; + u_range.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_range.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_range.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_range.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->range = u_range.real; + offset += sizeof(this->range); + return offset; + } + + const char * getType(){ return "sensor_msgs/Range"; }; + const char * getMD5(){ return "c005c34273dc426c67a020a87bc24148"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/RegionOfInterest.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/RegionOfInterest.h new file mode 100644 index 0000000000000000000000000000000000000000..ea0c6634181da37be766c5f26549df5d904197ba --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/RegionOfInterest.h @@ -0,0 +1,108 @@ +#ifndef _ROS_sensor_msgs_RegionOfInterest_h +#define _ROS_sensor_msgs_RegionOfInterest_h + +#include +#include +#include +#include "ros/msg.h" + +namespace sensor_msgs +{ + + class RegionOfInterest : public ros::Msg + { + public: + typedef uint32_t _x_offset_type; + _x_offset_type x_offset; + typedef uint32_t _y_offset_type; + _y_offset_type y_offset; + typedef uint32_t _height_type; + _height_type height; + typedef uint32_t _width_type; + _width_type width; + typedef bool _do_rectify_type; + _do_rectify_type do_rectify; + + RegionOfInterest(): + x_offset(0), + y_offset(0), + height(0), + width(0), + do_rectify(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->x_offset >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->x_offset >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->x_offset >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->x_offset >> (8 * 3)) & 0xFF; + offset += sizeof(this->x_offset); + *(outbuffer + offset + 0) = (this->y_offset >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->y_offset >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->y_offset >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->y_offset >> (8 * 3)) & 0xFF; + offset += sizeof(this->y_offset); + *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF; + offset += sizeof(this->height); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF; + offset += sizeof(this->width); + union { + bool real; + uint8_t base; + } u_do_rectify; + u_do_rectify.real = this->do_rectify; + *(outbuffer + offset + 0) = (u_do_rectify.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->do_rectify); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->x_offset = ((uint32_t) (*(inbuffer + offset))); + this->x_offset |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->x_offset |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->x_offset |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->x_offset); + this->y_offset = ((uint32_t) (*(inbuffer + offset))); + this->y_offset |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->y_offset |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->y_offset |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->y_offset); + this->height = ((uint32_t) (*(inbuffer + offset))); + this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->height); + this->width = ((uint32_t) (*(inbuffer + offset))); + this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->width); + union { + bool real; + uint8_t base; + } u_do_rectify; + u_do_rectify.base = 0; + u_do_rectify.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->do_rectify = u_do_rectify.real; + offset += sizeof(this->do_rectify); + return offset; + } + + const char * getType(){ return "sensor_msgs/RegionOfInterest"; }; + const char * getMD5(){ return "bdb633039d588fcccb441a4d43ccfe09"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/RelativeHumidity.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/RelativeHumidity.h new file mode 100644 index 0000000000000000000000000000000000000000..a596f884a285e9b8c8f42355ab968a28b0cec6b0 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/RelativeHumidity.h @@ -0,0 +1,108 @@ +#ifndef _ROS_sensor_msgs_RelativeHumidity_h +#define _ROS_sensor_msgs_RelativeHumidity_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class RelativeHumidity : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef double _relative_humidity_type; + _relative_humidity_type relative_humidity; + typedef double _variance_type; + _variance_type variance; + + RelativeHumidity(): + header(), + relative_humidity(0), + variance(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_relative_humidity; + u_relative_humidity.real = this->relative_humidity; + *(outbuffer + offset + 0) = (u_relative_humidity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_relative_humidity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_relative_humidity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_relative_humidity.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_relative_humidity.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_relative_humidity.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_relative_humidity.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_relative_humidity.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->relative_humidity); + union { + double real; + uint64_t base; + } u_variance; + u_variance.real = this->variance; + *(outbuffer + offset + 0) = (u_variance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_variance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_variance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_variance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_variance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_variance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_variance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_variance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->variance); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_relative_humidity; + u_relative_humidity.base = 0; + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->relative_humidity = u_relative_humidity.real; + offset += sizeof(this->relative_humidity); + union { + double real; + uint64_t base; + } u_variance; + u_variance.base = 0; + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->variance = u_variance.real; + offset += sizeof(this->variance); + return offset; + } + + const char * getType(){ return "sensor_msgs/RelativeHumidity"; }; + const char * getMD5(){ return "8730015b05955b7e992ce29a2678d90f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/SetCameraInfo.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/SetCameraInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..3f838fb82dbca169853ac970436cf1953759cb49 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/SetCameraInfo.h @@ -0,0 +1,111 @@ +#ifndef _ROS_SERVICE_SetCameraInfo_h +#define _ROS_SERVICE_SetCameraInfo_h +#include +#include +#include +#include "ros/msg.h" +#include "sensor_msgs/CameraInfo.h" + +namespace sensor_msgs +{ + +static const char SETCAMERAINFO[] = "sensor_msgs/SetCameraInfo"; + + class SetCameraInfoRequest : public ros::Msg + { + public: + typedef sensor_msgs::CameraInfo _camera_info_type; + _camera_info_type camera_info; + + SetCameraInfoRequest(): + camera_info() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->camera_info.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->camera_info.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return SETCAMERAINFO; }; + const char * getMD5(){ return "ee34be01fdeee563d0d99cd594d5581d"; }; + + }; + + class SetCameraInfoResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetCameraInfoResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETCAMERAINFO; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetCameraInfo { + public: + typedef SetCameraInfoRequest Request; + typedef SetCameraInfoResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/Temperature.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/Temperature.h new file mode 100644 index 0000000000000000000000000000000000000000..4308487a2c2e2da02fce0f5a7a7981ab137f5b18 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/Temperature.h @@ -0,0 +1,108 @@ +#ifndef _ROS_sensor_msgs_Temperature_h +#define _ROS_sensor_msgs_Temperature_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class Temperature : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef double _temperature_type; + _temperature_type temperature; + typedef double _variance_type; + _variance_type variance; + + Temperature(): + header(), + temperature(0), + variance(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_temperature; + u_temperature.real = this->temperature; + *(outbuffer + offset + 0) = (u_temperature.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_temperature.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_temperature.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_temperature.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_temperature.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_temperature.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_temperature.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_temperature.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->temperature); + union { + double real; + uint64_t base; + } u_variance; + u_variance.real = this->variance; + *(outbuffer + offset + 0) = (u_variance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_variance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_variance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_variance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_variance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_variance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_variance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_variance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->variance); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_temperature; + u_temperature.base = 0; + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->temperature = u_temperature.real; + offset += sizeof(this->temperature); + union { + double real; + uint64_t base; + } u_variance; + u_variance.base = 0; + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->variance = u_variance.real; + offset += sizeof(this->variance); + return offset; + } + + const char * getType(){ return "sensor_msgs/Temperature"; }; + const char * getMD5(){ return "ff71b307acdbe7c871a5a6d7ed359100"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/TimeReference.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/TimeReference.h new file mode 100644 index 0000000000000000000000000000000000000000..ed81b28fb9689b11ed76c7e0bbad543780a072cd --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/sensor_msgs/TimeReference.h @@ -0,0 +1,85 @@ +#ifndef _ROS_sensor_msgs_TimeReference_h +#define _ROS_sensor_msgs_TimeReference_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "ros/time.h" + +namespace sensor_msgs +{ + + class TimeReference : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef ros::Time _time_ref_type; + _time_ref_type time_ref; + typedef const char* _source_type; + _source_type source; + + TimeReference(): + header(), + time_ref(), + source("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->time_ref.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_ref.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_ref.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_ref.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_ref.sec); + *(outbuffer + offset + 0) = (this->time_ref.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_ref.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_ref.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_ref.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_ref.nsec); + uint32_t length_source = strlen(this->source); + varToArr(outbuffer + offset, length_source); + offset += 4; + memcpy(outbuffer + offset, this->source, length_source); + offset += length_source; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->time_ref.sec = ((uint32_t) (*(inbuffer + offset))); + this->time_ref.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_ref.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_ref.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_ref.sec); + this->time_ref.nsec = ((uint32_t) (*(inbuffer + offset))); + this->time_ref.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_ref.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_ref.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_ref.nsec); + uint32_t length_source; + arrToVar(length_source, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_source; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_source-1]=0; + this->source = (char *)(inbuffer + offset-1); + offset += length_source; + return offset; + } + + const char * getType(){ return "sensor_msgs/TimeReference"; }; + const char * getMD5(){ return "fded64a0265108ba86c3d38fb11c0c16"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/shape_msgs/Mesh.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/shape_msgs/Mesh.h new file mode 100644 index 0000000000000000000000000000000000000000..3599765c53b8c76bbd121094f50e6c9da924a4dc --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/shape_msgs/Mesh.h @@ -0,0 +1,90 @@ +#ifndef _ROS_shape_msgs_Mesh_h +#define _ROS_shape_msgs_Mesh_h + +#include +#include +#include +#include "ros/msg.h" +#include "shape_msgs/MeshTriangle.h" +#include "geometry_msgs/Point.h" + +namespace shape_msgs +{ + + class Mesh : public ros::Msg + { + public: + uint32_t triangles_length; + typedef shape_msgs::MeshTriangle _triangles_type; + _triangles_type st_triangles; + _triangles_type * triangles; + uint32_t vertices_length; + typedef geometry_msgs::Point _vertices_type; + _vertices_type st_vertices; + _vertices_type * vertices; + + Mesh(): + triangles_length(0), triangles(NULL), + vertices_length(0), vertices(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->triangles_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->triangles_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->triangles_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->triangles_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->triangles_length); + for( uint32_t i = 0; i < triangles_length; i++){ + offset += this->triangles[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->vertices_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->vertices_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->vertices_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->vertices_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->vertices_length); + for( uint32_t i = 0; i < vertices_length; i++){ + offset += this->vertices[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t triangles_lengthT = ((uint32_t) (*(inbuffer + offset))); + triangles_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + triangles_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + triangles_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->triangles_length); + if(triangles_lengthT > triangles_length) + this->triangles = (shape_msgs::MeshTriangle*)realloc(this->triangles, triangles_lengthT * sizeof(shape_msgs::MeshTriangle)); + triangles_length = triangles_lengthT; + for( uint32_t i = 0; i < triangles_length; i++){ + offset += this->st_triangles.deserialize(inbuffer + offset); + memcpy( &(this->triangles[i]), &(this->st_triangles), sizeof(shape_msgs::MeshTriangle)); + } + uint32_t vertices_lengthT = ((uint32_t) (*(inbuffer + offset))); + vertices_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + vertices_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + vertices_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->vertices_length); + if(vertices_lengthT > vertices_length) + this->vertices = (geometry_msgs::Point*)realloc(this->vertices, vertices_lengthT * sizeof(geometry_msgs::Point)); + vertices_length = vertices_lengthT; + for( uint32_t i = 0; i < vertices_length; i++){ + offset += this->st_vertices.deserialize(inbuffer + offset); + memcpy( &(this->vertices[i]), &(this->st_vertices), sizeof(geometry_msgs::Point)); + } + return offset; + } + + const char * getType(){ return "shape_msgs/Mesh"; }; + const char * getMD5(){ return "1ffdae9486cd3316a121c578b47a85cc"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/shape_msgs/MeshTriangle.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/shape_msgs/MeshTriangle.h new file mode 100644 index 0000000000000000000000000000000000000000..b4aad1785a51ca8858aa1fc3eb13702faa51f6c4 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/shape_msgs/MeshTriangle.h @@ -0,0 +1,54 @@ +#ifndef _ROS_shape_msgs_MeshTriangle_h +#define _ROS_shape_msgs_MeshTriangle_h + +#include +#include +#include +#include "ros/msg.h" + +namespace shape_msgs +{ + + class MeshTriangle : public ros::Msg + { + public: + uint32_t vertex_indices[3]; + + MeshTriangle(): + vertex_indices() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + for( uint32_t i = 0; i < 3; i++){ + *(outbuffer + offset + 0) = (this->vertex_indices[i] >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->vertex_indices[i] >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->vertex_indices[i] >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->vertex_indices[i] >> (8 * 3)) & 0xFF; + offset += sizeof(this->vertex_indices[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + for( uint32_t i = 0; i < 3; i++){ + this->vertex_indices[i] = ((uint32_t) (*(inbuffer + offset))); + this->vertex_indices[i] |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->vertex_indices[i] |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->vertex_indices[i] |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->vertex_indices[i]); + } + return offset; + } + + const char * getType(){ return "shape_msgs/MeshTriangle"; }; + const char * getMD5(){ return "23688b2e6d2de3d32fe8af104a903253"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/shape_msgs/Plane.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/shape_msgs/Plane.h new file mode 100644 index 0000000000000000000000000000000000000000..6f4c33283e6f1b560b5d141b989510495f3d13c2 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/shape_msgs/Plane.h @@ -0,0 +1,73 @@ +#ifndef _ROS_shape_msgs_Plane_h +#define _ROS_shape_msgs_Plane_h + +#include +#include +#include +#include "ros/msg.h" + +namespace shape_msgs +{ + + class Plane : public ros::Msg + { + public: + double coef[4]; + + Plane(): + coef() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + for( uint32_t i = 0; i < 4; i++){ + union { + double real; + uint64_t base; + } u_coefi; + u_coefi.real = this->coef[i]; + *(outbuffer + offset + 0) = (u_coefi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_coefi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_coefi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_coefi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_coefi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_coefi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_coefi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_coefi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->coef[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + for( uint32_t i = 0; i < 4; i++){ + union { + double real; + uint64_t base; + } u_coefi; + u_coefi.base = 0; + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->coef[i] = u_coefi.real; + offset += sizeof(this->coef[i]); + } + return offset; + } + + const char * getType(){ return "shape_msgs/Plane"; }; + const char * getMD5(){ return "2c1b92ed8f31492f8e73f6a4a44ca796"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/shape_msgs/SolidPrimitive.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/shape_msgs/SolidPrimitive.h new file mode 100644 index 0000000000000000000000000000000000000000..4751ad84b802ce46a5370c604dcd42b2e32a561e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/shape_msgs/SolidPrimitive.h @@ -0,0 +1,109 @@ +#ifndef _ROS_shape_msgs_SolidPrimitive_h +#define _ROS_shape_msgs_SolidPrimitive_h + +#include +#include +#include +#include "ros/msg.h" + +namespace shape_msgs +{ + + class SolidPrimitive : public ros::Msg + { + public: + typedef uint8_t _type_type; + _type_type type; + uint32_t dimensions_length; + typedef double _dimensions_type; + _dimensions_type st_dimensions; + _dimensions_type * dimensions; + enum { BOX = 1 }; + enum { SPHERE = 2 }; + enum { CYLINDER = 3 }; + enum { CONE = 4 }; + enum { BOX_X = 0 }; + enum { BOX_Y = 1 }; + enum { BOX_Z = 2 }; + enum { SPHERE_RADIUS = 0 }; + enum { CYLINDER_HEIGHT = 0 }; + enum { CYLINDER_RADIUS = 1 }; + enum { CONE_HEIGHT = 0 }; + enum { CONE_RADIUS = 1 }; + + SolidPrimitive(): + type(0), + dimensions_length(0), dimensions(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->type >> (8 * 0)) & 0xFF; + offset += sizeof(this->type); + *(outbuffer + offset + 0) = (this->dimensions_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->dimensions_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->dimensions_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->dimensions_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->dimensions_length); + for( uint32_t i = 0; i < dimensions_length; i++){ + union { + double real; + uint64_t base; + } u_dimensionsi; + u_dimensionsi.real = this->dimensions[i]; + *(outbuffer + offset + 0) = (u_dimensionsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_dimensionsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_dimensionsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_dimensionsi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_dimensionsi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_dimensionsi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_dimensionsi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_dimensionsi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->dimensions[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->type); + uint32_t dimensions_lengthT = ((uint32_t) (*(inbuffer + offset))); + dimensions_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + dimensions_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + dimensions_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->dimensions_length); + if(dimensions_lengthT > dimensions_length) + this->dimensions = (double*)realloc(this->dimensions, dimensions_lengthT * sizeof(double)); + dimensions_length = dimensions_lengthT; + for( uint32_t i = 0; i < dimensions_length; i++){ + union { + double real; + uint64_t base; + } u_st_dimensions; + u_st_dimensions.base = 0; + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_dimensions = u_st_dimensions.real; + offset += sizeof(this->st_dimensions); + memcpy( &(this->dimensions[i]), &(this->st_dimensions), sizeof(double)); + } + return offset; + } + + const char * getType(){ return "shape_msgs/SolidPrimitive"; }; + const char * getMD5(){ return "d8f8cbc74c5ff283fca29569ccefb45d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/smach_msgs/SmachContainerInitialStatusCmd.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/smach_msgs/SmachContainerInitialStatusCmd.h new file mode 100644 index 0000000000000000000000000000000000000000..bd1e131c81d15d730c69b379c3c40d39cfaec5aa --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/smach_msgs/SmachContainerInitialStatusCmd.h @@ -0,0 +1,109 @@ +#ifndef _ROS_smach_msgs_SmachContainerInitialStatusCmd_h +#define _ROS_smach_msgs_SmachContainerInitialStatusCmd_h + +#include +#include +#include +#include "ros/msg.h" + +namespace smach_msgs +{ + + class SmachContainerInitialStatusCmd : public ros::Msg + { + public: + typedef const char* _path_type; + _path_type path; + uint32_t initial_states_length; + typedef char* _initial_states_type; + _initial_states_type st_initial_states; + _initial_states_type * initial_states; + typedef const char* _local_data_type; + _local_data_type local_data; + + SmachContainerInitialStatusCmd(): + path(""), + initial_states_length(0), initial_states(NULL), + local_data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_path = strlen(this->path); + varToArr(outbuffer + offset, length_path); + offset += 4; + memcpy(outbuffer + offset, this->path, length_path); + offset += length_path; + *(outbuffer + offset + 0) = (this->initial_states_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->initial_states_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->initial_states_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->initial_states_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->initial_states_length); + for( uint32_t i = 0; i < initial_states_length; i++){ + uint32_t length_initial_statesi = strlen(this->initial_states[i]); + varToArr(outbuffer + offset, length_initial_statesi); + offset += 4; + memcpy(outbuffer + offset, this->initial_states[i], length_initial_statesi); + offset += length_initial_statesi; + } + uint32_t length_local_data = strlen(this->local_data); + varToArr(outbuffer + offset, length_local_data); + offset += 4; + memcpy(outbuffer + offset, this->local_data, length_local_data); + offset += length_local_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_path; + arrToVar(length_path, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_path; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_path-1]=0; + this->path = (char *)(inbuffer + offset-1); + offset += length_path; + uint32_t initial_states_lengthT = ((uint32_t) (*(inbuffer + offset))); + initial_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + initial_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + initial_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->initial_states_length); + if(initial_states_lengthT > initial_states_length) + this->initial_states = (char**)realloc(this->initial_states, initial_states_lengthT * sizeof(char*)); + initial_states_length = initial_states_lengthT; + for( uint32_t i = 0; i < initial_states_length; i++){ + uint32_t length_st_initial_states; + arrToVar(length_st_initial_states, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_initial_states; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_initial_states-1]=0; + this->st_initial_states = (char *)(inbuffer + offset-1); + offset += length_st_initial_states; + memcpy( &(this->initial_states[i]), &(this->st_initial_states), sizeof(char*)); + } + uint32_t length_local_data; + arrToVar(length_local_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_local_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_local_data-1]=0; + this->local_data = (char *)(inbuffer + offset-1); + offset += length_local_data; + return offset; + } + + const char * getType(){ return "smach_msgs/SmachContainerInitialStatusCmd"; }; + const char * getMD5(){ return "45f8cf31fc29b829db77f23001f788d6"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/smach_msgs/SmachContainerStatus.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/smach_msgs/SmachContainerStatus.h new file mode 100644 index 0000000000000000000000000000000000000000..8c54da30d8ca7008710692b3dbaab85883c03771 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/smach_msgs/SmachContainerStatus.h @@ -0,0 +1,169 @@ +#ifndef _ROS_smach_msgs_SmachContainerStatus_h +#define _ROS_smach_msgs_SmachContainerStatus_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace smach_msgs +{ + + class SmachContainerStatus : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _path_type; + _path_type path; + uint32_t initial_states_length; + typedef char* _initial_states_type; + _initial_states_type st_initial_states; + _initial_states_type * initial_states; + uint32_t active_states_length; + typedef char* _active_states_type; + _active_states_type st_active_states; + _active_states_type * active_states; + typedef const char* _local_data_type; + _local_data_type local_data; + typedef const char* _info_type; + _info_type info; + + SmachContainerStatus(): + header(), + path(""), + initial_states_length(0), initial_states(NULL), + active_states_length(0), active_states(NULL), + local_data(""), + info("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_path = strlen(this->path); + varToArr(outbuffer + offset, length_path); + offset += 4; + memcpy(outbuffer + offset, this->path, length_path); + offset += length_path; + *(outbuffer + offset + 0) = (this->initial_states_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->initial_states_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->initial_states_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->initial_states_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->initial_states_length); + for( uint32_t i = 0; i < initial_states_length; i++){ + uint32_t length_initial_statesi = strlen(this->initial_states[i]); + varToArr(outbuffer + offset, length_initial_statesi); + offset += 4; + memcpy(outbuffer + offset, this->initial_states[i], length_initial_statesi); + offset += length_initial_statesi; + } + *(outbuffer + offset + 0) = (this->active_states_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->active_states_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->active_states_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->active_states_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->active_states_length); + for( uint32_t i = 0; i < active_states_length; i++){ + uint32_t length_active_statesi = strlen(this->active_states[i]); + varToArr(outbuffer + offset, length_active_statesi); + offset += 4; + memcpy(outbuffer + offset, this->active_states[i], length_active_statesi); + offset += length_active_statesi; + } + uint32_t length_local_data = strlen(this->local_data); + varToArr(outbuffer + offset, length_local_data); + offset += 4; + memcpy(outbuffer + offset, this->local_data, length_local_data); + offset += length_local_data; + uint32_t length_info = strlen(this->info); + varToArr(outbuffer + offset, length_info); + offset += 4; + memcpy(outbuffer + offset, this->info, length_info); + offset += length_info; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_path; + arrToVar(length_path, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_path; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_path-1]=0; + this->path = (char *)(inbuffer + offset-1); + offset += length_path; + uint32_t initial_states_lengthT = ((uint32_t) (*(inbuffer + offset))); + initial_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + initial_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + initial_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->initial_states_length); + if(initial_states_lengthT > initial_states_length) + this->initial_states = (char**)realloc(this->initial_states, initial_states_lengthT * sizeof(char*)); + initial_states_length = initial_states_lengthT; + for( uint32_t i = 0; i < initial_states_length; i++){ + uint32_t length_st_initial_states; + arrToVar(length_st_initial_states, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_initial_states; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_initial_states-1]=0; + this->st_initial_states = (char *)(inbuffer + offset-1); + offset += length_st_initial_states; + memcpy( &(this->initial_states[i]), &(this->st_initial_states), sizeof(char*)); + } + uint32_t active_states_lengthT = ((uint32_t) (*(inbuffer + offset))); + active_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + active_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + active_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->active_states_length); + if(active_states_lengthT > active_states_length) + this->active_states = (char**)realloc(this->active_states, active_states_lengthT * sizeof(char*)); + active_states_length = active_states_lengthT; + for( uint32_t i = 0; i < active_states_length; i++){ + uint32_t length_st_active_states; + arrToVar(length_st_active_states, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_active_states; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_active_states-1]=0; + this->st_active_states = (char *)(inbuffer + offset-1); + offset += length_st_active_states; + memcpy( &(this->active_states[i]), &(this->st_active_states), sizeof(char*)); + } + uint32_t length_local_data; + arrToVar(length_local_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_local_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_local_data-1]=0; + this->local_data = (char *)(inbuffer + offset-1); + offset += length_local_data; + uint32_t length_info; + arrToVar(length_info, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_info; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_info-1]=0; + this->info = (char *)(inbuffer + offset-1); + offset += length_info; + return offset; + } + + const char * getType(){ return "smach_msgs/SmachContainerStatus"; }; + const char * getMD5(){ return "5ba2bb79ac19e3842d562a191f2a675b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/smach_msgs/SmachContainerStructure.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/smach_msgs/SmachContainerStructure.h new file mode 100644 index 0000000000000000000000000000000000000000..935b7e1e264beee67f9af8bae95f7d1d7a492ce2 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/smach_msgs/SmachContainerStructure.h @@ -0,0 +1,246 @@ +#ifndef _ROS_smach_msgs_SmachContainerStructure_h +#define _ROS_smach_msgs_SmachContainerStructure_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace smach_msgs +{ + + class SmachContainerStructure : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _path_type; + _path_type path; + uint32_t children_length; + typedef char* _children_type; + _children_type st_children; + _children_type * children; + uint32_t internal_outcomes_length; + typedef char* _internal_outcomes_type; + _internal_outcomes_type st_internal_outcomes; + _internal_outcomes_type * internal_outcomes; + uint32_t outcomes_from_length; + typedef char* _outcomes_from_type; + _outcomes_from_type st_outcomes_from; + _outcomes_from_type * outcomes_from; + uint32_t outcomes_to_length; + typedef char* _outcomes_to_type; + _outcomes_to_type st_outcomes_to; + _outcomes_to_type * outcomes_to; + uint32_t container_outcomes_length; + typedef char* _container_outcomes_type; + _container_outcomes_type st_container_outcomes; + _container_outcomes_type * container_outcomes; + + SmachContainerStructure(): + header(), + path(""), + children_length(0), children(NULL), + internal_outcomes_length(0), internal_outcomes(NULL), + outcomes_from_length(0), outcomes_from(NULL), + outcomes_to_length(0), outcomes_to(NULL), + container_outcomes_length(0), container_outcomes(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_path = strlen(this->path); + varToArr(outbuffer + offset, length_path); + offset += 4; + memcpy(outbuffer + offset, this->path, length_path); + offset += length_path; + *(outbuffer + offset + 0) = (this->children_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->children_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->children_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->children_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->children_length); + for( uint32_t i = 0; i < children_length; i++){ + uint32_t length_childreni = strlen(this->children[i]); + varToArr(outbuffer + offset, length_childreni); + offset += 4; + memcpy(outbuffer + offset, this->children[i], length_childreni); + offset += length_childreni; + } + *(outbuffer + offset + 0) = (this->internal_outcomes_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->internal_outcomes_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->internal_outcomes_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->internal_outcomes_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->internal_outcomes_length); + for( uint32_t i = 0; i < internal_outcomes_length; i++){ + uint32_t length_internal_outcomesi = strlen(this->internal_outcomes[i]); + varToArr(outbuffer + offset, length_internal_outcomesi); + offset += 4; + memcpy(outbuffer + offset, this->internal_outcomes[i], length_internal_outcomesi); + offset += length_internal_outcomesi; + } + *(outbuffer + offset + 0) = (this->outcomes_from_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->outcomes_from_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->outcomes_from_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->outcomes_from_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->outcomes_from_length); + for( uint32_t i = 0; i < outcomes_from_length; i++){ + uint32_t length_outcomes_fromi = strlen(this->outcomes_from[i]); + varToArr(outbuffer + offset, length_outcomes_fromi); + offset += 4; + memcpy(outbuffer + offset, this->outcomes_from[i], length_outcomes_fromi); + offset += length_outcomes_fromi; + } + *(outbuffer + offset + 0) = (this->outcomes_to_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->outcomes_to_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->outcomes_to_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->outcomes_to_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->outcomes_to_length); + for( uint32_t i = 0; i < outcomes_to_length; i++){ + uint32_t length_outcomes_toi = strlen(this->outcomes_to[i]); + varToArr(outbuffer + offset, length_outcomes_toi); + offset += 4; + memcpy(outbuffer + offset, this->outcomes_to[i], length_outcomes_toi); + offset += length_outcomes_toi; + } + *(outbuffer + offset + 0) = (this->container_outcomes_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->container_outcomes_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->container_outcomes_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->container_outcomes_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->container_outcomes_length); + for( uint32_t i = 0; i < container_outcomes_length; i++){ + uint32_t length_container_outcomesi = strlen(this->container_outcomes[i]); + varToArr(outbuffer + offset, length_container_outcomesi); + offset += 4; + memcpy(outbuffer + offset, this->container_outcomes[i], length_container_outcomesi); + offset += length_container_outcomesi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_path; + arrToVar(length_path, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_path; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_path-1]=0; + this->path = (char *)(inbuffer + offset-1); + offset += length_path; + uint32_t children_lengthT = ((uint32_t) (*(inbuffer + offset))); + children_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + children_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + children_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->children_length); + if(children_lengthT > children_length) + this->children = (char**)realloc(this->children, children_lengthT * sizeof(char*)); + children_length = children_lengthT; + for( uint32_t i = 0; i < children_length; i++){ + uint32_t length_st_children; + arrToVar(length_st_children, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_children; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_children-1]=0; + this->st_children = (char *)(inbuffer + offset-1); + offset += length_st_children; + memcpy( &(this->children[i]), &(this->st_children), sizeof(char*)); + } + uint32_t internal_outcomes_lengthT = ((uint32_t) (*(inbuffer + offset))); + internal_outcomes_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + internal_outcomes_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + internal_outcomes_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->internal_outcomes_length); + if(internal_outcomes_lengthT > internal_outcomes_length) + this->internal_outcomes = (char**)realloc(this->internal_outcomes, internal_outcomes_lengthT * sizeof(char*)); + internal_outcomes_length = internal_outcomes_lengthT; + for( uint32_t i = 0; i < internal_outcomes_length; i++){ + uint32_t length_st_internal_outcomes; + arrToVar(length_st_internal_outcomes, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_internal_outcomes; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_internal_outcomes-1]=0; + this->st_internal_outcomes = (char *)(inbuffer + offset-1); + offset += length_st_internal_outcomes; + memcpy( &(this->internal_outcomes[i]), &(this->st_internal_outcomes), sizeof(char*)); + } + uint32_t outcomes_from_lengthT = ((uint32_t) (*(inbuffer + offset))); + outcomes_from_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + outcomes_from_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + outcomes_from_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->outcomes_from_length); + if(outcomes_from_lengthT > outcomes_from_length) + this->outcomes_from = (char**)realloc(this->outcomes_from, outcomes_from_lengthT * sizeof(char*)); + outcomes_from_length = outcomes_from_lengthT; + for( uint32_t i = 0; i < outcomes_from_length; i++){ + uint32_t length_st_outcomes_from; + arrToVar(length_st_outcomes_from, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_outcomes_from; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_outcomes_from-1]=0; + this->st_outcomes_from = (char *)(inbuffer + offset-1); + offset += length_st_outcomes_from; + memcpy( &(this->outcomes_from[i]), &(this->st_outcomes_from), sizeof(char*)); + } + uint32_t outcomes_to_lengthT = ((uint32_t) (*(inbuffer + offset))); + outcomes_to_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + outcomes_to_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + outcomes_to_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->outcomes_to_length); + if(outcomes_to_lengthT > outcomes_to_length) + this->outcomes_to = (char**)realloc(this->outcomes_to, outcomes_to_lengthT * sizeof(char*)); + outcomes_to_length = outcomes_to_lengthT; + for( uint32_t i = 0; i < outcomes_to_length; i++){ + uint32_t length_st_outcomes_to; + arrToVar(length_st_outcomes_to, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_outcomes_to; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_outcomes_to-1]=0; + this->st_outcomes_to = (char *)(inbuffer + offset-1); + offset += length_st_outcomes_to; + memcpy( &(this->outcomes_to[i]), &(this->st_outcomes_to), sizeof(char*)); + } + uint32_t container_outcomes_lengthT = ((uint32_t) (*(inbuffer + offset))); + container_outcomes_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + container_outcomes_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + container_outcomes_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->container_outcomes_length); + if(container_outcomes_lengthT > container_outcomes_length) + this->container_outcomes = (char**)realloc(this->container_outcomes, container_outcomes_lengthT * sizeof(char*)); + container_outcomes_length = container_outcomes_lengthT; + for( uint32_t i = 0; i < container_outcomes_length; i++){ + uint32_t length_st_container_outcomes; + arrToVar(length_st_container_outcomes, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_container_outcomes; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_container_outcomes-1]=0; + this->st_container_outcomes = (char *)(inbuffer + offset-1); + offset += length_st_container_outcomes; + memcpy( &(this->container_outcomes[i]), &(this->st_container_outcomes), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return "smach_msgs/SmachContainerStructure"; }; + const char * getMD5(){ return "3d3d1e0d0f99779ee9e58101a5dcf7ea"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/statistics_msgs/Stats1D.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/statistics_msgs/Stats1D.h new file mode 100644 index 0000000000000000000000000000000000000000..9b3b256159b78f6fdf7b7aa1440cd25ec0afa4fb --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/statistics_msgs/Stats1D.h @@ -0,0 +1,198 @@ +#ifndef _ROS_statistics_msgs_Stats1D_h +#define _ROS_statistics_msgs_Stats1D_h + +#include +#include +#include +#include "ros/msg.h" + +namespace statistics_msgs +{ + + class Stats1D : public ros::Msg + { + public: + typedef double _min_type; + _min_type min; + typedef double _max_type; + _max_type max; + typedef double _mean_type; + _mean_type mean; + typedef double _variance_type; + _variance_type variance; + typedef int64_t _N_type; + _N_type N; + + Stats1D(): + min(0), + max(0), + mean(0), + variance(0), + N(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_min; + u_min.real = this->min; + *(outbuffer + offset + 0) = (u_min.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_min.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_min.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_min.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_min.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_min.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_min.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_min.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->min); + union { + double real; + uint64_t base; + } u_max; + u_max.real = this->max; + *(outbuffer + offset + 0) = (u_max.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max); + union { + double real; + uint64_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; + *(outbuffer + offset + 4) = (u_mean.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_mean.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_mean.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_mean.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->mean); + union { + double real; + uint64_t base; + } u_variance; + u_variance.real = this->variance; + *(outbuffer + offset + 0) = (u_variance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_variance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_variance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_variance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_variance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_variance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_variance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_variance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->variance); + union { + int64_t real; + uint64_t base; + } u_N; + u_N.real = this->N; + *(outbuffer + offset + 0) = (u_N.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_N.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_N.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_N.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_N.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_N.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_N.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_N.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->N); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_min; + u_min.base = 0; + u_min.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_min.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_min.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_min.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_min.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_min.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_min.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_min.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->min = u_min.real; + offset += sizeof(this->min); + union { + double real; + uint64_t base; + } u_max; + u_max.base = 0; + u_max.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max = u_max.real; + offset += sizeof(this->max); + union { + double real; + uint64_t base; + } u_mean; + u_mean.base = 0; + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->mean = u_mean.real; + offset += sizeof(this->mean); + union { + double real; + uint64_t base; + } u_variance; + u_variance.base = 0; + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->variance = u_variance.real; + offset += sizeof(this->variance); + union { + int64_t real; + uint64_t base; + } u_N; + u_N.base = 0; + u_N.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_N.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_N.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_N.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_N.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_N.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_N.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_N.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->N = u_N.real; + offset += sizeof(this->N); + return offset; + } + + const char * getType(){ return "statistics_msgs/Stats1D"; }; + const char * getMD5(){ return "5e29efbcd70d63a82b5ddfac24a5bc4b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Bool.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Bool.h new file mode 100644 index 0000000000000000000000000000000000000000..6641dd0f52728abf0aa03c70c7fc97ab3f4ec3f5 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Bool.h @@ -0,0 +1,56 @@ +#ifndef _ROS_std_msgs_Bool_h +#define _ROS_std_msgs_Bool_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Bool : public ros::Msg + { + public: + typedef bool _data_type; + _data_type data; + + Bool(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_data; + u_data.real = this->data; + *(outbuffer + offset + 0) = (u_data.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_data; + u_data.base = 0; + u_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->data = u_data.real; + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/Bool"; }; + const char * getMD5(){ return "8b94c1b53db61fb6aed406028ad6332a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Byte.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Byte.h new file mode 100644 index 0000000000000000000000000000000000000000..bf81f6fad3e5fb9f2c1dadda9d891eb72a5f971d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Byte.h @@ -0,0 +1,56 @@ +#ifndef _ROS_std_msgs_Byte_h +#define _ROS_std_msgs_Byte_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Byte : public ros::Msg + { + public: + typedef int8_t _data_type; + _data_type data; + + Byte(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_data; + u_data.real = this->data; + *(outbuffer + offset + 0) = (u_data.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_data; + u_data.base = 0; + u_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->data = u_data.real; + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/Byte"; }; + const char * getMD5(){ return "ad736a2e8818154c487bb80fe42ce43b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/ByteMultiArray.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/ByteMultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..bf3f8b4909eb9167591bfad8bb094834b549d250 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/ByteMultiArray.h @@ -0,0 +1,82 @@ +#ifndef _ROS_std_msgs_ByteMultiArray_h +#define _ROS_std_msgs_ByteMultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class ByteMultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef int8_t _data_type; + _data_type st_data; + _data_type * data; + + ByteMultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (int8_t*)realloc(this->data, data_lengthT * sizeof(int8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(int8_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/ByteMultiArray"; }; + const char * getMD5(){ return "70ea476cbcfd65ac2f68f3cda1e891fe"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Char.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Char.h new file mode 100644 index 0000000000000000000000000000000000000000..ab3340fb9ace6666af471271003096d3915d1c36 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Char.h @@ -0,0 +1,45 @@ +#ifndef _ROS_std_msgs_Char_h +#define _ROS_std_msgs_Char_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Char : public ros::Msg + { + public: + typedef uint8_t _data_type; + _data_type data; + + Char(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->data >> (8 * 0)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/Char"; }; + const char * getMD5(){ return "1bf77f25acecdedba0e224b162199717"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/ColorRGBA.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/ColorRGBA.h new file mode 100644 index 0000000000000000000000000000000000000000..e782d2fd0ee1e1d82601d6d4afae55ab330dc071 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/ColorRGBA.h @@ -0,0 +1,134 @@ +#ifndef _ROS_std_msgs_ColorRGBA_h +#define _ROS_std_msgs_ColorRGBA_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class ColorRGBA : public ros::Msg + { + public: + typedef float _r_type; + _r_type r; + typedef float _g_type; + _g_type g; + typedef float _b_type; + _b_type b; + typedef float _a_type; + _a_type a; + + ColorRGBA(): + r(0), + g(0), + b(0), + a(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_r; + u_r.real = this->r; + *(outbuffer + offset + 0) = (u_r.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_r.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_r.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_r.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->r); + union { + float real; + uint32_t base; + } u_g; + u_g.real = this->g; + *(outbuffer + offset + 0) = (u_g.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_g.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_g.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_g.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->g); + union { + float real; + uint32_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; + offset += sizeof(this->b); + union { + float real; + uint32_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; + offset += sizeof(this->a); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_r; + u_r.base = 0; + u_r.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_r.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_r.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_r.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->r = u_r.real; + offset += sizeof(this->r); + union { + float real; + uint32_t base; + } u_g; + u_g.base = 0; + u_g.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_g.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_g.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_g.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->g = u_g.real; + offset += sizeof(this->g); + union { + float real; + uint32_t base; + } u_b; + u_b.base = 0; + u_b.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_b.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_b.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_b.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->b = u_b.real; + offset += sizeof(this->b); + union { + float real; + uint32_t base; + } u_a; + u_a.base = 0; + u_a.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_a.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_a.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_a.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->a = u_a.real; + offset += sizeof(this->a); + return offset; + } + + const char * getType(){ return "std_msgs/ColorRGBA"; }; + const char * getMD5(){ return "a29a96539573343b1310c73607334b00"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Duration.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Duration.h new file mode 100644 index 0000000000000000000000000000000000000000..9373f3569e0b9eece42305e3e592d81cb2e2f15b --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Duration.h @@ -0,0 +1,62 @@ +#ifndef _ROS_std_msgs_Duration_h +#define _ROS_std_msgs_Duration_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/duration.h" + +namespace std_msgs +{ + + class Duration : public ros::Msg + { + public: + typedef ros::Duration _data_type; + _data_type data; + + Duration(): + data() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->data.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->data.sec); + *(outbuffer + offset + 0) = (this->data.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->data.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->data.sec = ((uint32_t) (*(inbuffer + offset))); + this->data.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->data.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->data.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data.sec); + this->data.nsec = ((uint32_t) (*(inbuffer + offset))); + this->data.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->data.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->data.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data.nsec); + return offset; + } + + const char * getType(){ return "std_msgs/Duration"; }; + const char * getMD5(){ return "3e286caf4241d664e55f3ad380e2ae46"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Empty.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Empty.h new file mode 100644 index 0000000000000000000000000000000000000000..440e5edc4bab6237b1d90e82e59fa46140bd02db --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Empty.h @@ -0,0 +1,38 @@ +#ifndef _ROS_std_msgs_Empty_h +#define _ROS_std_msgs_Empty_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Empty : public ros::Msg + { + public: + + Empty() + { + } + + 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 "std_msgs/Empty"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Float32.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Float32.h new file mode 100644 index 0000000000000000000000000000000000000000..07fc43525ae393efae8f1f1c0ef0dd27c0961d83 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Float32.h @@ -0,0 +1,62 @@ +#ifndef _ROS_std_msgs_Float32_h +#define _ROS_std_msgs_Float32_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Float32 : public ros::Msg + { + public: + typedef float _data_type; + _data_type data; + + Float32(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + 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); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + 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); + return offset; + } + + const char * getType(){ return "std_msgs/Float32"; }; + const char * getMD5(){ return "73fcbf46b49191e672908e50842a83d4"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Float32MultiArray.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Float32MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..08800d06623b38a7f350ef62b97b822cb7d11cad --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Float32MultiArray.h @@ -0,0 +1,88 @@ +#ifndef _ROS_std_msgs_Float32MultiArray_h +#define _ROS_std_msgs_Float32MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class Float32MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef float _data_type; + _data_type st_data; + _data_type * data; + + Float32MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + float real; + uint32_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_datai.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_datai.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_datai.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (float*)realloc(this->data, data_lengthT * sizeof(float)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + float real; + uint32_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(float)); + } + return offset; + } + + const char * getType(){ return "std_msgs/Float32MultiArray"; }; + const char * getMD5(){ return "6a40e0ffa6a17a503ac3f8616991b1f6"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Float64.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Float64.h new file mode 100644 index 0000000000000000000000000000000000000000..b566cb64b3de0c033e4e299b75cf6d44a48e2472 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Float64.h @@ -0,0 +1,70 @@ +#ifndef _ROS_std_msgs_Float64_h +#define _ROS_std_msgs_Float64_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Float64 : public ros::Msg + { + public: + typedef double _data_type; + _data_type data; + + Float64(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_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; + *(outbuffer + offset + 4) = (u_data.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_data.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_data.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_data.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_data; + u_data.base = 0; + u_data.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->data = u_data.real; + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/Float64"; }; + const char * getMD5(){ return "fdb28210bfa9d7c91146260178d9a584"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Float64MultiArray.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Float64MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..219abe6b20ef3648b8309367c488f32dd2a1e8d4 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Float64MultiArray.h @@ -0,0 +1,96 @@ +#ifndef _ROS_std_msgs_Float64MultiArray_h +#define _ROS_std_msgs_Float64MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class Float64MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef double _data_type; + _data_type st_data; + _data_type * data; + + Float64MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + double real; + uint64_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_datai.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_datai.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_datai.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_datai.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_datai.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_datai.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_datai.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (double*)realloc(this->data, data_lengthT * sizeof(double)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + double real; + uint64_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(double)); + } + return offset; + } + + const char * getType(){ return "std_msgs/Float64MultiArray"; }; + const char * getMD5(){ return "4b7d974086d4060e7db4613a7e6c3ba4"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Header.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Header.h new file mode 100644 index 0000000000000000000000000000000000000000..658bd8434f8f93964a8cccff93dc9f7604640734 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Header.h @@ -0,0 +1,92 @@ +#ifndef _ROS_std_msgs_Header_h +#define _ROS_std_msgs_Header_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../ros/time.h" + +namespace std_msgs +{ + + class Header : public ros::Msg + { + public: + typedef uint32_t _seq_type; + _seq_type seq; + typedef ros::Time _stamp_type; + _stamp_type stamp; + typedef const char* _frame_id_type; + _frame_id_type frame_id; + + Header(): + seq(0), + stamp(), + frame_id("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->seq >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->seq >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->seq >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->seq >> (8 * 3)) & 0xFF; + offset += sizeof(this->seq); + *(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_frame_id = strlen(this->frame_id); + varToArr(outbuffer + offset, length_frame_id); + offset += 4; + memcpy(outbuffer + offset, this->frame_id, length_frame_id); + offset += length_frame_id; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->seq = ((uint32_t) (*(inbuffer + offset))); + this->seq |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->seq |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->seq |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->seq); + 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_frame_id; + arrToVar(length_frame_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_frame_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_frame_id-1]=0; + this->frame_id = (char *)(inbuffer + offset-1); + offset += length_frame_id; + return offset; + } + + const char * getType(){ return "std_msgs/Header"; }; + const char * getMD5(){ return "2176decaecbce78abc3b96ef049fabed"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int16.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int16.h new file mode 100644 index 0000000000000000000000000000000000000000..8699431c0ef3f2fdb38d8fd0855abb60b70e5233 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int16.h @@ -0,0 +1,58 @@ +#ifndef _ROS_std_msgs_Int16_h +#define _ROS_std_msgs_Int16_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Int16 : public ros::Msg + { + public: + typedef int16_t _data_type; + _data_type data; + + Int16(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int16_t real; + uint16_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; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int16_t real; + uint16_t base; + } u_data; + u_data.base = 0; + u_data.base |= ((uint16_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_data.base |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->data = u_data.real; + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/Int16"; }; + const char * getMD5(){ return "8524586e34fbd7cb1c08c5f5f1ca0e57"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int16MultiArray.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int16MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..09a685a7713378d2e8fab337778d410665d77218 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int16MultiArray.h @@ -0,0 +1,84 @@ +#ifndef _ROS_std_msgs_Int16MultiArray_h +#define _ROS_std_msgs_Int16MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class Int16MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef int16_t _data_type; + _data_type st_data; + _data_type * data; + + Int16MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + int16_t real; + uint16_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_datai.base >> (8 * 1)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (int16_t*)realloc(this->data, data_lengthT * sizeof(int16_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + int16_t real; + uint16_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint16_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_data.base |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(int16_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/Int16MultiArray"; }; + const char * getMD5(){ return "d9338d7f523fcb692fae9d0a0e9f067c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int32.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int32.h new file mode 100644 index 0000000000000000000000000000000000000000..1f33bbd7b7970a9041d5aee3b7a91c02c7aec373 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int32.h @@ -0,0 +1,62 @@ +#ifndef _ROS_std_msgs_Int32_h +#define _ROS_std_msgs_Int32_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Int32 : public ros::Msg + { + public: + typedef int32_t _data_type; + _data_type data; + + Int32(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int32_t 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); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int32_t 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); + return offset; + } + + const char * getType(){ return "std_msgs/Int32"; }; + const char * getMD5(){ return "da5909fbe378aeaf85e547e830cc1bb7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int32MultiArray.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int32MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..9dc349dddca047ef9cb3b7a88264fa95024b20b5 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int32MultiArray.h @@ -0,0 +1,88 @@ +#ifndef _ROS_std_msgs_Int32MultiArray_h +#define _ROS_std_msgs_Int32MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class Int32MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef int32_t _data_type; + _data_type st_data; + _data_type * data; + + Int32MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + int32_t real; + uint32_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_datai.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_datai.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_datai.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (int32_t*)realloc(this->data, data_lengthT * sizeof(int32_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + int32_t real; + uint32_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(int32_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/Int32MultiArray"; }; + const char * getMD5(){ return "1d99f79f8b325b44fee908053e9c945b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int64.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int64.h new file mode 100644 index 0000000000000000000000000000000000000000..9edec3b1675050fe1707ae48c4334a70754b7bc5 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int64.h @@ -0,0 +1,70 @@ +#ifndef _ROS_std_msgs_Int64_h +#define _ROS_std_msgs_Int64_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Int64 : public ros::Msg + { + public: + typedef int64_t _data_type; + _data_type data; + + Int64(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int64_t real; + uint64_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; + *(outbuffer + offset + 4) = (u_data.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_data.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_data.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_data.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int64_t real; + uint64_t base; + } u_data; + u_data.base = 0; + u_data.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->data = u_data.real; + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/Int64"; }; + const char * getMD5(){ return "34add168574510e6e17f5d23ecc077ef"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int64MultiArray.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int64MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..78157568ca5718f5872b2bbfe10d33b844ccf951 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int64MultiArray.h @@ -0,0 +1,96 @@ +#ifndef _ROS_std_msgs_Int64MultiArray_h +#define _ROS_std_msgs_Int64MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class Int64MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef int64_t _data_type; + _data_type st_data; + _data_type * data; + + Int64MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + int64_t real; + uint64_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_datai.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_datai.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_datai.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_datai.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_datai.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_datai.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_datai.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (int64_t*)realloc(this->data, data_lengthT * sizeof(int64_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + int64_t real; + uint64_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(int64_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/Int64MultiArray"; }; + const char * getMD5(){ return "54865aa6c65be0448113a2afc6a49270"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int8.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int8.h new file mode 100644 index 0000000000000000000000000000000000000000..9509136e8945d06cee88db19972e01d603b6ae5d --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int8.h @@ -0,0 +1,56 @@ +#ifndef _ROS_std_msgs_Int8_h +#define _ROS_std_msgs_Int8_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Int8 : public ros::Msg + { + public: + typedef int8_t _data_type; + _data_type data; + + Int8(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_data; + u_data.real = this->data; + *(outbuffer + offset + 0) = (u_data.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_data; + u_data.base = 0; + u_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->data = u_data.real; + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/Int8"; }; + const char * getMD5(){ return "27ffa0c9c4b8fb8492252bcad9e5c57b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int8MultiArray.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int8MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..38921a955e2e7ea7baaea1a4bee3a71e3be12bc1 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Int8MultiArray.h @@ -0,0 +1,82 @@ +#ifndef _ROS_std_msgs_Int8MultiArray_h +#define _ROS_std_msgs_Int8MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class Int8MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef int8_t _data_type; + _data_type st_data; + _data_type * data; + + Int8MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (int8_t*)realloc(this->data, data_lengthT * sizeof(int8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(int8_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/Int8MultiArray"; }; + const char * getMD5(){ return "d7c1af35a1b4781bbe79e03dd94b7c13"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/MultiArrayDimension.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/MultiArrayDimension.h new file mode 100644 index 0000000000000000000000000000000000000000..72cb41645270f1df1f9a39f28abd392eedd82460 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/MultiArrayDimension.h @@ -0,0 +1,81 @@ +#ifndef _ROS_std_msgs_MultiArrayDimension_h +#define _ROS_std_msgs_MultiArrayDimension_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class MultiArrayDimension : public ros::Msg + { + public: + typedef const char* _label_type; + _label_type label; + typedef uint32_t _size_type; + _size_type size; + typedef uint32_t _stride_type; + _stride_type stride; + + MultiArrayDimension(): + label(""), + size(0), + stride(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_label = strlen(this->label); + varToArr(outbuffer + offset, length_label); + offset += 4; + memcpy(outbuffer + offset, this->label, length_label); + offset += length_label; + *(outbuffer + offset + 0) = (this->size >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->size >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->size >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->size >> (8 * 3)) & 0xFF; + offset += sizeof(this->size); + *(outbuffer + offset + 0) = (this->stride >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stride >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stride >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stride >> (8 * 3)) & 0xFF; + offset += sizeof(this->stride); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_label; + arrToVar(length_label, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_label; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_label-1]=0; + this->label = (char *)(inbuffer + offset-1); + offset += length_label; + this->size = ((uint32_t) (*(inbuffer + offset))); + this->size |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->size |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->size |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->size); + this->stride = ((uint32_t) (*(inbuffer + offset))); + this->stride |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stride |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stride |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stride); + return offset; + } + + const char * getType(){ return "std_msgs/MultiArrayDimension"; }; + const char * getMD5(){ return "4cd0c83a8683deae40ecdac60e53bfa8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/MultiArrayLayout.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/MultiArrayLayout.h new file mode 100644 index 0000000000000000000000000000000000000000..3cf3cfbade7c2676aa6f86813ff00991e953fe8c --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/MultiArrayLayout.h @@ -0,0 +1,77 @@ +#ifndef _ROS_std_msgs_MultiArrayLayout_h +#define _ROS_std_msgs_MultiArrayLayout_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayDimension.h" + +namespace std_msgs +{ + + class MultiArrayLayout : public ros::Msg + { + public: + uint32_t dim_length; + typedef std_msgs::MultiArrayDimension _dim_type; + _dim_type st_dim; + _dim_type * dim; + typedef uint32_t _data_offset_type; + _data_offset_type data_offset; + + MultiArrayLayout(): + dim_length(0), dim(NULL), + data_offset(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->dim_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->dim_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->dim_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->dim_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->dim_length); + for( uint32_t i = 0; i < dim_length; i++){ + offset += this->dim[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->data_offset >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_offset >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_offset >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_offset >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t dim_lengthT = ((uint32_t) (*(inbuffer + offset))); + dim_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + dim_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + dim_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->dim_length); + if(dim_lengthT > dim_length) + this->dim = (std_msgs::MultiArrayDimension*)realloc(this->dim, dim_lengthT * sizeof(std_msgs::MultiArrayDimension)); + dim_length = dim_lengthT; + for( uint32_t i = 0; i < dim_length; i++){ + offset += this->st_dim.deserialize(inbuffer + offset); + memcpy( &(this->dim[i]), &(this->st_dim), sizeof(std_msgs::MultiArrayDimension)); + } + this->data_offset = ((uint32_t) (*(inbuffer + offset))); + this->data_offset |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->data_offset |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->data_offset |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_offset); + return offset; + } + + const char * getType(){ return "std_msgs/MultiArrayLayout"; }; + const char * getMD5(){ return "0fed2a11c13e11c5571b4e2a995a91a3"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/String.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/String.h new file mode 100644 index 0000000000000000000000000000000000000000..de0bfa02cfb0f5af3bea1b892aafb8cd202162fd --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/String.h @@ -0,0 +1,55 @@ +#ifndef _ROS_std_msgs_String_h +#define _ROS_std_msgs_String_h + +#include +#include +#include +#include "../ros/msg.h" + +namespace std_msgs +{ + + class String : public ros::Msg + { + public: + typedef const char* _data_type; + _data_type data; + + String(): + data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_data = strlen(this->data); + varToArr(outbuffer + offset, length_data); + offset += 4; + memcpy(outbuffer + offset, this->data, length_data); + offset += length_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_data; + arrToVar(length_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data-1]=0; + this->data = (char *)(inbuffer + offset-1); + offset += length_data; + return offset; + } + + const char * getType(){ return "std_msgs/String"; }; + const char * getMD5(){ return "992ce8a1687cec8c8bd883ec73ca41d1"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Time.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Time.h new file mode 100644 index 0000000000000000000000000000000000000000..2a6dd260a5734cd9ee4335d4177fbe96b31c6e39 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/Time.h @@ -0,0 +1,62 @@ +#ifndef _ROS_std_msgs_Time_h +#define _ROS_std_msgs_Time_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../ros/time.h" + +namespace std_msgs +{ + + class Time : public ros::Msg + { + public: + typedef ros::Time _data_type; + _data_type data; + + Time(): + data() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->data.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->data.sec); + *(outbuffer + offset + 0) = (this->data.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->data.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->data.sec = ((uint32_t) (*(inbuffer + offset))); + this->data.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->data.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->data.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data.sec); + this->data.nsec = ((uint32_t) (*(inbuffer + offset))); + this->data.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->data.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->data.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data.nsec); + return offset; + } + + const char * getType(){ return "std_msgs/Time"; }; + const char * getMD5(){ return "cd7166c74c552c311fbcc2fe5a7bc289"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt16.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt16.h new file mode 100644 index 0000000000000000000000000000000000000000..4da6884762ab2c6b573ec5adc7f226277eb95a48 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt16.h @@ -0,0 +1,47 @@ +#ifndef _ROS_std_msgs_UInt16_h +#define _ROS_std_msgs_UInt16_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class UInt16 : public ros::Msg + { + public: + typedef uint16_t _data_type; + _data_type data; + + UInt16(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->data >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data >> (8 * 1)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->data = ((uint16_t) (*(inbuffer + offset))); + this->data |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/UInt16"; }; + const char * getMD5(){ return "1df79edf208b629fe6b81923a544552d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt16MultiArray.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt16MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..26c0e8fed59987079d2d44e44cfaf696a0489caa --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt16MultiArray.h @@ -0,0 +1,73 @@ +#ifndef _ROS_std_msgs_UInt16MultiArray_h +#define _ROS_std_msgs_UInt16MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class UInt16MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef uint16_t _data_type; + _data_type st_data; + _data_type * data; + + UInt16MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data[i] >> (8 * 1)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint16_t*)realloc(this->data, data_lengthT * sizeof(uint16_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint16_t) (*(inbuffer + offset))); + this->st_data |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint16_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/UInt16MultiArray"; }; + const char * getMD5(){ return "52f264f1c973c4b73790d384c6cb4484"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt32.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt32.h new file mode 100644 index 0000000000000000000000000000000000000000..30ae02b445636dad4d7903743d8024ef98cab7eb --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt32.h @@ -0,0 +1,51 @@ +#ifndef _ROS_std_msgs_UInt32_h +#define _ROS_std_msgs_UInt32_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class UInt32 : public ros::Msg + { + public: + typedef uint32_t _data_type; + _data_type data; + + UInt32(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->data >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data >> (8 * 3)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->data = ((uint32_t) (*(inbuffer + offset))); + this->data |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->data |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->data |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/UInt32"; }; + const char * getMD5(){ return "304a39449588c7f8ce2df6e8001c5fce"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt32MultiArray.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt32MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..af46e7954e9ed5fd63e935d495d6ca72b3042954 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt32MultiArray.h @@ -0,0 +1,77 @@ +#ifndef _ROS_std_msgs_UInt32MultiArray_h +#define _ROS_std_msgs_UInt32MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class UInt32MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef uint32_t _data_type; + _data_type st_data; + _data_type * data; + + UInt32MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data[i] >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data[i] >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data[i] >> (8 * 3)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint32_t*)realloc(this->data, data_lengthT * sizeof(uint32_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint32_t) (*(inbuffer + offset))); + this->st_data |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->st_data |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->st_data |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint32_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/UInt32MultiArray"; }; + const char * getMD5(){ return "4d6a180abc9be191b96a7eda6c8a233d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt64.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt64.h new file mode 100644 index 0000000000000000000000000000000000000000..b7ab02dd2b61eead046cabe9e767954d6e376071 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt64.h @@ -0,0 +1,62 @@ +#ifndef _ROS_std_msgs_UInt64_h +#define _ROS_std_msgs_UInt64_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class UInt64 : public ros::Msg + { + public: + typedef uint64_t _data_type; + _data_type data; + + UInt64(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + uint64_t 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); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + uint64_t 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); + return offset; + } + + const char * getType(){ return "std_msgs/UInt64"; }; + const char * getMD5(){ return "1b2a79973e8bf53d7b53acb71299cb57"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt64MultiArray.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt64MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..4401271222df8f77e9814561859813e9f581e9d2 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt64MultiArray.h @@ -0,0 +1,88 @@ +#ifndef _ROS_std_msgs_UInt64MultiArray_h +#define _ROS_std_msgs_UInt64MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class UInt64MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef uint64_t _data_type; + _data_type st_data; + _data_type * data; + + UInt64MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + uint64_t real; + uint32_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_datai.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_datai.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_datai.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint64_t*)realloc(this->data, data_lengthT * sizeof(uint64_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + uint64_t real; + uint32_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint64_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/UInt64MultiArray"; }; + const char * getMD5(){ return "6088f127afb1d6c72927aa1247e945af"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt8.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt8.h new file mode 100644 index 0000000000000000000000000000000000000000..e41b04be21be8ee6f20fb9105da9b06042f22ca7 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt8.h @@ -0,0 +1,45 @@ +#ifndef _ROS_std_msgs_UInt8_h +#define _ROS_std_msgs_UInt8_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class UInt8 : public ros::Msg + { + public: + typedef uint8_t _data_type; + _data_type data; + + UInt8(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->data >> (8 * 0)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/UInt8"; }; + const char * getMD5(){ return "7c8164229e7d2c17eb95e9231617fdee"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt8MultiArray.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt8MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..9ca2ac2e9bed363ba9a625d813e185eae4ac783e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_msgs/UInt8MultiArray.h @@ -0,0 +1,71 @@ +#ifndef _ROS_std_msgs_UInt8MultiArray_h +#define _ROS_std_msgs_UInt8MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class UInt8MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef uint8_t _data_type; + _data_type st_data; + _data_type * data; + + UInt8MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint8_t*)realloc(this->data, data_lengthT * sizeof(uint8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint8_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/UInt8MultiArray"; }; + const char * getMD5(){ return "82373f1612381bb6ee473b5cd6f5d89c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_srvs/Empty.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_srvs/Empty.h new file mode 100644 index 0000000000000000000000000000000000000000..b040dd2e233bddb00f68b71f4e9a2f5dad3e1ddb --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_srvs/Empty.h @@ -0,0 +1,70 @@ +#ifndef _ROS_SERVICE_Empty_h +#define _ROS_SERVICE_Empty_h +#include +#include +#include +#include "ros/msg.h" + +namespace std_srvs +{ + +static const char EMPTY[] = "std_srvs/Empty"; + + class EmptyRequest : public ros::Msg + { + public: + + EmptyRequest() + { + } + + 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 EMPTY; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class EmptyResponse : public ros::Msg + { + public: + + EmptyResponse() + { + } + + 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 EMPTY; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class Empty { + public: + typedef EmptyRequest Request; + typedef EmptyResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_srvs/SetBool.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_srvs/SetBool.h new file mode 100644 index 0000000000000000000000000000000000000000..1feb34e2974a7ed2febe462bc34b4df4e91178e7 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_srvs/SetBool.h @@ -0,0 +1,123 @@ +#ifndef _ROS_SERVICE_SetBool_h +#define _ROS_SERVICE_SetBool_h +#include +#include +#include +#include "ros/msg.h" + +namespace std_srvs +{ + +static const char SETBOOL[] = "std_srvs/SetBool"; + + class SetBoolRequest : public ros::Msg + { + public: + typedef bool _data_type; + _data_type data; + + SetBoolRequest(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_data; + u_data.real = this->data; + *(outbuffer + offset + 0) = (u_data.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_data; + u_data.base = 0; + u_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->data = u_data.real; + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return SETBOOL; }; + const char * getMD5(){ return "8b94c1b53db61fb6aed406028ad6332a"; }; + + }; + + class SetBoolResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _message_type; + _message_type message; + + SetBoolResponse(): + success(0), + message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_message = strlen(this->message); + varToArr(outbuffer + offset, length_message); + offset += 4; + memcpy(outbuffer + offset, this->message, length_message); + offset += length_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_message; + arrToVar(length_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message-1]=0; + this->message = (char *)(inbuffer + offset-1); + offset += length_message; + return offset; + } + + const char * getType(){ return SETBOOL; }; + const char * getMD5(){ return "937c9679a518e3a18d831e57125ea522"; }; + + }; + + class SetBool { + public: + typedef SetBoolRequest Request; + typedef SetBoolResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_srvs/Trigger.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_srvs/Trigger.h new file mode 100644 index 0000000000000000000000000000000000000000..34d1e48f7b57ba24b1e5888090a1369b2dedac85 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/std_srvs/Trigger.h @@ -0,0 +1,105 @@ +#ifndef _ROS_SERVICE_Trigger_h +#define _ROS_SERVICE_Trigger_h +#include +#include +#include +#include "ros/msg.h" + +namespace std_srvs +{ + +static const char TRIGGER[] = "std_srvs/Trigger"; + + class TriggerRequest : public ros::Msg + { + public: + + TriggerRequest() + { + } + + 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 TRIGGER; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class TriggerResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _message_type; + _message_type message; + + TriggerResponse(): + success(0), + message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_message = strlen(this->message); + varToArr(outbuffer + offset, length_message); + offset += 4; + memcpy(outbuffer + offset, this->message, length_message); + offset += length_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_message; + arrToVar(length_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message-1]=0; + this->message = (char *)(inbuffer + offset-1); + offset += length_message; + return offset; + } + + const char * getType(){ return TRIGGER; }; + const char * getMD5(){ return "937c9679a518e3a18d831e57125ea522"; }; + + }; + + class Trigger { + public: + typedef TriggerRequest Request; + typedef TriggerResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/stereo_msgs/DisparityImage.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/stereo_msgs/DisparityImage.h new file mode 100644 index 0000000000000000000000000000000000000000..90b3f28673e9d90c8515a93d8a92bdfed911db77 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/stereo_msgs/DisparityImage.h @@ -0,0 +1,176 @@ +#ifndef _ROS_stereo_msgs_DisparityImage_h +#define _ROS_stereo_msgs_DisparityImage_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/Image.h" +#include "sensor_msgs/RegionOfInterest.h" + +namespace stereo_msgs +{ + + class DisparityImage : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef sensor_msgs::Image _image_type; + _image_type image; + typedef float _f_type; + _f_type f; + typedef float _T_type; + _T_type T; + typedef sensor_msgs::RegionOfInterest _valid_window_type; + _valid_window_type valid_window; + typedef float _min_disparity_type; + _min_disparity_type min_disparity; + typedef float _max_disparity_type; + _max_disparity_type max_disparity; + typedef float _delta_d_type; + _delta_d_type delta_d; + + DisparityImage(): + header(), + image(), + f(0), + T(0), + valid_window(), + min_disparity(0), + max_disparity(0), + delta_d(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->image.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_f; + u_f.real = this->f; + *(outbuffer + offset + 0) = (u_f.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_f.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_f.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_f.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->f); + union { + float real; + uint32_t base; + } u_T; + u_T.real = this->T; + *(outbuffer + offset + 0) = (u_T.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_T.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_T.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_T.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->T); + offset += this->valid_window.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_min_disparity; + u_min_disparity.real = this->min_disparity; + *(outbuffer + offset + 0) = (u_min_disparity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_min_disparity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_min_disparity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_min_disparity.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->min_disparity); + union { + float real; + uint32_t base; + } u_max_disparity; + u_max_disparity.real = this->max_disparity; + *(outbuffer + offset + 0) = (u_max_disparity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_disparity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_disparity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_disparity.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->max_disparity); + union { + float real; + uint32_t base; + } u_delta_d; + u_delta_d.real = this->delta_d; + *(outbuffer + offset + 0) = (u_delta_d.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_delta_d.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_delta_d.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_delta_d.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->delta_d); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->image.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_f; + u_f.base = 0; + u_f.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_f.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_f.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_f.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->f = u_f.real; + offset += sizeof(this->f); + union { + float real; + uint32_t base; + } u_T; + u_T.base = 0; + u_T.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_T.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_T.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_T.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->T = u_T.real; + offset += sizeof(this->T); + offset += this->valid_window.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_min_disparity; + u_min_disparity.base = 0; + u_min_disparity.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_min_disparity.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_min_disparity.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_min_disparity.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->min_disparity = u_min_disparity.real; + offset += sizeof(this->min_disparity); + union { + float real; + uint32_t base; + } u_max_disparity; + u_max_disparity.base = 0; + u_max_disparity.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_disparity.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_disparity.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_disparity.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->max_disparity = u_max_disparity.real; + offset += sizeof(this->max_disparity); + union { + float real; + uint32_t base; + } u_delta_d; + u_delta_d.base = 0; + u_delta_d.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_delta_d.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_delta_d.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_delta_d.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->delta_d = u_delta_d.real; + offset += sizeof(this->delta_d); + return offset; + } + + const char * getType(){ return "stereo_msgs/DisparityImage"; }; + const char * getMD5(){ return "04a177815f75271039fa21f16acad8c9"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf/FrameGraph.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf/FrameGraph.h new file mode 100644 index 0000000000000000000000000000000000000000..e95a945708916458c0e6dd4710b24edd2953176a --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf/FrameGraph.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_FrameGraph_h +#define _ROS_SERVICE_FrameGraph_h +#include +#include +#include +#include "ros/msg.h" + +namespace tf +{ + +static const char FRAMEGRAPH[] = "tf/FrameGraph"; + + class FrameGraphRequest : public ros::Msg + { + public: + + FrameGraphRequest() + { + } + + 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 FRAMEGRAPH; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class FrameGraphResponse : public ros::Msg + { + public: + typedef const char* _dot_graph_type; + _dot_graph_type dot_graph; + + FrameGraphResponse(): + dot_graph("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_dot_graph = strlen(this->dot_graph); + varToArr(outbuffer + offset, length_dot_graph); + offset += 4; + memcpy(outbuffer + offset, this->dot_graph, length_dot_graph); + offset += length_dot_graph; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_dot_graph; + arrToVar(length_dot_graph, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_dot_graph; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_dot_graph-1]=0; + this->dot_graph = (char *)(inbuffer + offset-1); + offset += length_dot_graph; + return offset; + } + + const char * getType(){ return FRAMEGRAPH; }; + const char * getMD5(){ return "c4af9ac907e58e906eb0b6e3c58478c0"; }; + + }; + + class FrameGraph { + public: + typedef FrameGraphRequest Request; + typedef FrameGraphResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf/tf.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf/tf.h new file mode 100644 index 0000000000000000000000000000000000000000..97858fe2e3cc32a8725a9b9d08e98c85f5c97ad5 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf/tf.h @@ -0,0 +1,56 @@ +/* + * 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_TF_H_ +#define ROS_TF_H_ + +#include "geometry_msgs/TransformStamped.h" + +namespace tf +{ + +static inline geometry_msgs::Quaternion createQuaternionFromYaw(double yaw) +{ + geometry_msgs::Quaternion q; + q.x = 0; + q.y = 0; + q.z = sin(yaw * 0.5); + q.w = cos(yaw * 0.5); + return q; +} + +} + +#endif + diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf/tfMessage.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf/tfMessage.h new file mode 100644 index 0000000000000000000000000000000000000000..1f370d041a4e4b088cb1166da9e421e9f9bb63c5 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf/tfMessage.h @@ -0,0 +1,64 @@ +#ifndef _ROS_tf_tfMessage_h +#define _ROS_tf_tfMessage_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../geometry_msgs/TransformStamped.h" + +namespace tf +{ + + class tfMessage : public ros::Msg + { + public: + uint32_t transforms_length; + typedef geometry_msgs::TransformStamped _transforms_type; + _transforms_type st_transforms; + _transforms_type * transforms; + + tfMessage(): + transforms_length(0), transforms(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->transforms_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->transforms_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->transforms_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->transforms_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->transforms_length); + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->transforms[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t transforms_lengthT = ((uint32_t) (*(inbuffer + offset))); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->transforms_length); + if(transforms_lengthT > transforms_length) + this->transforms = (geometry_msgs::TransformStamped*)realloc(this->transforms, transforms_lengthT * sizeof(geometry_msgs::TransformStamped)); + transforms_length = transforms_lengthT; + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->st_transforms.deserialize(inbuffer + offset); + memcpy( &(this->transforms[i]), &(this->st_transforms), sizeof(geometry_msgs::TransformStamped)); + } + return offset; + } + + const char * getType(){ return "tf/tfMessage"; }; + const char * getMD5(){ return "94810edda583a504dfda3829e70d7eec"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf/transform_broadcaster.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf/transform_broadcaster.h new file mode 100644 index 0000000000000000000000000000000000000000..6c4e5fee719cdd0fd2bfe6eb26638999444d20de --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf/transform_broadcaster.h @@ -0,0 +1,69 @@ +/* + * 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_TRANSFORM_BROADCASTER_H_ +#define ROS_TRANSFORM_BROADCASTER_H_ + +#include "ros.h" +#include "tfMessage.h" + +namespace tf +{ + +class TransformBroadcaster +{ +public: + TransformBroadcaster() : publisher_("/tf", &internal_msg) {} + + void init(ros::NodeHandle &nh) + { + nh.advertise(publisher_); + } + + void sendTransform(geometry_msgs::TransformStamped &transform) + { + internal_msg.transforms_length = 1; + internal_msg.transforms = &transform; + publisher_.publish(&internal_msg); + } + +private: + tf::tfMessage internal_msg; + ros::Publisher publisher_; +}; + +} + +#endif + diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/FrameGraph.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/FrameGraph.h new file mode 100644 index 0000000000000000000000000000000000000000..91456394569ab1f14bb94c4f2f9bfb5a4c76156b --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/FrameGraph.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_FrameGraph_h +#define _ROS_SERVICE_FrameGraph_h +#include +#include +#include +#include "ros/msg.h" + +namespace tf2_msgs +{ + +static const char FRAMEGRAPH[] = "tf2_msgs/FrameGraph"; + + class FrameGraphRequest : public ros::Msg + { + public: + + FrameGraphRequest() + { + } + + 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 FRAMEGRAPH; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class FrameGraphResponse : public ros::Msg + { + public: + typedef const char* _frame_yaml_type; + _frame_yaml_type frame_yaml; + + FrameGraphResponse(): + frame_yaml("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_frame_yaml = strlen(this->frame_yaml); + varToArr(outbuffer + offset, length_frame_yaml); + offset += 4; + memcpy(outbuffer + offset, this->frame_yaml, length_frame_yaml); + offset += length_frame_yaml; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_frame_yaml; + arrToVar(length_frame_yaml, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_frame_yaml; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_frame_yaml-1]=0; + this->frame_yaml = (char *)(inbuffer + offset-1); + offset += length_frame_yaml; + return offset; + } + + const char * getType(){ return FRAMEGRAPH; }; + const char * getMD5(){ return "437ea58e9463815a0d511c7326b686b0"; }; + + }; + + class FrameGraph { + public: + typedef FrameGraphRequest Request; + typedef FrameGraphResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformAction.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformAction.h new file mode 100644 index 0000000000000000000000000000000000000000..733d095dd1538c949996a22b19d513fe0ee43e41 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_tf2_msgs_LookupTransformAction_h +#define _ROS_tf2_msgs_LookupTransformAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "tf2_msgs/LookupTransformActionGoal.h" +#include "tf2_msgs/LookupTransformActionResult.h" +#include "tf2_msgs/LookupTransformActionFeedback.h" + +namespace tf2_msgs +{ + + class LookupTransformAction : public ros::Msg + { + public: + typedef tf2_msgs::LookupTransformActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef tf2_msgs::LookupTransformActionResult _action_result_type; + _action_result_type action_result; + typedef tf2_msgs::LookupTransformActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + LookupTransformAction(): + 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 "tf2_msgs/LookupTransformAction"; }; + const char * getMD5(){ return "7ee01ba91a56c2245c610992dbaa3c37"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformActionFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..39bd3b4e0560edfaa1f15ad79d1852855bc7b058 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_tf2_msgs_LookupTransformActionFeedback_h +#define _ROS_tf2_msgs_LookupTransformActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "tf2_msgs/LookupTransformFeedback.h" + +namespace tf2_msgs +{ + + class LookupTransformActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef tf2_msgs::LookupTransformFeedback _feedback_type; + _feedback_type feedback; + + LookupTransformActionFeedback(): + 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 "tf2_msgs/LookupTransformActionFeedback"; }; + const char * getMD5(){ return "aae20e09065c3809e8a8e87c4c8953fd"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformActionGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..92bc163039dcf4e3882a686065ed1f5584b29840 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_tf2_msgs_LookupTransformActionGoal_h +#define _ROS_tf2_msgs_LookupTransformActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "tf2_msgs/LookupTransformGoal.h" + +namespace tf2_msgs +{ + + class LookupTransformActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef tf2_msgs::LookupTransformGoal _goal_type; + _goal_type goal; + + LookupTransformActionGoal(): + 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 "tf2_msgs/LookupTransformActionGoal"; }; + const char * getMD5(){ return "f2e7bcdb75c847978d0351a13e699da5"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformActionResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..38a98bdf2abf62c27c97be3a14fc83f2d08f9906 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_tf2_msgs_LookupTransformActionResult_h +#define _ROS_tf2_msgs_LookupTransformActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "tf2_msgs/LookupTransformResult.h" + +namespace tf2_msgs +{ + + class LookupTransformActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef tf2_msgs::LookupTransformResult _result_type; + _result_type result; + + LookupTransformActionResult(): + 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 "tf2_msgs/LookupTransformActionResult"; }; + const char * getMD5(){ return "ac26ce75a41384fa8bb4dc10f491ab90"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..6be0748603229045e4d3a79e397858f4f6115c8a --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformFeedback.h @@ -0,0 +1,38 @@ +#ifndef _ROS_tf2_msgs_LookupTransformFeedback_h +#define _ROS_tf2_msgs_LookupTransformFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace tf2_msgs +{ + + class LookupTransformFeedback : public ros::Msg + { + public: + + LookupTransformFeedback() + { + } + + 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 "tf2_msgs/LookupTransformFeedback"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..87a79ee055604a9ba6d3db9383e62c17b4f5ab7b --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformGoal.h @@ -0,0 +1,178 @@ +#ifndef _ROS_tf2_msgs_LookupTransformGoal_h +#define _ROS_tf2_msgs_LookupTransformGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" +#include "ros/duration.h" + +namespace tf2_msgs +{ + + class LookupTransformGoal : public ros::Msg + { + public: + typedef const char* _target_frame_type; + _target_frame_type target_frame; + typedef const char* _source_frame_type; + _source_frame_type source_frame; + typedef ros::Time _source_time_type; + _source_time_type source_time; + typedef ros::Duration _timeout_type; + _timeout_type timeout; + typedef ros::Time _target_time_type; + _target_time_type target_time; + typedef const char* _fixed_frame_type; + _fixed_frame_type fixed_frame; + typedef bool _advanced_type; + _advanced_type advanced; + + LookupTransformGoal(): + target_frame(""), + source_frame(""), + source_time(), + timeout(), + target_time(), + fixed_frame(""), + advanced(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_target_frame = strlen(this->target_frame); + varToArr(outbuffer + offset, length_target_frame); + offset += 4; + memcpy(outbuffer + offset, this->target_frame, length_target_frame); + offset += length_target_frame; + uint32_t length_source_frame = strlen(this->source_frame); + varToArr(outbuffer + offset, length_source_frame); + offset += 4; + memcpy(outbuffer + offset, this->source_frame, length_source_frame); + offset += length_source_frame; + *(outbuffer + offset + 0) = (this->source_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->source_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->source_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->source_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->source_time.sec); + *(outbuffer + offset + 0) = (this->source_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->source_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->source_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->source_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->source_time.nsec); + *(outbuffer + offset + 0) = (this->timeout.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timeout.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timeout.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timeout.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timeout.sec); + *(outbuffer + offset + 0) = (this->timeout.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timeout.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timeout.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timeout.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timeout.nsec); + *(outbuffer + offset + 0) = (this->target_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->target_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->target_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->target_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->target_time.sec); + *(outbuffer + offset + 0) = (this->target_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->target_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->target_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->target_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->target_time.nsec); + uint32_t length_fixed_frame = strlen(this->fixed_frame); + varToArr(outbuffer + offset, length_fixed_frame); + offset += 4; + memcpy(outbuffer + offset, this->fixed_frame, length_fixed_frame); + offset += length_fixed_frame; + union { + bool real; + uint8_t base; + } u_advanced; + u_advanced.real = this->advanced; + *(outbuffer + offset + 0) = (u_advanced.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->advanced); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_target_frame; + arrToVar(length_target_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_target_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_target_frame-1]=0; + this->target_frame = (char *)(inbuffer + offset-1); + offset += length_target_frame; + uint32_t length_source_frame; + arrToVar(length_source_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_source_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_source_frame-1]=0; + this->source_frame = (char *)(inbuffer + offset-1); + offset += length_source_frame; + this->source_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->source_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->source_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->source_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->source_time.sec); + this->source_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->source_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->source_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->source_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->source_time.nsec); + this->timeout.sec = ((uint32_t) (*(inbuffer + offset))); + this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timeout.sec); + this->timeout.nsec = ((uint32_t) (*(inbuffer + offset))); + this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timeout.nsec); + this->target_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->target_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->target_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->target_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->target_time.sec); + this->target_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->target_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->target_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->target_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->target_time.nsec); + uint32_t length_fixed_frame; + arrToVar(length_fixed_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_fixed_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_fixed_frame-1]=0; + this->fixed_frame = (char *)(inbuffer + offset-1); + offset += length_fixed_frame; + union { + bool real; + uint8_t base; + } u_advanced; + u_advanced.base = 0; + u_advanced.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->advanced = u_advanced.real; + offset += sizeof(this->advanced); + return offset; + } + + const char * getType(){ return "tf2_msgs/LookupTransformGoal"; }; + const char * getMD5(){ return "35e3720468131d675a18bb6f3e5f22f8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformResult.h new file mode 100644 index 0000000000000000000000000000000000000000..5422d7e7fc6dbb7f6010a6a0c21a5fc652f2699b --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/LookupTransformResult.h @@ -0,0 +1,50 @@ +#ifndef _ROS_tf2_msgs_LookupTransformResult_h +#define _ROS_tf2_msgs_LookupTransformResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/TransformStamped.h" +#include "tf2_msgs/TF2Error.h" + +namespace tf2_msgs +{ + + class LookupTransformResult : public ros::Msg + { + public: + typedef geometry_msgs::TransformStamped _transform_type; + _transform_type transform; + typedef tf2_msgs::TF2Error _error_type; + _error_type error; + + LookupTransformResult(): + transform(), + error() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->transform.serialize(outbuffer + offset); + offset += this->error.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->transform.deserialize(inbuffer + offset); + offset += this->error.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "tf2_msgs/LookupTransformResult"; }; + const char * getMD5(){ return "3fe5db6a19ca9cfb675418c5ad875c36"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/TF2Error.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/TF2Error.h new file mode 100644 index 0000000000000000000000000000000000000000..e6efdce2e3d8f0da5c06e91704a34ac2fa924119 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/TF2Error.h @@ -0,0 +1,69 @@ +#ifndef _ROS_tf2_msgs_TF2Error_h +#define _ROS_tf2_msgs_TF2Error_h + +#include +#include +#include +#include "ros/msg.h" + +namespace tf2_msgs +{ + + class TF2Error : public ros::Msg + { + public: + typedef uint8_t _error_type; + _error_type error; + typedef const char* _error_string_type; + _error_string_type error_string; + enum { NO_ERROR = 0 }; + enum { LOOKUP_ERROR = 1 }; + enum { CONNECTIVITY_ERROR = 2 }; + enum { EXTRAPOLATION_ERROR = 3 }; + enum { INVALID_ARGUMENT_ERROR = 4 }; + enum { TIMEOUT_ERROR = 5 }; + enum { TRANSFORM_ERROR = 6 }; + + TF2Error(): + error(0), + error_string("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->error >> (8 * 0)) & 0xFF; + offset += sizeof(this->error); + uint32_t length_error_string = strlen(this->error_string); + varToArr(outbuffer + offset, length_error_string); + offset += 4; + memcpy(outbuffer + offset, this->error_string, length_error_string); + offset += length_error_string; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->error = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->error); + uint32_t length_error_string; + arrToVar(length_error_string, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_error_string; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_error_string-1]=0; + this->error_string = (char *)(inbuffer + offset-1); + offset += length_error_string; + return offset; + } + + const char * getType(){ return "tf2_msgs/TF2Error"; }; + const char * getMD5(){ return "bc6848fd6fd750c92e38575618a4917d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/TFMessage.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/TFMessage.h new file mode 100644 index 0000000000000000000000000000000000000000..fd8ff10d8eba2b8c8125fa1365bc099c4b0c4807 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/tf2_msgs/TFMessage.h @@ -0,0 +1,64 @@ +#ifndef _ROS_tf2_msgs_TFMessage_h +#define _ROS_tf2_msgs_TFMessage_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/TransformStamped.h" + +namespace tf2_msgs +{ + + class TFMessage : public ros::Msg + { + public: + uint32_t transforms_length; + typedef geometry_msgs::TransformStamped _transforms_type; + _transforms_type st_transforms; + _transforms_type * transforms; + + TFMessage(): + transforms_length(0), transforms(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->transforms_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->transforms_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->transforms_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->transforms_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->transforms_length); + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->transforms[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t transforms_lengthT = ((uint32_t) (*(inbuffer + offset))); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->transforms_length); + if(transforms_lengthT > transforms_length) + this->transforms = (geometry_msgs::TransformStamped*)realloc(this->transforms, transforms_lengthT * sizeof(geometry_msgs::TransformStamped)); + transforms_length = transforms_lengthT; + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->st_transforms.deserialize(inbuffer + offset); + memcpy( &(this->transforms[i]), &(this->st_transforms), sizeof(geometry_msgs::TransformStamped)); + } + return offset; + } + + const char * getType(){ return "tf2_msgs/TFMessage"; }; + const char * getMD5(){ return "94810edda583a504dfda3829e70d7eec"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/theora_image_transport/Packet.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/theora_image_transport/Packet.h new file mode 100644 index 0000000000000000000000000000000000000000..b35e696a540f772581534be0d29d49e976eab98b --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/theora_image_transport/Packet.h @@ -0,0 +1,183 @@ +#ifndef _ROS_theora_image_transport_Packet_h +#define _ROS_theora_image_transport_Packet_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace theora_image_transport +{ + + class Packet : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t data_length; + typedef uint8_t _data_type; + _data_type st_data; + _data_type * data; + typedef int32_t _b_o_s_type; + _b_o_s_type b_o_s; + typedef int32_t _e_o_s_type; + _e_o_s_type e_o_s; + typedef int64_t _granulepos_type; + _granulepos_type granulepos; + typedef int64_t _packetno_type; + _packetno_type packetno; + + Packet(): + header(), + data_length(0), data(NULL), + b_o_s(0), + e_o_s(0), + granulepos(0), + packetno(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + union { + int32_t real; + uint32_t base; + } u_b_o_s; + u_b_o_s.real = this->b_o_s; + *(outbuffer + offset + 0) = (u_b_o_s.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_b_o_s.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_b_o_s.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_b_o_s.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->b_o_s); + union { + int32_t real; + uint32_t base; + } u_e_o_s; + u_e_o_s.real = this->e_o_s; + *(outbuffer + offset + 0) = (u_e_o_s.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_e_o_s.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_e_o_s.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_e_o_s.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->e_o_s); + union { + int64_t real; + uint64_t base; + } u_granulepos; + u_granulepos.real = this->granulepos; + *(outbuffer + offset + 0) = (u_granulepos.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_granulepos.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_granulepos.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_granulepos.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_granulepos.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_granulepos.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_granulepos.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_granulepos.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->granulepos); + union { + int64_t real; + uint64_t base; + } u_packetno; + u_packetno.real = this->packetno; + *(outbuffer + offset + 0) = (u_packetno.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_packetno.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_packetno.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_packetno.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_packetno.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_packetno.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_packetno.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_packetno.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->packetno); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint8_t*)realloc(this->data, data_lengthT * sizeof(uint8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint8_t)); + } + union { + int32_t real; + uint32_t base; + } u_b_o_s; + u_b_o_s.base = 0; + u_b_o_s.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_b_o_s.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_b_o_s.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_b_o_s.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->b_o_s = u_b_o_s.real; + offset += sizeof(this->b_o_s); + union { + int32_t real; + uint32_t base; + } u_e_o_s; + u_e_o_s.base = 0; + u_e_o_s.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_e_o_s.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_e_o_s.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_e_o_s.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->e_o_s = u_e_o_s.real; + offset += sizeof(this->e_o_s); + union { + int64_t real; + uint64_t base; + } u_granulepos; + u_granulepos.base = 0; + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->granulepos = u_granulepos.real; + offset += sizeof(this->granulepos); + union { + int64_t real; + uint64_t base; + } u_packetno; + u_packetno.base = 0; + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->packetno = u_packetno.real; + offset += sizeof(this->packetno); + return offset; + } + + const char * getType(){ return "theora_image_transport/Packet"; }; + const char * getMD5(){ return "33ac4e14a7cff32e7e0d65f18bb410f3"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/time.cpp b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/time.cpp new file mode 100644 index 0000000000000000000000000000000000000000..86221f9465940f7acb3131657a39aed293814869 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/time.cpp @@ -0,0 +1,70 @@ +/* + * 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. + */ + +#include "ros/time.h" + +namespace ros +{ +void normalizeSecNSec(uint32_t& sec, uint32_t& nsec) +{ + uint32_t nsec_part = nsec % 1000000000UL; + uint32_t sec_part = nsec / 1000000000UL; + sec += sec_part; + nsec = nsec_part; +} + +Time& Time::fromNSec(int32_t t) +{ + sec = t / 1000000000; + nsec = t % 1000000000; + normalizeSecNSec(sec, nsec); + return *this; +} + +Time& Time::operator +=(const Duration &rhs) +{ + sec += rhs.sec; + nsec += rhs.nsec; + normalizeSecNSec(sec, nsec); + return *this; +} + +Time& Time::operator -=(const Duration &rhs) +{ + sec += -rhs.sec; + nsec += -rhs.nsec; + normalizeSecNSec(sec, nsec); + return *this; +} +} diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/DemuxAdd.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/DemuxAdd.h new file mode 100644 index 0000000000000000000000000000000000000000..d8016c6b3be2ce47b0964355fb2ae14108fcae5e --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/DemuxAdd.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_DemuxAdd_h +#define _ROS_SERVICE_DemuxAdd_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char DEMUXADD[] = "topic_tools/DemuxAdd"; + + class DemuxAddRequest : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + + DemuxAddRequest(): + topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + return offset; + } + + const char * getType(){ return DEMUXADD; }; + const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; }; + + }; + + class DemuxAddResponse : public ros::Msg + { + public: + + DemuxAddResponse() + { + } + + 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 DEMUXADD; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class DemuxAdd { + public: + typedef DemuxAddRequest Request; + typedef DemuxAddResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/DemuxDelete.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/DemuxDelete.h new file mode 100644 index 0000000000000000000000000000000000000000..3f030aae4b640a778866bc9c21c0b2fb080c28e9 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/DemuxDelete.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_DemuxDelete_h +#define _ROS_SERVICE_DemuxDelete_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char DEMUXDELETE[] = "topic_tools/DemuxDelete"; + + class DemuxDeleteRequest : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + + DemuxDeleteRequest(): + topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + return offset; + } + + const char * getType(){ return DEMUXDELETE; }; + const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; }; + + }; + + class DemuxDeleteResponse : public ros::Msg + { + public: + + DemuxDeleteResponse() + { + } + + 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 DEMUXDELETE; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class DemuxDelete { + public: + typedef DemuxDeleteRequest Request; + typedef DemuxDeleteResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/DemuxList.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/DemuxList.h new file mode 100644 index 0000000000000000000000000000000000000000..05533298fa43da3e375c1dfdbdc22a2c375972e3 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/DemuxList.h @@ -0,0 +1,107 @@ +#ifndef _ROS_SERVICE_DemuxList_h +#define _ROS_SERVICE_DemuxList_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char DEMUXLIST[] = "topic_tools/DemuxList"; + + class DemuxListRequest : public ros::Msg + { + public: + + DemuxListRequest() + { + } + + 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 DEMUXLIST; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class DemuxListResponse : public ros::Msg + { + public: + uint32_t topics_length; + typedef char* _topics_type; + _topics_type st_topics; + _topics_type * topics; + + DemuxListResponse(): + topics_length(0), topics(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->topics_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->topics_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->topics_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->topics_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->topics_length); + for( uint32_t i = 0; i < topics_length; i++){ + uint32_t length_topicsi = strlen(this->topics[i]); + varToArr(outbuffer + offset, length_topicsi); + offset += 4; + memcpy(outbuffer + offset, this->topics[i], length_topicsi); + offset += length_topicsi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t topics_lengthT = ((uint32_t) (*(inbuffer + offset))); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->topics_length); + if(topics_lengthT > topics_length) + this->topics = (char**)realloc(this->topics, topics_lengthT * sizeof(char*)); + topics_length = topics_lengthT; + for( uint32_t i = 0; i < topics_length; i++){ + uint32_t length_st_topics; + arrToVar(length_st_topics, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_topics; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_topics-1]=0; + this->st_topics = (char *)(inbuffer + offset-1); + offset += length_st_topics; + memcpy( &(this->topics[i]), &(this->st_topics), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return DEMUXLIST; }; + const char * getMD5(){ return "b0eef9a05d4e829092fc2f2c3c2aad3d"; }; + + }; + + class DemuxList { + public: + typedef DemuxListRequest Request; + typedef DemuxListResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/DemuxSelect.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/DemuxSelect.h new file mode 100644 index 0000000000000000000000000000000000000000..17a6d9b2ceae2dc7f165ac1cd30ab38fc9c6d01f --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/DemuxSelect.h @@ -0,0 +1,104 @@ +#ifndef _ROS_SERVICE_DemuxSelect_h +#define _ROS_SERVICE_DemuxSelect_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char DEMUXSELECT[] = "topic_tools/DemuxSelect"; + + class DemuxSelectRequest : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + + DemuxSelectRequest(): + topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + return offset; + } + + const char * getType(){ return DEMUXSELECT; }; + const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; }; + + }; + + class DemuxSelectResponse : public ros::Msg + { + public: + typedef const char* _prev_topic_type; + _prev_topic_type prev_topic; + + DemuxSelectResponse(): + prev_topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_prev_topic = strlen(this->prev_topic); + varToArr(outbuffer + offset, length_prev_topic); + offset += 4; + memcpy(outbuffer + offset, this->prev_topic, length_prev_topic); + offset += length_prev_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_prev_topic; + arrToVar(length_prev_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_prev_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_prev_topic-1]=0; + this->prev_topic = (char *)(inbuffer + offset-1); + offset += length_prev_topic; + return offset; + } + + const char * getType(){ return DEMUXSELECT; }; + const char * getMD5(){ return "3db0a473debdbafea387c9e49358c320"; }; + + }; + + class DemuxSelect { + public: + typedef DemuxSelectRequest Request; + typedef DemuxSelectResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/MuxAdd.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/MuxAdd.h new file mode 100644 index 0000000000000000000000000000000000000000..25a649ad8fa1fe6b54d06df66ea5ad367d1546fa --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/MuxAdd.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_MuxAdd_h +#define _ROS_SERVICE_MuxAdd_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char MUXADD[] = "topic_tools/MuxAdd"; + + class MuxAddRequest : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + + MuxAddRequest(): + topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + return offset; + } + + const char * getType(){ return MUXADD; }; + const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; }; + + }; + + class MuxAddResponse : public ros::Msg + { + public: + + MuxAddResponse() + { + } + + 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 MUXADD; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class MuxAdd { + public: + typedef MuxAddRequest Request; + typedef MuxAddResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/MuxDelete.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/MuxDelete.h new file mode 100644 index 0000000000000000000000000000000000000000..3672ad57d2fab86d9d4d0d308f018d110271000c --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/MuxDelete.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_MuxDelete_h +#define _ROS_SERVICE_MuxDelete_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char MUXDELETE[] = "topic_tools/MuxDelete"; + + class MuxDeleteRequest : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + + MuxDeleteRequest(): + topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + return offset; + } + + const char * getType(){ return MUXDELETE; }; + const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; }; + + }; + + class MuxDeleteResponse : public ros::Msg + { + public: + + MuxDeleteResponse() + { + } + + 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 MUXDELETE; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class MuxDelete { + public: + typedef MuxDeleteRequest Request; + typedef MuxDeleteResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/MuxList.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/MuxList.h new file mode 100644 index 0000000000000000000000000000000000000000..5d7936d8501a1ef462133d8accc95d56296633fc --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/MuxList.h @@ -0,0 +1,107 @@ +#ifndef _ROS_SERVICE_MuxList_h +#define _ROS_SERVICE_MuxList_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char MUXLIST[] = "topic_tools/MuxList"; + + class MuxListRequest : public ros::Msg + { + public: + + MuxListRequest() + { + } + + 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 MUXLIST; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class MuxListResponse : public ros::Msg + { + public: + uint32_t topics_length; + typedef char* _topics_type; + _topics_type st_topics; + _topics_type * topics; + + MuxListResponse(): + topics_length(0), topics(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->topics_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->topics_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->topics_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->topics_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->topics_length); + for( uint32_t i = 0; i < topics_length; i++){ + uint32_t length_topicsi = strlen(this->topics[i]); + varToArr(outbuffer + offset, length_topicsi); + offset += 4; + memcpy(outbuffer + offset, this->topics[i], length_topicsi); + offset += length_topicsi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t topics_lengthT = ((uint32_t) (*(inbuffer + offset))); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->topics_length); + if(topics_lengthT > topics_length) + this->topics = (char**)realloc(this->topics, topics_lengthT * sizeof(char*)); + topics_length = topics_lengthT; + for( uint32_t i = 0; i < topics_length; i++){ + uint32_t length_st_topics; + arrToVar(length_st_topics, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_topics; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_topics-1]=0; + this->st_topics = (char *)(inbuffer + offset-1); + offset += length_st_topics; + memcpy( &(this->topics[i]), &(this->st_topics), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return MUXLIST; }; + const char * getMD5(){ return "b0eef9a05d4e829092fc2f2c3c2aad3d"; }; + + }; + + class MuxList { + public: + typedef MuxListRequest Request; + typedef MuxListResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/MuxSelect.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/MuxSelect.h new file mode 100644 index 0000000000000000000000000000000000000000..67324a85aafb78f8e22fdfe934a60e4a96729d94 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/topic_tools/MuxSelect.h @@ -0,0 +1,104 @@ +#ifndef _ROS_SERVICE_MuxSelect_h +#define _ROS_SERVICE_MuxSelect_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char MUXSELECT[] = "topic_tools/MuxSelect"; + + class MuxSelectRequest : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + + MuxSelectRequest(): + topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + return offset; + } + + const char * getType(){ return MUXSELECT; }; + const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; }; + + }; + + class MuxSelectResponse : public ros::Msg + { + public: + typedef const char* _prev_topic_type; + _prev_topic_type prev_topic; + + MuxSelectResponse(): + prev_topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_prev_topic = strlen(this->prev_topic); + varToArr(outbuffer + offset, length_prev_topic); + offset += 4; + memcpy(outbuffer + offset, this->prev_topic, length_prev_topic); + offset += length_prev_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_prev_topic; + arrToVar(length_prev_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_prev_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_prev_topic-1]=0; + this->prev_topic = (char *)(inbuffer + offset-1); + offset += length_prev_topic; + return offset; + } + + const char * getType(){ return MUXSELECT; }; + const char * getMD5(){ return "3db0a473debdbafea387c9e49358c320"; }; + + }; + + class MuxSelect { + public: + typedef MuxSelectRequest Request; + typedef MuxSelectResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/trajectory_msgs/JointTrajectory.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/trajectory_msgs/JointTrajectory.h new file mode 100644 index 0000000000000000000000000000000000000000..f03d5373eec7a5d022c683801114590bbfde5498 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/trajectory_msgs/JointTrajectory.h @@ -0,0 +1,107 @@ +#ifndef _ROS_trajectory_msgs_JointTrajectory_h +#define _ROS_trajectory_msgs_JointTrajectory_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "trajectory_msgs/JointTrajectoryPoint.h" + +namespace trajectory_msgs +{ + + class JointTrajectory : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t joint_names_length; + typedef char* _joint_names_type; + _joint_names_type st_joint_names; + _joint_names_type * joint_names; + uint32_t points_length; + typedef trajectory_msgs::JointTrajectoryPoint _points_type; + _points_type st_points; + _points_type * points; + + JointTrajectory(): + header(), + joint_names_length(0), joint_names(NULL), + points_length(0), points(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_names_length); + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_joint_namesi = strlen(this->joint_names[i]); + varToArr(outbuffer + offset, length_joint_namesi); + offset += 4; + memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); + offset += length_joint_namesi; + } + *(outbuffer + offset + 0) = (this->points_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->points_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->points_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->points_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->points_length); + for( uint32_t i = 0; i < points_length; i++){ + offset += this->points[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_names_length); + if(joint_names_lengthT > joint_names_length) + this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); + joint_names_length = joint_names_lengthT; + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_st_joint_names; + arrToVar(length_st_joint_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_joint_names-1]=0; + this->st_joint_names = (char *)(inbuffer + offset-1); + offset += length_st_joint_names; + memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); + } + uint32_t points_lengthT = ((uint32_t) (*(inbuffer + offset))); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->points_length); + if(points_lengthT > points_length) + this->points = (trajectory_msgs::JointTrajectoryPoint*)realloc(this->points, points_lengthT * sizeof(trajectory_msgs::JointTrajectoryPoint)); + points_length = points_lengthT; + for( uint32_t i = 0; i < points_length; i++){ + offset += this->st_points.deserialize(inbuffer + offset); + memcpy( &(this->points[i]), &(this->st_points), sizeof(trajectory_msgs::JointTrajectoryPoint)); + } + return offset; + } + + const char * getType(){ return "trajectory_msgs/JointTrajectory"; }; + const char * getMD5(){ return "65b4f94a94d1ed67169da35a02f33d3f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/trajectory_msgs/JointTrajectoryPoint.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/trajectory_msgs/JointTrajectoryPoint.h new file mode 100644 index 0000000000000000000000000000000000000000..dac669be42d38cbfbb7fd56c76bd2902de76b88f --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/trajectory_msgs/JointTrajectoryPoint.h @@ -0,0 +1,270 @@ +#ifndef _ROS_trajectory_msgs_JointTrajectoryPoint_h +#define _ROS_trajectory_msgs_JointTrajectoryPoint_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/duration.h" + +namespace trajectory_msgs +{ + + class JointTrajectoryPoint : public ros::Msg + { + public: + uint32_t positions_length; + typedef double _positions_type; + _positions_type st_positions; + _positions_type * positions; + uint32_t velocities_length; + typedef double _velocities_type; + _velocities_type st_velocities; + _velocities_type * velocities; + uint32_t accelerations_length; + typedef double _accelerations_type; + _accelerations_type st_accelerations; + _accelerations_type * accelerations; + uint32_t effort_length; + typedef double _effort_type; + _effort_type st_effort; + _effort_type * effort; + typedef ros::Duration _time_from_start_type; + _time_from_start_type time_from_start; + + JointTrajectoryPoint(): + positions_length(0), positions(NULL), + velocities_length(0), velocities(NULL), + accelerations_length(0), accelerations(NULL), + effort_length(0), effort(NULL), + time_from_start() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->positions_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->positions_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->positions_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->positions_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->positions_length); + for( uint32_t i = 0; i < positions_length; i++){ + union { + double real; + uint64_t base; + } u_positionsi; + u_positionsi.real = this->positions[i]; + *(outbuffer + offset + 0) = (u_positionsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_positionsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_positionsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_positionsi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_positionsi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_positionsi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_positionsi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_positionsi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->positions[i]); + } + *(outbuffer + offset + 0) = (this->velocities_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->velocities_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->velocities_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->velocities_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->velocities_length); + for( uint32_t i = 0; i < velocities_length; i++){ + union { + double real; + uint64_t base; + } u_velocitiesi; + u_velocitiesi.real = this->velocities[i]; + *(outbuffer + offset + 0) = (u_velocitiesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_velocitiesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_velocitiesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_velocitiesi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_velocitiesi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_velocitiesi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_velocitiesi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_velocitiesi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->velocities[i]); + } + *(outbuffer + offset + 0) = (this->accelerations_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->accelerations_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->accelerations_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->accelerations_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->accelerations_length); + for( uint32_t i = 0; i < accelerations_length; i++){ + union { + double real; + uint64_t base; + } u_accelerationsi; + u_accelerationsi.real = this->accelerations[i]; + *(outbuffer + offset + 0) = (u_accelerationsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_accelerationsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_accelerationsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_accelerationsi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_accelerationsi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_accelerationsi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_accelerationsi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_accelerationsi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->accelerations[i]); + } + *(outbuffer + offset + 0) = (this->effort_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->effort_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->effort_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->effort_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->effort_length); + for( uint32_t i = 0; i < effort_length; i++){ + union { + double real; + uint64_t base; + } u_efforti; + u_efforti.real = this->effort[i]; + *(outbuffer + offset + 0) = (u_efforti.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_efforti.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_efforti.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_efforti.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_efforti.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_efforti.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_efforti.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_efforti.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->effort[i]); + } + *(outbuffer + offset + 0) = (this->time_from_start.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_from_start.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_from_start.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_from_start.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_from_start.sec); + *(outbuffer + offset + 0) = (this->time_from_start.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_from_start.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_from_start.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_from_start.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_from_start.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t positions_lengthT = ((uint32_t) (*(inbuffer + offset))); + positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->positions_length); + if(positions_lengthT > positions_length) + this->positions = (double*)realloc(this->positions, positions_lengthT * sizeof(double)); + positions_length = positions_lengthT; + for( uint32_t i = 0; i < positions_length; i++){ + union { + double real; + uint64_t base; + } u_st_positions; + u_st_positions.base = 0; + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_positions = u_st_positions.real; + offset += sizeof(this->st_positions); + memcpy( &(this->positions[i]), &(this->st_positions), sizeof(double)); + } + uint32_t velocities_lengthT = ((uint32_t) (*(inbuffer + offset))); + velocities_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + velocities_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + velocities_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->velocities_length); + if(velocities_lengthT > velocities_length) + this->velocities = (double*)realloc(this->velocities, velocities_lengthT * sizeof(double)); + velocities_length = velocities_lengthT; + for( uint32_t i = 0; i < velocities_length; i++){ + union { + double real; + uint64_t base; + } u_st_velocities; + u_st_velocities.base = 0; + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_velocities = u_st_velocities.real; + offset += sizeof(this->st_velocities); + memcpy( &(this->velocities[i]), &(this->st_velocities), sizeof(double)); + } + uint32_t accelerations_lengthT = ((uint32_t) (*(inbuffer + offset))); + accelerations_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + accelerations_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + accelerations_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->accelerations_length); + if(accelerations_lengthT > accelerations_length) + this->accelerations = (double*)realloc(this->accelerations, accelerations_lengthT * sizeof(double)); + accelerations_length = accelerations_lengthT; + for( uint32_t i = 0; i < accelerations_length; i++){ + union { + double real; + uint64_t base; + } u_st_accelerations; + u_st_accelerations.base = 0; + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_accelerations = u_st_accelerations.real; + offset += sizeof(this->st_accelerations); + memcpy( &(this->accelerations[i]), &(this->st_accelerations), sizeof(double)); + } + uint32_t effort_lengthT = ((uint32_t) (*(inbuffer + offset))); + effort_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + effort_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + effort_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->effort_length); + if(effort_lengthT > effort_length) + this->effort = (double*)realloc(this->effort, effort_lengthT * sizeof(double)); + effort_length = effort_lengthT; + for( uint32_t i = 0; i < effort_length; i++){ + union { + double real; + uint64_t base; + } u_st_effort; + u_st_effort.base = 0; + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_effort = u_st_effort.real; + offset += sizeof(this->st_effort); + memcpy( &(this->effort[i]), &(this->st_effort), sizeof(double)); + } + this->time_from_start.sec = ((uint32_t) (*(inbuffer + offset))); + this->time_from_start.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_from_start.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_from_start.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_from_start.sec); + this->time_from_start.nsec = ((uint32_t) (*(inbuffer + offset))); + this->time_from_start.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_from_start.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_from_start.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_from_start.nsec); + return offset; + } + + const char * getType(){ return "trajectory_msgs/JointTrajectoryPoint"; }; + const char * getMD5(){ return "f3cd1e1c4d320c79d6985c904ae5dcd3"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/trajectory_msgs/MultiDOFJointTrajectory.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/trajectory_msgs/MultiDOFJointTrajectory.h new file mode 100644 index 0000000000000000000000000000000000000000..2ab653c72856477147a03c7419198ddad4a72920 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/trajectory_msgs/MultiDOFJointTrajectory.h @@ -0,0 +1,107 @@ +#ifndef _ROS_trajectory_msgs_MultiDOFJointTrajectory_h +#define _ROS_trajectory_msgs_MultiDOFJointTrajectory_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "trajectory_msgs/MultiDOFJointTrajectoryPoint.h" + +namespace trajectory_msgs +{ + + class MultiDOFJointTrajectory : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t joint_names_length; + typedef char* _joint_names_type; + _joint_names_type st_joint_names; + _joint_names_type * joint_names; + uint32_t points_length; + typedef trajectory_msgs::MultiDOFJointTrajectoryPoint _points_type; + _points_type st_points; + _points_type * points; + + MultiDOFJointTrajectory(): + header(), + joint_names_length(0), joint_names(NULL), + points_length(0), points(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_names_length); + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_joint_namesi = strlen(this->joint_names[i]); + varToArr(outbuffer + offset, length_joint_namesi); + offset += 4; + memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); + offset += length_joint_namesi; + } + *(outbuffer + offset + 0) = (this->points_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->points_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->points_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->points_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->points_length); + for( uint32_t i = 0; i < points_length; i++){ + offset += this->points[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_names_length); + if(joint_names_lengthT > joint_names_length) + this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); + joint_names_length = joint_names_lengthT; + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_st_joint_names; + arrToVar(length_st_joint_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_joint_names-1]=0; + this->st_joint_names = (char *)(inbuffer + offset-1); + offset += length_st_joint_names; + memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); + } + uint32_t points_lengthT = ((uint32_t) (*(inbuffer + offset))); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->points_length); + if(points_lengthT > points_length) + this->points = (trajectory_msgs::MultiDOFJointTrajectoryPoint*)realloc(this->points, points_lengthT * sizeof(trajectory_msgs::MultiDOFJointTrajectoryPoint)); + points_length = points_lengthT; + for( uint32_t i = 0; i < points_length; i++){ + offset += this->st_points.deserialize(inbuffer + offset); + memcpy( &(this->points[i]), &(this->st_points), sizeof(trajectory_msgs::MultiDOFJointTrajectoryPoint)); + } + return offset; + } + + const char * getType(){ return "trajectory_msgs/MultiDOFJointTrajectory"; }; + const char * getMD5(){ return "ef145a45a5f47b77b7f5cdde4b16c942"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/trajectory_msgs/MultiDOFJointTrajectoryPoint.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/trajectory_msgs/MultiDOFJointTrajectoryPoint.h new file mode 100644 index 0000000000000000000000000000000000000000..88b4564e28d54b46c78d25c13ef46c57fae43c8b --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/trajectory_msgs/MultiDOFJointTrajectoryPoint.h @@ -0,0 +1,139 @@ +#ifndef _ROS_trajectory_msgs_MultiDOFJointTrajectoryPoint_h +#define _ROS_trajectory_msgs_MultiDOFJointTrajectoryPoint_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Transform.h" +#include "geometry_msgs/Twist.h" +#include "ros/duration.h" + +namespace trajectory_msgs +{ + + class MultiDOFJointTrajectoryPoint : public ros::Msg + { + public: + uint32_t transforms_length; + typedef geometry_msgs::Transform _transforms_type; + _transforms_type st_transforms; + _transforms_type * transforms; + uint32_t velocities_length; + typedef geometry_msgs::Twist _velocities_type; + _velocities_type st_velocities; + _velocities_type * velocities; + uint32_t accelerations_length; + typedef geometry_msgs::Twist _accelerations_type; + _accelerations_type st_accelerations; + _accelerations_type * accelerations; + typedef ros::Duration _time_from_start_type; + _time_from_start_type time_from_start; + + MultiDOFJointTrajectoryPoint(): + transforms_length(0), transforms(NULL), + velocities_length(0), velocities(NULL), + accelerations_length(0), accelerations(NULL), + time_from_start() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->transforms_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->transforms_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->transforms_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->transforms_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->transforms_length); + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->transforms[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->velocities_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->velocities_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->velocities_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->velocities_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->velocities_length); + for( uint32_t i = 0; i < velocities_length; i++){ + offset += this->velocities[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->accelerations_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->accelerations_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->accelerations_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->accelerations_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->accelerations_length); + for( uint32_t i = 0; i < accelerations_length; i++){ + offset += this->accelerations[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->time_from_start.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_from_start.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_from_start.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_from_start.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_from_start.sec); + *(outbuffer + offset + 0) = (this->time_from_start.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_from_start.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_from_start.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_from_start.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_from_start.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t transforms_lengthT = ((uint32_t) (*(inbuffer + offset))); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->transforms_length); + if(transforms_lengthT > transforms_length) + this->transforms = (geometry_msgs::Transform*)realloc(this->transforms, transforms_lengthT * sizeof(geometry_msgs::Transform)); + transforms_length = transforms_lengthT; + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->st_transforms.deserialize(inbuffer + offset); + memcpy( &(this->transforms[i]), &(this->st_transforms), sizeof(geometry_msgs::Transform)); + } + uint32_t velocities_lengthT = ((uint32_t) (*(inbuffer + offset))); + velocities_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + velocities_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + velocities_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->velocities_length); + if(velocities_lengthT > velocities_length) + this->velocities = (geometry_msgs::Twist*)realloc(this->velocities, velocities_lengthT * sizeof(geometry_msgs::Twist)); + velocities_length = velocities_lengthT; + for( uint32_t i = 0; i < velocities_length; i++){ + offset += this->st_velocities.deserialize(inbuffer + offset); + memcpy( &(this->velocities[i]), &(this->st_velocities), sizeof(geometry_msgs::Twist)); + } + uint32_t accelerations_lengthT = ((uint32_t) (*(inbuffer + offset))); + accelerations_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + accelerations_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + accelerations_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->accelerations_length); + if(accelerations_lengthT > accelerations_length) + this->accelerations = (geometry_msgs::Twist*)realloc(this->accelerations, accelerations_lengthT * sizeof(geometry_msgs::Twist)); + accelerations_length = accelerations_lengthT; + for( uint32_t i = 0; i < accelerations_length; i++){ + offset += this->st_accelerations.deserialize(inbuffer + offset); + memcpy( &(this->accelerations[i]), &(this->st_accelerations), sizeof(geometry_msgs::Twist)); + } + this->time_from_start.sec = ((uint32_t) (*(inbuffer + offset))); + this->time_from_start.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_from_start.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_from_start.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_from_start.sec); + this->time_from_start.nsec = ((uint32_t) (*(inbuffer + offset))); + this->time_from_start.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_from_start.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_from_start.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_from_start.nsec); + return offset; + } + + const char * getType(){ return "trajectory_msgs/MultiDOFJointTrajectoryPoint"; }; + const char * getMD5(){ return "3ebe08d1abd5b65862d50e09430db776"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeAction.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeAction.h new file mode 100644 index 0000000000000000000000000000000000000000..f100e9ae652ac1761b33bf184c1db44a3c2e23a7 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_turtle_actionlib_ShapeAction_h +#define _ROS_turtle_actionlib_ShapeAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "turtle_actionlib/ShapeActionGoal.h" +#include "turtle_actionlib/ShapeActionResult.h" +#include "turtle_actionlib/ShapeActionFeedback.h" + +namespace turtle_actionlib +{ + + class ShapeAction : public ros::Msg + { + public: + typedef turtle_actionlib::ShapeActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef turtle_actionlib::ShapeActionResult _action_result_type; + _action_result_type action_result; + typedef turtle_actionlib::ShapeActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + ShapeAction(): + 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 "turtle_actionlib/ShapeAction"; }; + const char * getMD5(){ return "d73b17d6237a925511f5d7727a1dc903"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeActionFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..b57b28c3569bb7686288e96de331520af7b7b0d1 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_turtle_actionlib_ShapeActionFeedback_h +#define _ROS_turtle_actionlib_ShapeActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "turtle_actionlib/ShapeFeedback.h" + +namespace turtle_actionlib +{ + + class ShapeActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef turtle_actionlib::ShapeFeedback _feedback_type; + _feedback_type feedback; + + ShapeActionFeedback(): + 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 "turtle_actionlib/ShapeActionFeedback"; }; + const char * getMD5(){ return "aae20e09065c3809e8a8e87c4c8953fd"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeActionGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..732215e4f56c463a32bfcde4d0485511d2bf4893 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_turtle_actionlib_ShapeActionGoal_h +#define _ROS_turtle_actionlib_ShapeActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "turtle_actionlib/ShapeGoal.h" + +namespace turtle_actionlib +{ + + class ShapeActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef turtle_actionlib::ShapeGoal _goal_type; + _goal_type goal; + + ShapeActionGoal(): + 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 "turtle_actionlib/ShapeActionGoal"; }; + const char * getMD5(){ return "dbfccd187f2ec9c593916447ffd6cc77"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeActionResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..b4e4213d00a713411d6a7ac52ff101ae362521a1 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_turtle_actionlib_ShapeActionResult_h +#define _ROS_turtle_actionlib_ShapeActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "turtle_actionlib/ShapeResult.h" + +namespace turtle_actionlib +{ + + class ShapeActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef turtle_actionlib::ShapeResult _result_type; + _result_type result; + + ShapeActionResult(): + 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 "turtle_actionlib/ShapeActionResult"; }; + const char * getMD5(){ return "c8d13d5d140f1047a2e4d3bf5c045822"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..6c00c073a29dbc79e2ac4684b25cce7e593811e6 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeFeedback.h @@ -0,0 +1,38 @@ +#ifndef _ROS_turtle_actionlib_ShapeFeedback_h +#define _ROS_turtle_actionlib_ShapeFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtle_actionlib +{ + + class ShapeFeedback : public ros::Msg + { + public: + + ShapeFeedback() + { + } + + 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 "turtle_actionlib/ShapeFeedback"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeGoal.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..bb72d11ed8a1890563a2d5418f99bdb7cb52cce5 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeGoal.h @@ -0,0 +1,86 @@ +#ifndef _ROS_turtle_actionlib_ShapeGoal_h +#define _ROS_turtle_actionlib_ShapeGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtle_actionlib +{ + + class ShapeGoal : public ros::Msg + { + public: + typedef int32_t _edges_type; + _edges_type edges; + typedef float _radius_type; + _radius_type radius; + + ShapeGoal(): + edges(0), + radius(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int32_t real; + uint32_t base; + } u_edges; + u_edges.real = this->edges; + *(outbuffer + offset + 0) = (u_edges.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_edges.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_edges.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_edges.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->edges); + union { + float real; + uint32_t base; + } u_radius; + u_radius.real = this->radius; + *(outbuffer + offset + 0) = (u_radius.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_radius.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_radius.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_radius.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->radius); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int32_t real; + uint32_t base; + } u_edges; + u_edges.base = 0; + u_edges.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_edges.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_edges.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_edges.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->edges = u_edges.real; + offset += sizeof(this->edges); + union { + float real; + uint32_t base; + } u_radius; + u_radius.base = 0; + u_radius.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_radius.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_radius.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_radius.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->radius = u_radius.real; + offset += sizeof(this->radius); + return offset; + } + + const char * getType(){ return "turtle_actionlib/ShapeGoal"; }; + const char * getMD5(){ return "3b9202ab7292cebe5a95ab2bf6b9c091"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeResult.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeResult.h new file mode 100644 index 0000000000000000000000000000000000000000..2a9127d8804c634ee2e0c93c319388b3f7299cd0 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/ShapeResult.h @@ -0,0 +1,86 @@ +#ifndef _ROS_turtle_actionlib_ShapeResult_h +#define _ROS_turtle_actionlib_ShapeResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtle_actionlib +{ + + class ShapeResult : public ros::Msg + { + public: + typedef float _interior_angle_type; + _interior_angle_type interior_angle; + typedef float _apothem_type; + _apothem_type apothem; + + ShapeResult(): + interior_angle(0), + apothem(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_interior_angle; + u_interior_angle.real = this->interior_angle; + *(outbuffer + offset + 0) = (u_interior_angle.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_interior_angle.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_interior_angle.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_interior_angle.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->interior_angle); + union { + float real; + uint32_t base; + } u_apothem; + u_apothem.real = this->apothem; + *(outbuffer + offset + 0) = (u_apothem.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_apothem.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_apothem.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_apothem.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->apothem); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_interior_angle; + u_interior_angle.base = 0; + u_interior_angle.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_interior_angle.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_interior_angle.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_interior_angle.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->interior_angle = u_interior_angle.real; + offset += sizeof(this->interior_angle); + union { + float real; + uint32_t base; + } u_apothem; + u_apothem.base = 0; + u_apothem.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_apothem.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_apothem.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_apothem.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->apothem = u_apothem.real; + offset += sizeof(this->apothem); + return offset; + } + + const char * getType(){ return "turtle_actionlib/ShapeResult"; }; + const char * getMD5(){ return "b06c6e2225f820dbc644270387cd1a7c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/Velocity.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/Velocity.h new file mode 100644 index 0000000000000000000000000000000000000000..ab7141effc3f2c8815f22d1fb540bf6b8db17b71 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtle_actionlib/Velocity.h @@ -0,0 +1,86 @@ +#ifndef _ROS_turtle_actionlib_Velocity_h +#define _ROS_turtle_actionlib_Velocity_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtle_actionlib +{ + + class Velocity : public ros::Msg + { + public: + typedef float _linear_type; + _linear_type linear; + typedef float _angular_type; + _angular_type angular; + + Velocity(): + linear(0), + angular(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_linear; + u_linear.real = this->linear; + *(outbuffer + offset + 0) = (u_linear.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_linear.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_linear.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_linear.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->linear); + union { + float real; + uint32_t base; + } u_angular; + u_angular.real = this->angular; + *(outbuffer + offset + 0) = (u_angular.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angular.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angular.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angular.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angular); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_linear; + u_linear.base = 0; + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->linear = u_linear.real; + offset += sizeof(this->linear); + union { + float real; + uint32_t base; + } u_angular; + u_angular.base = 0; + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angular = u_angular.real; + offset += sizeof(this->angular); + return offset; + } + + const char * getType(){ return "turtle_actionlib/Velocity"; }; + const char * getMD5(){ return "9d5c2dcd348ac8f76ce2a4307bd63a13"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/MotorPower.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/MotorPower.h new file mode 100644 index 0000000000000000000000000000000000000000..a22dc41ad20c32c319ba1fff21dc67a32b94653a --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/MotorPower.h @@ -0,0 +1,47 @@ +#ifndef _ROS_turtlebot3_msgs_MotorPower_h +#define _ROS_turtlebot3_msgs_MotorPower_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtlebot3_msgs +{ + + class MotorPower : public ros::Msg + { + public: + typedef uint8_t _state_type; + _state_type state; + enum { OFF = 0 }; + enum { ON = 1 }; + + MotorPower(): + state(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->state >> (8 * 0)) & 0xFF; + offset += sizeof(this->state); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->state = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->state); + return offset; + } + + const char * getType(){ return "turtlebot3_msgs/MotorPower"; }; + const char * getMD5(){ return "8f77c0161e0f2021493136bb5f3f0e51"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/PanoramaImg.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/PanoramaImg.h new file mode 100644 index 0000000000000000000000000000000000000000..7d29869a7755fd6e0bb39d18ddbfe30dda3e6822 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/PanoramaImg.h @@ -0,0 +1,180 @@ +#ifndef _ROS_turtlebot3_msgs_PanoramaImg_h +#define _ROS_turtlebot3_msgs_PanoramaImg_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/Image.h" + +namespace turtlebot3_msgs +{ + + class PanoramaImg : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _pano_id_type; + _pano_id_type pano_id; + typedef double _latitude_type; + _latitude_type latitude; + typedef double _longitude_type; + _longitude_type longitude; + typedef double _heading_type; + _heading_type heading; + typedef const char* _geo_tag_type; + _geo_tag_type geo_tag; + typedef sensor_msgs::Image _image_type; + _image_type image; + + PanoramaImg(): + header(), + pano_id(""), + latitude(0), + longitude(0), + heading(0), + geo_tag(""), + image() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_pano_id = strlen(this->pano_id); + varToArr(outbuffer + offset, length_pano_id); + offset += 4; + memcpy(outbuffer + offset, this->pano_id, length_pano_id); + offset += length_pano_id; + union { + double real; + uint64_t base; + } u_latitude; + u_latitude.real = this->latitude; + *(outbuffer + offset + 0) = (u_latitude.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_latitude.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_latitude.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_latitude.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_latitude.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_latitude.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_latitude.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_latitude.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->latitude); + union { + double real; + uint64_t base; + } u_longitude; + u_longitude.real = this->longitude; + *(outbuffer + offset + 0) = (u_longitude.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_longitude.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_longitude.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_longitude.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_longitude.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_longitude.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_longitude.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_longitude.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->longitude); + union { + double real; + uint64_t base; + } u_heading; + u_heading.real = this->heading; + *(outbuffer + offset + 0) = (u_heading.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_heading.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_heading.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_heading.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_heading.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_heading.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_heading.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_heading.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->heading); + uint32_t length_geo_tag = strlen(this->geo_tag); + varToArr(outbuffer + offset, length_geo_tag); + offset += 4; + memcpy(outbuffer + offset, this->geo_tag, length_geo_tag); + offset += length_geo_tag; + offset += this->image.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_pano_id; + arrToVar(length_pano_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_pano_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_pano_id-1]=0; + this->pano_id = (char *)(inbuffer + offset-1); + offset += length_pano_id; + union { + double real; + uint64_t base; + } u_latitude; + u_latitude.base = 0; + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->latitude = u_latitude.real; + offset += sizeof(this->latitude); + union { + double real; + uint64_t base; + } u_longitude; + u_longitude.base = 0; + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->longitude = u_longitude.real; + offset += sizeof(this->longitude); + union { + double real; + uint64_t base; + } u_heading; + u_heading.base = 0; + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->heading = u_heading.real; + offset += sizeof(this->heading); + uint32_t length_geo_tag; + arrToVar(length_geo_tag, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_geo_tag; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_geo_tag-1]=0; + this->geo_tag = (char *)(inbuffer + offset-1); + offset += length_geo_tag; + offset += this->image.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "turtlebot3_msgs/PanoramaImg"; }; + const char * getMD5(){ return "aedf66295b374a7249a786af27aecc87"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/SensorState.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/SensorState.h new file mode 100644 index 0000000000000000000000000000000000000000..34b624ab9751a80939c7475d87fd516b65c32ffe --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/SensorState.h @@ -0,0 +1,166 @@ +#ifndef _ROS_turtlebot3_msgs_SensorState_h +#define _ROS_turtlebot3_msgs_SensorState_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../ros/time.h" + +namespace turtlebot3_msgs +{ + + class SensorState : public ros::Msg + { + public: + typedef ros::Time _stamp_type; + _stamp_type stamp; + typedef uint8_t _bumper_type; + _bumper_type bumper; + typedef uint8_t _cliff_type; + _cliff_type cliff; + typedef uint8_t _button_type; + _button_type button; + typedef int32_t _left_encoder_type; + _left_encoder_type left_encoder; + typedef int32_t _right_encoder_type; + _right_encoder_type right_encoder; + typedef float _battery_type; + _battery_type battery; + enum { BUMPER_RIGHT = 1 }; + enum { BUMPER_CENTER = 2 }; + enum { BUMPER_LEFT = 4 }; + enum { CLIFF_RIGHT = 1 }; + enum { CLIFF_CENTER = 2 }; + enum { CLIFF_LEFT = 4 }; + enum { BUTTON0 = 1 }; + enum { BUTTON1 = 2 }; + enum { BUTTON2 = 4 }; + enum { ERROR_LEFT_MOTOR = 1 }; + enum { ERROR_RIGHT_MOTOR = 2 }; + + SensorState(): + stamp(), + bumper(0), + cliff(0), + button(0), + left_encoder(0), + right_encoder(0), + battery(0) + { + } + + 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); + *(outbuffer + offset + 0) = (this->bumper >> (8 * 0)) & 0xFF; + offset += sizeof(this->bumper); + *(outbuffer + offset + 0) = (this->cliff >> (8 * 0)) & 0xFF; + offset += sizeof(this->cliff); + *(outbuffer + offset + 0) = (this->button >> (8 * 0)) & 0xFF; + offset += sizeof(this->button); + union { + int32_t real; + uint32_t base; + } u_left_encoder; + u_left_encoder.real = this->left_encoder; + *(outbuffer + offset + 0) = (u_left_encoder.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_left_encoder.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_left_encoder.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_left_encoder.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->left_encoder); + union { + int32_t real; + uint32_t base; + } u_right_encoder; + u_right_encoder.real = this->right_encoder; + *(outbuffer + offset + 0) = (u_right_encoder.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_right_encoder.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_right_encoder.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_right_encoder.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->right_encoder); + union { + float real; + uint32_t base; + } u_battery; + u_battery.real = this->battery; + *(outbuffer + offset + 0) = (u_battery.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_battery.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_battery.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_battery.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->battery); + 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); + this->bumper = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->bumper); + this->cliff = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->cliff); + this->button = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->button); + union { + int32_t real; + uint32_t base; + } u_left_encoder; + u_left_encoder.base = 0; + u_left_encoder.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_left_encoder.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_left_encoder.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_left_encoder.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->left_encoder = u_left_encoder.real; + offset += sizeof(this->left_encoder); + union { + int32_t real; + uint32_t base; + } u_right_encoder; + u_right_encoder.base = 0; + u_right_encoder.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_right_encoder.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_right_encoder.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_right_encoder.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->right_encoder = u_right_encoder.real; + offset += sizeof(this->right_encoder); + union { + float real; + uint32_t base; + } u_battery; + u_battery.base = 0; + u_battery.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_battery.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_battery.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_battery.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->battery = u_battery.real; + offset += sizeof(this->battery); + return offset; + } + + const char * getType(){ return "turtlebot3_msgs/SensorState"; }; + const char * getMD5(){ return "427f77f85da38bc1aa3f65ffb673c94c"; }; + + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/SetFollowState.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/SetFollowState.h new file mode 100644 index 0000000000000000000000000000000000000000..cb16e5cdaca0e2fff97ad52acad4a631c46c60ca --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/SetFollowState.h @@ -0,0 +1,88 @@ +#ifndef _ROS_SERVICE_SetFollowState_h +#define _ROS_SERVICE_SetFollowState_h +#include +#include +#include +#include "ros/msg.h" + +namespace turtlebot3_msgs +{ + +static const char SETFOLLOWSTATE[] = "turtlebot3_msgs/SetFollowState"; + + class SetFollowStateRequest : public ros::Msg + { + public: + typedef uint8_t _state_type; + _state_type state; + enum { STOPPED = 0 }; + enum { FOLLOW = 1 }; + + SetFollowStateRequest(): + state(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->state >> (8 * 0)) & 0xFF; + offset += sizeof(this->state); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->state = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->state); + return offset; + } + + const char * getType(){ return SETFOLLOWSTATE; }; + const char * getMD5(){ return "92b912c48c68248015bb32deb0bf7713"; }; + + }; + + class SetFollowStateResponse : public ros::Msg + { + public: + typedef uint8_t _result_type; + _result_type result; + enum { OK = 0 }; + enum { ERROR = 1 }; + + SetFollowStateResponse(): + result(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->result >> (8 * 0)) & 0xFF; + offset += sizeof(this->result); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->result = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->result); + return offset; + } + + const char * getType(){ return SETFOLLOWSTATE; }; + const char * getMD5(){ return "37065417175a2f4a49100bc798e5ee49"; }; + + }; + + class SetFollowState { + public: + typedef SetFollowStateRequest Request; + typedef SetFollowStateResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/TakePanorama.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/TakePanorama.h new file mode 100644 index 0000000000000000000000000000000000000000..4adde3721add99eccb02d19e1eeeaddcd3c388e1 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/TakePanorama.h @@ -0,0 +1,162 @@ +#ifndef _ROS_SERVICE_TakePanorama_h +#define _ROS_SERVICE_TakePanorama_h +#include +#include +#include +#include "ros/msg.h" + +namespace turtlebot3_msgs +{ + +static const char TAKEPANORAMA[] = "turtlebot3_msgs/TakePanorama"; + + class TakePanoramaRequest : public ros::Msg + { + public: + typedef uint8_t _mode_type; + _mode_type mode; + typedef float _pano_angle_type; + _pano_angle_type pano_angle; + typedef float _snap_interval_type; + _snap_interval_type snap_interval; + typedef float _rot_vel_type; + _rot_vel_type rot_vel; + enum { SNAPANDROTATE = 0 }; + enum { CONTINUOUS = 1 }; + enum { STOP = 2 }; + + TakePanoramaRequest(): + mode(0), + pano_angle(0), + snap_interval(0), + rot_vel(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->mode >> (8 * 0)) & 0xFF; + offset += sizeof(this->mode); + union { + float real; + uint32_t base; + } u_pano_angle; + u_pano_angle.real = this->pano_angle; + *(outbuffer + offset + 0) = (u_pano_angle.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_pano_angle.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_pano_angle.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_pano_angle.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->pano_angle); + union { + float real; + uint32_t base; + } u_snap_interval; + u_snap_interval.real = this->snap_interval; + *(outbuffer + offset + 0) = (u_snap_interval.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_snap_interval.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_snap_interval.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_snap_interval.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->snap_interval); + union { + float real; + uint32_t base; + } u_rot_vel; + u_rot_vel.real = this->rot_vel; + *(outbuffer + offset + 0) = (u_rot_vel.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_rot_vel.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_rot_vel.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_rot_vel.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->rot_vel); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->mode = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->mode); + union { + float real; + uint32_t base; + } u_pano_angle; + u_pano_angle.base = 0; + u_pano_angle.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_pano_angle.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_pano_angle.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_pano_angle.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->pano_angle = u_pano_angle.real; + offset += sizeof(this->pano_angle); + union { + float real; + uint32_t base; + } u_snap_interval; + u_snap_interval.base = 0; + u_snap_interval.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_snap_interval.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_snap_interval.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_snap_interval.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->snap_interval = u_snap_interval.real; + offset += sizeof(this->snap_interval); + union { + float real; + uint32_t base; + } u_rot_vel; + u_rot_vel.base = 0; + u_rot_vel.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_rot_vel.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_rot_vel.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_rot_vel.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->rot_vel = u_rot_vel.real; + offset += sizeof(this->rot_vel); + return offset; + } + + const char * getType(){ return TAKEPANORAMA; }; + const char * getMD5(){ return "f52c694c82704221735cc576c7587ecc"; }; + + }; + + class TakePanoramaResponse : public ros::Msg + { + public: + typedef uint8_t _status_type; + _status_type status; + enum { STARTED = 0 }; + enum { IN_PROGRESS = 1 }; + enum { STOPPED = 2 }; + + TakePanoramaResponse(): + status(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->status >> (8 * 0)) & 0xFF; + offset += sizeof(this->status); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->status = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->status); + return offset; + } + + const char * getType(){ return TAKEPANORAMA; }; + const char * getMD5(){ return "1ebe3e03b034aa9578d367d7cf6ed627"; }; + + }; + + class TakePanorama { + public: + typedef TakePanoramaRequest Request; + typedef TakePanoramaResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/VersionInfo.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/VersionInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..3d81b30c650570f10d881aecf86f3ff39b82d3bb --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlebot3_msgs/VersionInfo.h @@ -0,0 +1,89 @@ +#ifndef _ROS_turtlebot3_msgs_VersionInfo_h +#define _ROS_turtlebot3_msgs_VersionInfo_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtlebot3_msgs +{ + + class VersionInfo : public ros::Msg + { + public: + typedef const char* _hardware_type; + _hardware_type hardware; + typedef const char* _firmware_type; + _firmware_type firmware; + typedef const char* _software_type; + _software_type software; + + VersionInfo(): + hardware(""), + firmware(""), + software("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_hardware = strlen(this->hardware); + varToArr(outbuffer + offset, length_hardware); + offset += 4; + memcpy(outbuffer + offset, this->hardware, length_hardware); + offset += length_hardware; + uint32_t length_firmware = strlen(this->firmware); + varToArr(outbuffer + offset, length_firmware); + offset += 4; + memcpy(outbuffer + offset, this->firmware, length_firmware); + offset += length_firmware; + uint32_t length_software = strlen(this->software); + varToArr(outbuffer + offset, length_software); + offset += 4; + memcpy(outbuffer + offset, this->software, length_software); + offset += length_software; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_hardware; + arrToVar(length_hardware, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_hardware; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_hardware-1]=0; + this->hardware = (char *)(inbuffer + offset-1); + offset += length_hardware; + uint32_t length_firmware; + arrToVar(length_firmware, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_firmware; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_firmware-1]=0; + this->firmware = (char *)(inbuffer + offset-1); + offset += length_firmware; + uint32_t length_software; + arrToVar(length_software, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_software; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_software-1]=0; + this->software = (char *)(inbuffer + offset-1); + offset += length_software; + return offset; + } + + const char * getType(){ return "turtlebot3_msgs/VersionInfo"; }; + const char * getMD5(){ return "43e0361461af2970a33107409403ef3c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlesim/Color.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlesim/Color.h new file mode 100644 index 0000000000000000000000000000000000000000..de802907bd3c787692d47611bee45ba7ea25da46 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlesim/Color.h @@ -0,0 +1,59 @@ +#ifndef _ROS_turtlesim_Color_h +#define _ROS_turtlesim_Color_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtlesim +{ + + class Color : public ros::Msg + { + public: + typedef uint8_t _r_type; + _r_type r; + typedef uint8_t _g_type; + _g_type g; + typedef uint8_t _b_type; + _b_type b; + + Color(): + r(0), + g(0), + b(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->r >> (8 * 0)) & 0xFF; + offset += sizeof(this->r); + *(outbuffer + offset + 0) = (this->g >> (8 * 0)) & 0xFF; + offset += sizeof(this->g); + *(outbuffer + offset + 0) = (this->b >> (8 * 0)) & 0xFF; + offset += sizeof(this->b); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->r = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->r); + this->g = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->g); + this->b = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->b); + return offset; + } + + const char * getType(){ return "turtlesim/Color"; }; + const char * getMD5(){ return "353891e354491c51aabe32df673fb446"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlesim/Kill.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlesim/Kill.h new file mode 100644 index 0000000000000000000000000000000000000000..086f2bbd01569bec4341a6f9ca65228806723fae --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlesim/Kill.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_Kill_h +#define _ROS_SERVICE_Kill_h +#include +#include +#include +#include "ros/msg.h" + +namespace turtlesim +{ + +static const char KILL[] = "turtlesim/Kill"; + + class KillRequest : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + + KillRequest(): + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return KILL; }; + const char * getMD5(){ return "c1f3d28f1b044c871e6eff2e9fc3c667"; }; + + }; + + class KillResponse : public ros::Msg + { + public: + + KillResponse() + { + } + + 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 KILL; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class Kill { + public: + typedef KillRequest Request; + typedef KillResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlesim/Pose.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlesim/Pose.h new file mode 100644 index 0000000000000000000000000000000000000000..7dede410337f904c20040c565f061c40ea597257 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlesim/Pose.h @@ -0,0 +1,158 @@ +#ifndef _ROS_turtlesim_Pose_h +#define _ROS_turtlesim_Pose_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtlesim +{ + + class Pose : public ros::Msg + { + public: + typedef float _x_type; + _x_type x; + typedef float _y_type; + _y_type y; + typedef float _theta_type; + _theta_type theta; + typedef float _linear_velocity_type; + _linear_velocity_type linear_velocity; + typedef float _angular_velocity_type; + _angular_velocity_type angular_velocity; + + Pose(): + x(0), + y(0), + theta(0), + linear_velocity(0), + angular_velocity(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_theta; + u_theta.real = this->theta; + *(outbuffer + offset + 0) = (u_theta.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_theta.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_theta.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_theta.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->theta); + union { + float real; + uint32_t base; + } u_linear_velocity; + u_linear_velocity.real = this->linear_velocity; + *(outbuffer + offset + 0) = (u_linear_velocity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_linear_velocity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_linear_velocity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_linear_velocity.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->linear_velocity); + union { + float real; + uint32_t base; + } u_angular_velocity; + u_angular_velocity.real = this->angular_velocity; + *(outbuffer + offset + 0) = (u_angular_velocity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angular_velocity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angular_velocity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angular_velocity.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angular_velocity); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->x = u_x.real; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->y = u_y.real; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_theta; + u_theta.base = 0; + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->theta = u_theta.real; + offset += sizeof(this->theta); + union { + float real; + uint32_t base; + } u_linear_velocity; + u_linear_velocity.base = 0; + u_linear_velocity.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_linear_velocity.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_linear_velocity.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_linear_velocity.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->linear_velocity = u_linear_velocity.real; + offset += sizeof(this->linear_velocity); + union { + float real; + uint32_t base; + } u_angular_velocity; + u_angular_velocity.base = 0; + u_angular_velocity.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angular_velocity.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angular_velocity.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angular_velocity.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angular_velocity = u_angular_velocity.real; + offset += sizeof(this->angular_velocity); + return offset; + } + + const char * getType(){ return "turtlesim/Pose"; }; + const char * getMD5(){ return "863b248d5016ca62ea2e895ae5265cf9"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlesim/SetPen.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlesim/SetPen.h new file mode 100644 index 0000000000000000000000000000000000000000..a0e32c046c8b2b7066107e6b424c15455fddc9cc --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlesim/SetPen.h @@ -0,0 +1,105 @@ +#ifndef _ROS_SERVICE_SetPen_h +#define _ROS_SERVICE_SetPen_h +#include +#include +#include +#include "ros/msg.h" + +namespace turtlesim +{ + +static const char SETPEN[] = "turtlesim/SetPen"; + + class SetPenRequest : public ros::Msg + { + public: + typedef uint8_t _r_type; + _r_type r; + typedef uint8_t _g_type; + _g_type g; + typedef uint8_t _b_type; + _b_type b; + typedef uint8_t _width_type; + _width_type width; + typedef uint8_t _off_type; + _off_type off; + + SetPenRequest(): + r(0), + g(0), + b(0), + width(0), + off(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->r >> (8 * 0)) & 0xFF; + offset += sizeof(this->r); + *(outbuffer + offset + 0) = (this->g >> (8 * 0)) & 0xFF; + offset += sizeof(this->g); + *(outbuffer + offset + 0) = (this->b >> (8 * 0)) & 0xFF; + offset += sizeof(this->b); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + offset += sizeof(this->width); + *(outbuffer + offset + 0) = (this->off >> (8 * 0)) & 0xFF; + offset += sizeof(this->off); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->r = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->r); + this->g = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->g); + this->b = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->b); + this->width = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->width); + this->off = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->off); + return offset; + } + + const char * getType(){ return SETPEN; }; + const char * getMD5(){ return "9f452acce566bf0c0954594f69a8e41b"; }; + + }; + + class SetPenResponse : public ros::Msg + { + public: + + SetPenResponse() + { + } + + 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 SETPEN; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class SetPen { + public: + typedef SetPenRequest Request; + typedef SetPenResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlesim/Spawn.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlesim/Spawn.h new file mode 100644 index 0000000000000000000000000000000000000000..f69b42febadf0ad50bd0d59d8c15fbdd0aa095be --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlesim/Spawn.h @@ -0,0 +1,176 @@ +#ifndef _ROS_SERVICE_Spawn_h +#define _ROS_SERVICE_Spawn_h +#include +#include +#include +#include "ros/msg.h" + +namespace turtlesim +{ + +static const char SPAWN[] = "turtlesim/Spawn"; + + class SpawnRequest : public ros::Msg + { + public: + typedef float _x_type; + _x_type x; + typedef float _y_type; + _y_type y; + typedef float _theta_type; + _theta_type theta; + typedef const char* _name_type; + _name_type name; + + SpawnRequest(): + x(0), + y(0), + theta(0), + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_theta; + u_theta.real = this->theta; + *(outbuffer + offset + 0) = (u_theta.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_theta.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_theta.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_theta.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->theta); + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->x = u_x.real; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->y = u_y.real; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_theta; + u_theta.base = 0; + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->theta = u_theta.real; + offset += sizeof(this->theta); + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return SPAWN; }; + const char * getMD5(){ return "57f001c49ab7b11d699f8606c1f4f7ff"; }; + + }; + + class SpawnResponse : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + + SpawnResponse(): + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return SPAWN; }; + const char * getMD5(){ return "c1f3d28f1b044c871e6eff2e9fc3c667"; }; + + }; + + class Spawn { + public: + typedef SpawnRequest Request; + typedef SpawnResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlesim/TeleportAbsolute.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlesim/TeleportAbsolute.h new file mode 100644 index 0000000000000000000000000000000000000000..c81489b06319ff7d1e7f41b194b0db5d2df23532 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlesim/TeleportAbsolute.h @@ -0,0 +1,142 @@ +#ifndef _ROS_SERVICE_TeleportAbsolute_h +#define _ROS_SERVICE_TeleportAbsolute_h +#include +#include +#include +#include "ros/msg.h" + +namespace turtlesim +{ + +static const char TELEPORTABSOLUTE[] = "turtlesim/TeleportAbsolute"; + + class TeleportAbsoluteRequest : public ros::Msg + { + public: + typedef float _x_type; + _x_type x; + typedef float _y_type; + _y_type y; + typedef float _theta_type; + _theta_type theta; + + TeleportAbsoluteRequest(): + x(0), + y(0), + theta(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_theta; + u_theta.real = this->theta; + *(outbuffer + offset + 0) = (u_theta.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_theta.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_theta.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_theta.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->theta); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->x = u_x.real; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->y = u_y.real; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_theta; + u_theta.base = 0; + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->theta = u_theta.real; + offset += sizeof(this->theta); + return offset; + } + + const char * getType(){ return TELEPORTABSOLUTE; }; + const char * getMD5(){ return "a130bc60ee6513855dc62ea83fcc5b20"; }; + + }; + + class TeleportAbsoluteResponse : public ros::Msg + { + public: + + TeleportAbsoluteResponse() + { + } + + 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 TELEPORTABSOLUTE; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class TeleportAbsolute { + public: + typedef TeleportAbsoluteRequest Request; + typedef TeleportAbsoluteResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlesim/TeleportRelative.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlesim/TeleportRelative.h new file mode 100644 index 0000000000000000000000000000000000000000..2da96682a8e149a3f139fd0043c469a46a8e27cb --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/turtlesim/TeleportRelative.h @@ -0,0 +1,118 @@ +#ifndef _ROS_SERVICE_TeleportRelative_h +#define _ROS_SERVICE_TeleportRelative_h +#include +#include +#include +#include "ros/msg.h" + +namespace turtlesim +{ + +static const char TELEPORTRELATIVE[] = "turtlesim/TeleportRelative"; + + class TeleportRelativeRequest : public ros::Msg + { + public: + typedef float _linear_type; + _linear_type linear; + typedef float _angular_type; + _angular_type angular; + + TeleportRelativeRequest(): + linear(0), + angular(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_linear; + u_linear.real = this->linear; + *(outbuffer + offset + 0) = (u_linear.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_linear.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_linear.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_linear.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->linear); + union { + float real; + uint32_t base; + } u_angular; + u_angular.real = this->angular; + *(outbuffer + offset + 0) = (u_angular.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angular.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angular.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angular.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angular); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_linear; + u_linear.base = 0; + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->linear = u_linear.real; + offset += sizeof(this->linear); + union { + float real; + uint32_t base; + } u_angular; + u_angular.base = 0; + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angular = u_angular.real; + offset += sizeof(this->angular); + return offset; + } + + const char * getType(){ return TELEPORTRELATIVE; }; + const char * getMD5(){ return "9d5c2dcd348ac8f76ce2a4307bd63a13"; }; + + }; + + class TeleportRelativeResponse : public ros::Msg + { + public: + + TeleportRelativeResponse() + { + } + + 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 TELEPORTRELATIVE; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class TeleportRelative { + public: + typedef TeleportRelativeRequest Request; + typedef TeleportRelativeResponse Response; + }; + +} +#endif diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/uuid_msgs/UniqueID.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/uuid_msgs/UniqueID.h new file mode 100644 index 0000000000000000000000000000000000000000..bf14c401a33fc3184d2b03c39d88ed674e57045c --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/uuid_msgs/UniqueID.h @@ -0,0 +1,48 @@ +#ifndef _ROS_uuid_msgs_UniqueID_h +#define _ROS_uuid_msgs_UniqueID_h + +#include +#include +#include +#include "ros/msg.h" + +namespace uuid_msgs +{ + + class UniqueID : public ros::Msg + { + public: + uint8_t uuid[16]; + + UniqueID(): + uuid() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + for( uint32_t i = 0; i < 16; i++){ + *(outbuffer + offset + 0) = (this->uuid[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->uuid[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + for( uint32_t i = 0; i < 16; i++){ + this->uuid[i] = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->uuid[i]); + } + return offset; + } + + const char * getType(){ return "uuid_msgs/UniqueID"; }; + const char * getMD5(){ return "fec2a93b6f5367ee8112c9c0b41ff310"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/variant_msgs/Test.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/variant_msgs/Test.h new file mode 100644 index 0000000000000000000000000000000000000000..4316dfeb0bb4aa556803377025230b19de1165e8 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/variant_msgs/Test.h @@ -0,0 +1,241 @@ +#ifndef _ROS_variant_msgs_Test_h +#define _ROS_variant_msgs_Test_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "std_msgs/Bool.h" +#include "std_msgs/String.h" + +namespace variant_msgs +{ + + class Test : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef int32_t _builtin_int_type; + _builtin_int_type builtin_int; + typedef bool _builtin_boolean_type; + _builtin_boolean_type builtin_boolean; + typedef std_msgs::Bool _boolean_type; + _boolean_type boolean; + typedef const char* _builtin_string_type; + _builtin_string_type builtin_string; + typedef std_msgs::String _string_type; + _string_type string; + int32_t builtin_int_array[3]; + uint32_t builtin_int_vector_length; + typedef int32_t _builtin_int_vector_type; + _builtin_int_vector_type st_builtin_int_vector; + _builtin_int_vector_type * builtin_int_vector; + std_msgs::String string_array[3]; + uint32_t string_vector_length; + typedef std_msgs::String _string_vector_type; + _string_vector_type st_string_vector; + _string_vector_type * string_vector; + bool builtin_boolean_array[3]; + enum { byte_constant = 42 }; + + Test(): + header(), + builtin_int(0), + builtin_boolean(0), + boolean(), + builtin_string(""), + string(), + builtin_int_array(), + builtin_int_vector_length(0), builtin_int_vector(NULL), + string_array(), + string_vector_length(0), string_vector(NULL), + builtin_boolean_array() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + int32_t real; + uint32_t base; + } u_builtin_int; + u_builtin_int.real = this->builtin_int; + *(outbuffer + offset + 0) = (u_builtin_int.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_builtin_int.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_builtin_int.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_builtin_int.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->builtin_int); + union { + bool real; + uint8_t base; + } u_builtin_boolean; + u_builtin_boolean.real = this->builtin_boolean; + *(outbuffer + offset + 0) = (u_builtin_boolean.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->builtin_boolean); + offset += this->boolean.serialize(outbuffer + offset); + uint32_t length_builtin_string = strlen(this->builtin_string); + varToArr(outbuffer + offset, length_builtin_string); + offset += 4; + memcpy(outbuffer + offset, this->builtin_string, length_builtin_string); + offset += length_builtin_string; + offset += this->string.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 3; i++){ + union { + int32_t real; + uint32_t base; + } u_builtin_int_arrayi; + u_builtin_int_arrayi.real = this->builtin_int_array[i]; + *(outbuffer + offset + 0) = (u_builtin_int_arrayi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_builtin_int_arrayi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_builtin_int_arrayi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_builtin_int_arrayi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->builtin_int_array[i]); + } + *(outbuffer + offset + 0) = (this->builtin_int_vector_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->builtin_int_vector_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->builtin_int_vector_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->builtin_int_vector_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->builtin_int_vector_length); + for( uint32_t i = 0; i < builtin_int_vector_length; i++){ + union { + int32_t real; + uint32_t base; + } u_builtin_int_vectori; + u_builtin_int_vectori.real = this->builtin_int_vector[i]; + *(outbuffer + offset + 0) = (u_builtin_int_vectori.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_builtin_int_vectori.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_builtin_int_vectori.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_builtin_int_vectori.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->builtin_int_vector[i]); + } + for( uint32_t i = 0; i < 3; i++){ + offset += this->string_array[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->string_vector_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->string_vector_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->string_vector_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->string_vector_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->string_vector_length); + for( uint32_t i = 0; i < string_vector_length; i++){ + offset += this->string_vector[i].serialize(outbuffer + offset); + } + for( uint32_t i = 0; i < 3; i++){ + union { + bool real; + uint8_t base; + } u_builtin_boolean_arrayi; + u_builtin_boolean_arrayi.real = this->builtin_boolean_array[i]; + *(outbuffer + offset + 0) = (u_builtin_boolean_arrayi.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->builtin_boolean_array[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + int32_t real; + uint32_t base; + } u_builtin_int; + u_builtin_int.base = 0; + u_builtin_int.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_builtin_int.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_builtin_int.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_builtin_int.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->builtin_int = u_builtin_int.real; + offset += sizeof(this->builtin_int); + union { + bool real; + uint8_t base; + } u_builtin_boolean; + u_builtin_boolean.base = 0; + u_builtin_boolean.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->builtin_boolean = u_builtin_boolean.real; + offset += sizeof(this->builtin_boolean); + offset += this->boolean.deserialize(inbuffer + offset); + uint32_t length_builtin_string; + arrToVar(length_builtin_string, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_builtin_string; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_builtin_string-1]=0; + this->builtin_string = (char *)(inbuffer + offset-1); + offset += length_builtin_string; + offset += this->string.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 3; i++){ + union { + int32_t real; + uint32_t base; + } u_builtin_int_arrayi; + u_builtin_int_arrayi.base = 0; + u_builtin_int_arrayi.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_builtin_int_arrayi.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_builtin_int_arrayi.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_builtin_int_arrayi.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->builtin_int_array[i] = u_builtin_int_arrayi.real; + offset += sizeof(this->builtin_int_array[i]); + } + uint32_t builtin_int_vector_lengthT = ((uint32_t) (*(inbuffer + offset))); + builtin_int_vector_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + builtin_int_vector_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + builtin_int_vector_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->builtin_int_vector_length); + if(builtin_int_vector_lengthT > builtin_int_vector_length) + this->builtin_int_vector = (int32_t*)realloc(this->builtin_int_vector, builtin_int_vector_lengthT * sizeof(int32_t)); + builtin_int_vector_length = builtin_int_vector_lengthT; + for( uint32_t i = 0; i < builtin_int_vector_length; i++){ + union { + int32_t real; + uint32_t base; + } u_st_builtin_int_vector; + u_st_builtin_int_vector.base = 0; + u_st_builtin_int_vector.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_builtin_int_vector.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_builtin_int_vector.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_builtin_int_vector.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_builtin_int_vector = u_st_builtin_int_vector.real; + offset += sizeof(this->st_builtin_int_vector); + memcpy( &(this->builtin_int_vector[i]), &(this->st_builtin_int_vector), sizeof(int32_t)); + } + for( uint32_t i = 0; i < 3; i++){ + offset += this->string_array[i].deserialize(inbuffer + offset); + } + uint32_t string_vector_lengthT = ((uint32_t) (*(inbuffer + offset))); + string_vector_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + string_vector_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + string_vector_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->string_vector_length); + if(string_vector_lengthT > string_vector_length) + this->string_vector = (std_msgs::String*)realloc(this->string_vector, string_vector_lengthT * sizeof(std_msgs::String)); + string_vector_length = string_vector_lengthT; + for( uint32_t i = 0; i < string_vector_length; i++){ + offset += this->st_string_vector.deserialize(inbuffer + offset); + memcpy( &(this->string_vector[i]), &(this->st_string_vector), sizeof(std_msgs::String)); + } + for( uint32_t i = 0; i < 3; i++){ + union { + bool real; + uint8_t base; + } u_builtin_boolean_arrayi; + u_builtin_boolean_arrayi.base = 0; + u_builtin_boolean_arrayi.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->builtin_boolean_array[i] = u_builtin_boolean_arrayi.real; + offset += sizeof(this->builtin_boolean_array[i]); + } + return offset; + } + + const char * getType(){ return "variant_msgs/Test"; }; + const char * getMD5(){ return "17d92d9cea3499753cb392766b3203a1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/variant_msgs/Variant.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/variant_msgs/Variant.h new file mode 100644 index 0000000000000000000000000000000000000000..c62dd4429cf993c3ab3214cd8771b034aaa6880c --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/variant_msgs/Variant.h @@ -0,0 +1,77 @@ +#ifndef _ROS_variant_msgs_Variant_h +#define _ROS_variant_msgs_Variant_h + +#include +#include +#include +#include "ros/msg.h" +#include "variant_msgs/VariantHeader.h" +#include "variant_msgs/VariantType.h" + +namespace variant_msgs +{ + + class Variant : public ros::Msg + { + public: + typedef variant_msgs::VariantHeader _header_type; + _header_type header; + typedef variant_msgs::VariantType _type_type; + _type_type type; + uint32_t data_length; + typedef uint8_t _data_type; + _data_type st_data; + _data_type * data; + + Variant(): + header(), + type(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->type.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->type.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint8_t*)realloc(this->data, data_lengthT * sizeof(uint8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint8_t)); + } + return offset; + } + + const char * getType(){ return "variant_msgs/Variant"; }; + const char * getMD5(){ return "01c24cd44ef34b0c6a309bcafb6bdfab"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/variant_msgs/VariantHeader.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/variant_msgs/VariantHeader.h new file mode 100644 index 0000000000000000000000000000000000000000..236b5cbaf6fb1fa1739423e9311c91cf218dd936 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/variant_msgs/VariantHeader.h @@ -0,0 +1,90 @@ +#ifndef _ROS_variant_msgs_VariantHeader_h +#define _ROS_variant_msgs_VariantHeader_h + +#include +#include +#include +#include "ros/msg.h" + +namespace variant_msgs +{ + + class VariantHeader : public ros::Msg + { + public: + typedef const char* _publisher_type; + _publisher_type publisher; + typedef const char* _topic_type; + _topic_type topic; + typedef bool _latched_type; + _latched_type latched; + + VariantHeader(): + publisher(""), + topic(""), + latched(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_publisher = strlen(this->publisher); + varToArr(outbuffer + offset, length_publisher); + offset += 4; + memcpy(outbuffer + offset, this->publisher, length_publisher); + offset += length_publisher; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + union { + bool real; + uint8_t base; + } u_latched; + u_latched.real = this->latched; + *(outbuffer + offset + 0) = (u_latched.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->latched); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_publisher; + arrToVar(length_publisher, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_publisher; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_publisher-1]=0; + this->publisher = (char *)(inbuffer + offset-1); + offset += length_publisher; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + union { + bool real; + uint8_t base; + } u_latched; + u_latched.base = 0; + u_latched.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->latched = u_latched.real; + offset += sizeof(this->latched); + return offset; + } + + const char * getType(){ return "variant_msgs/VariantHeader"; }; + const char * getMD5(){ return "e4adbe277ed51d50644d64067b86c73d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/variant_msgs/VariantType.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/variant_msgs/VariantType.h new file mode 100644 index 0000000000000000000000000000000000000000..66c7ac73d7769bbf59d7a0056cbc575d89616617 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/variant_msgs/VariantType.h @@ -0,0 +1,89 @@ +#ifndef _ROS_variant_msgs_VariantType_h +#define _ROS_variant_msgs_VariantType_h + +#include +#include +#include +#include "ros/msg.h" + +namespace variant_msgs +{ + + class VariantType : public ros::Msg + { + public: + typedef const char* _md5_sum_type; + _md5_sum_type md5_sum; + typedef const char* _data_type_type; + _data_type_type data_type; + typedef const char* _definition_type; + _definition_type definition; + + VariantType(): + md5_sum(""), + data_type(""), + definition("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_md5_sum = strlen(this->md5_sum); + varToArr(outbuffer + offset, length_md5_sum); + offset += 4; + memcpy(outbuffer + offset, this->md5_sum, length_md5_sum); + offset += length_md5_sum; + uint32_t length_data_type = strlen(this->data_type); + varToArr(outbuffer + offset, length_data_type); + offset += 4; + memcpy(outbuffer + offset, this->data_type, length_data_type); + offset += length_data_type; + uint32_t length_definition = strlen(this->definition); + varToArr(outbuffer + offset, length_definition); + offset += 4; + memcpy(outbuffer + offset, this->definition, length_definition); + offset += length_definition; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_md5_sum; + arrToVar(length_md5_sum, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_md5_sum; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_md5_sum-1]=0; + this->md5_sum = (char *)(inbuffer + offset-1); + offset += length_md5_sum; + uint32_t length_data_type; + arrToVar(length_data_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data_type-1]=0; + this->data_type = (char *)(inbuffer + offset-1); + offset += length_data_type; + uint32_t length_definition; + arrToVar(length_definition, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_definition; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_definition-1]=0; + this->definition = (char *)(inbuffer + offset-1); + offset += length_definition; + return offset; + } + + const char * getType(){ return "variant_msgs/VariantType"; }; + const char * getMD5(){ return "ea49579a10d85560b62a77e2f2f84caf"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/ImageMarker.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/ImageMarker.h new file mode 100644 index 0000000000000000000000000000000000000000..c69577ad449ffefc3e898f61cd93e657ce5d1b5a --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/ImageMarker.h @@ -0,0 +1,262 @@ +#ifndef _ROS_visualization_msgs_ImageMarker_h +#define _ROS_visualization_msgs_ImageMarker_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Point.h" +#include "std_msgs/ColorRGBA.h" +#include "ros/duration.h" + +namespace visualization_msgs +{ + + class ImageMarker : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _ns_type; + _ns_type ns; + typedef int32_t _id_type; + _id_type id; + typedef int32_t _type_type; + _type_type type; + typedef int32_t _action_type; + _action_type action; + typedef geometry_msgs::Point _position_type; + _position_type position; + typedef float _scale_type; + _scale_type scale; + typedef std_msgs::ColorRGBA _outline_color_type; + _outline_color_type outline_color; + typedef uint8_t _filled_type; + _filled_type filled; + typedef std_msgs::ColorRGBA _fill_color_type; + _fill_color_type fill_color; + typedef ros::Duration _lifetime_type; + _lifetime_type lifetime; + uint32_t points_length; + typedef geometry_msgs::Point _points_type; + _points_type st_points; + _points_type * points; + uint32_t outline_colors_length; + typedef std_msgs::ColorRGBA _outline_colors_type; + _outline_colors_type st_outline_colors; + _outline_colors_type * outline_colors; + enum { CIRCLE = 0 }; + enum { LINE_STRIP = 1 }; + enum { LINE_LIST = 2 }; + enum { POLYGON = 3 }; + enum { POINTS = 4 }; + enum { ADD = 0 }; + enum { REMOVE = 1 }; + + ImageMarker(): + header(), + ns(""), + id(0), + type(0), + action(0), + position(), + scale(0), + outline_color(), + filled(0), + fill_color(), + lifetime(), + points_length(0), points(NULL), + outline_colors_length(0), outline_colors(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_ns = strlen(this->ns); + varToArr(outbuffer + offset, length_ns); + offset += 4; + memcpy(outbuffer + offset, this->ns, length_ns); + offset += length_ns; + union { + int32_t real; + uint32_t base; + } u_id; + u_id.real = this->id; + *(outbuffer + offset + 0) = (u_id.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_id.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_id.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_id.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->id); + union { + int32_t real; + uint32_t base; + } u_type; + u_type.real = this->type; + *(outbuffer + offset + 0) = (u_type.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_type.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_type.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_type.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->type); + union { + int32_t real; + uint32_t base; + } u_action; + u_action.real = this->action; + *(outbuffer + offset + 0) = (u_action.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_action.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_action.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_action.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->action); + offset += this->position.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_scale; + u_scale.real = this->scale; + *(outbuffer + offset + 0) = (u_scale.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_scale.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_scale.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_scale.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->scale); + offset += this->outline_color.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->filled >> (8 * 0)) & 0xFF; + offset += sizeof(this->filled); + offset += this->fill_color.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->lifetime.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->lifetime.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->lifetime.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->lifetime.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->lifetime.sec); + *(outbuffer + offset + 0) = (this->lifetime.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->lifetime.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->lifetime.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->lifetime.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->lifetime.nsec); + *(outbuffer + offset + 0) = (this->points_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->points_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->points_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->points_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->points_length); + for( uint32_t i = 0; i < points_length; i++){ + offset += this->points[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->outline_colors_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->outline_colors_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->outline_colors_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->outline_colors_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->outline_colors_length); + for( uint32_t i = 0; i < outline_colors_length; i++){ + offset += this->outline_colors[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_ns; + arrToVar(length_ns, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_ns; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_ns-1]=0; + this->ns = (char *)(inbuffer + offset-1); + offset += length_ns; + union { + int32_t real; + uint32_t base; + } u_id; + u_id.base = 0; + u_id.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->id = u_id.real; + offset += sizeof(this->id); + union { + int32_t real; + uint32_t base; + } u_type; + u_type.base = 0; + u_type.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_type.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_type.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_type.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->type = u_type.real; + offset += sizeof(this->type); + union { + int32_t real; + uint32_t base; + } u_action; + u_action.base = 0; + u_action.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_action.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_action.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_action.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->action = u_action.real; + offset += sizeof(this->action); + offset += this->position.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_scale; + u_scale.base = 0; + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->scale = u_scale.real; + offset += sizeof(this->scale); + offset += this->outline_color.deserialize(inbuffer + offset); + this->filled = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->filled); + offset += this->fill_color.deserialize(inbuffer + offset); + this->lifetime.sec = ((uint32_t) (*(inbuffer + offset))); + this->lifetime.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->lifetime.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->lifetime.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->lifetime.sec); + this->lifetime.nsec = ((uint32_t) (*(inbuffer + offset))); + this->lifetime.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->lifetime.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->lifetime.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->lifetime.nsec); + uint32_t points_lengthT = ((uint32_t) (*(inbuffer + offset))); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->points_length); + if(points_lengthT > points_length) + this->points = (geometry_msgs::Point*)realloc(this->points, points_lengthT * sizeof(geometry_msgs::Point)); + points_length = points_lengthT; + for( uint32_t i = 0; i < points_length; i++){ + offset += this->st_points.deserialize(inbuffer + offset); + memcpy( &(this->points[i]), &(this->st_points), sizeof(geometry_msgs::Point)); + } + uint32_t outline_colors_lengthT = ((uint32_t) (*(inbuffer + offset))); + outline_colors_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + outline_colors_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + outline_colors_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->outline_colors_length); + if(outline_colors_lengthT > outline_colors_length) + this->outline_colors = (std_msgs::ColorRGBA*)realloc(this->outline_colors, outline_colors_lengthT * sizeof(std_msgs::ColorRGBA)); + outline_colors_length = outline_colors_lengthT; + for( uint32_t i = 0; i < outline_colors_length; i++){ + offset += this->st_outline_colors.deserialize(inbuffer + offset); + memcpy( &(this->outline_colors[i]), &(this->st_outline_colors), sizeof(std_msgs::ColorRGBA)); + } + return offset; + } + + const char * getType(){ return "visualization_msgs/ImageMarker"; }; + const char * getMD5(){ return "1de93c67ec8858b831025a08fbf1b35c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarker.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarker.h new file mode 100644 index 0000000000000000000000000000000000000000..8752679cd6d2c7b442ddbca122f2c9cc28db0bb4 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarker.h @@ -0,0 +1,160 @@ +#ifndef _ROS_visualization_msgs_InteractiveMarker_h +#define _ROS_visualization_msgs_InteractiveMarker_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" +#include "visualization_msgs/MenuEntry.h" +#include "visualization_msgs/InteractiveMarkerControl.h" + +namespace visualization_msgs +{ + + class InteractiveMarker : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + typedef const char* _name_type; + _name_type name; + typedef const char* _description_type; + _description_type description; + typedef float _scale_type; + _scale_type scale; + uint32_t menu_entries_length; + typedef visualization_msgs::MenuEntry _menu_entries_type; + _menu_entries_type st_menu_entries; + _menu_entries_type * menu_entries; + uint32_t controls_length; + typedef visualization_msgs::InteractiveMarkerControl _controls_type; + _controls_type st_controls; + _controls_type * controls; + + InteractiveMarker(): + header(), + pose(), + name(""), + description(""), + scale(0), + menu_entries_length(0), menu_entries(NULL), + controls_length(0), controls(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->pose.serialize(outbuffer + offset); + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_description = strlen(this->description); + varToArr(outbuffer + offset, length_description); + offset += 4; + memcpy(outbuffer + offset, this->description, length_description); + offset += length_description; + union { + float real; + uint32_t base; + } u_scale; + u_scale.real = this->scale; + *(outbuffer + offset + 0) = (u_scale.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_scale.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_scale.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_scale.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->scale); + *(outbuffer + offset + 0) = (this->menu_entries_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->menu_entries_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->menu_entries_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->menu_entries_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->menu_entries_length); + for( uint32_t i = 0; i < menu_entries_length; i++){ + offset += this->menu_entries[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->controls_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->controls_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->controls_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->controls_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->controls_length); + for( uint32_t i = 0; i < controls_length; i++){ + offset += this->controls[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->pose.deserialize(inbuffer + offset); + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_description; + arrToVar(length_description, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_description; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_description-1]=0; + this->description = (char *)(inbuffer + offset-1); + offset += length_description; + union { + float real; + uint32_t base; + } u_scale; + u_scale.base = 0; + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->scale = u_scale.real; + offset += sizeof(this->scale); + uint32_t menu_entries_lengthT = ((uint32_t) (*(inbuffer + offset))); + menu_entries_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + menu_entries_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + menu_entries_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->menu_entries_length); + if(menu_entries_lengthT > menu_entries_length) + this->menu_entries = (visualization_msgs::MenuEntry*)realloc(this->menu_entries, menu_entries_lengthT * sizeof(visualization_msgs::MenuEntry)); + menu_entries_length = menu_entries_lengthT; + for( uint32_t i = 0; i < menu_entries_length; i++){ + offset += this->st_menu_entries.deserialize(inbuffer + offset); + memcpy( &(this->menu_entries[i]), &(this->st_menu_entries), sizeof(visualization_msgs::MenuEntry)); + } + uint32_t controls_lengthT = ((uint32_t) (*(inbuffer + offset))); + controls_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + controls_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + controls_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->controls_length); + if(controls_lengthT > controls_length) + this->controls = (visualization_msgs::InteractiveMarkerControl*)realloc(this->controls, controls_lengthT * sizeof(visualization_msgs::InteractiveMarkerControl)); + controls_length = controls_lengthT; + for( uint32_t i = 0; i < controls_length; i++){ + offset += this->st_controls.deserialize(inbuffer + offset); + memcpy( &(this->controls[i]), &(this->st_controls), sizeof(visualization_msgs::InteractiveMarkerControl)); + } + return offset; + } + + const char * getType(){ return "visualization_msgs/InteractiveMarker"; }; + const char * getMD5(){ return "dd86d22909d5a3364b384492e35c10af"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerControl.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerControl.h new file mode 100644 index 0000000000000000000000000000000000000000..0c905ce8b58099aa61ba90120fe7ef3ee5d74ec1 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerControl.h @@ -0,0 +1,167 @@ +#ifndef _ROS_visualization_msgs_InteractiveMarkerControl_h +#define _ROS_visualization_msgs_InteractiveMarkerControl_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Quaternion.h" +#include "visualization_msgs/Marker.h" + +namespace visualization_msgs +{ + + class InteractiveMarkerControl : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef geometry_msgs::Quaternion _orientation_type; + _orientation_type orientation; + typedef uint8_t _orientation_mode_type; + _orientation_mode_type orientation_mode; + typedef uint8_t _interaction_mode_type; + _interaction_mode_type interaction_mode; + typedef bool _always_visible_type; + _always_visible_type always_visible; + uint32_t markers_length; + typedef visualization_msgs::Marker _markers_type; + _markers_type st_markers; + _markers_type * markers; + typedef bool _independent_marker_orientation_type; + _independent_marker_orientation_type independent_marker_orientation; + typedef const char* _description_type; + _description_type description; + enum { INHERIT = 0 }; + enum { FIXED = 1 }; + enum { VIEW_FACING = 2 }; + enum { NONE = 0 }; + enum { MENU = 1 }; + enum { BUTTON = 2 }; + enum { MOVE_AXIS = 3 }; + enum { MOVE_PLANE = 4 }; + enum { ROTATE_AXIS = 5 }; + enum { MOVE_ROTATE = 6 }; + enum { MOVE_3D = 7 }; + enum { ROTATE_3D = 8 }; + enum { MOVE_ROTATE_3D = 9 }; + + InteractiveMarkerControl(): + name(""), + orientation(), + orientation_mode(0), + interaction_mode(0), + always_visible(0), + markers_length(0), markers(NULL), + independent_marker_orientation(0), + description("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + offset += this->orientation.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->orientation_mode >> (8 * 0)) & 0xFF; + offset += sizeof(this->orientation_mode); + *(outbuffer + offset + 0) = (this->interaction_mode >> (8 * 0)) & 0xFF; + offset += sizeof(this->interaction_mode); + union { + bool real; + uint8_t base; + } u_always_visible; + u_always_visible.real = this->always_visible; + *(outbuffer + offset + 0) = (u_always_visible.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->always_visible); + *(outbuffer + offset + 0) = (this->markers_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->markers_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->markers_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->markers_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->markers_length); + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->markers[i].serialize(outbuffer + offset); + } + union { + bool real; + uint8_t base; + } u_independent_marker_orientation; + u_independent_marker_orientation.real = this->independent_marker_orientation; + *(outbuffer + offset + 0) = (u_independent_marker_orientation.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->independent_marker_orientation); + uint32_t length_description = strlen(this->description); + varToArr(outbuffer + offset, length_description); + offset += 4; + memcpy(outbuffer + offset, this->description, length_description); + offset += length_description; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + offset += this->orientation.deserialize(inbuffer + offset); + this->orientation_mode = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->orientation_mode); + this->interaction_mode = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->interaction_mode); + union { + bool real; + uint8_t base; + } u_always_visible; + u_always_visible.base = 0; + u_always_visible.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->always_visible = u_always_visible.real; + offset += sizeof(this->always_visible); + uint32_t markers_lengthT = ((uint32_t) (*(inbuffer + offset))); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->markers_length); + if(markers_lengthT > markers_length) + this->markers = (visualization_msgs::Marker*)realloc(this->markers, markers_lengthT * sizeof(visualization_msgs::Marker)); + markers_length = markers_lengthT; + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->st_markers.deserialize(inbuffer + offset); + memcpy( &(this->markers[i]), &(this->st_markers), sizeof(visualization_msgs::Marker)); + } + union { + bool real; + uint8_t base; + } u_independent_marker_orientation; + u_independent_marker_orientation.base = 0; + u_independent_marker_orientation.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->independent_marker_orientation = u_independent_marker_orientation.real; + offset += sizeof(this->independent_marker_orientation); + uint32_t length_description; + arrToVar(length_description, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_description; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_description-1]=0; + this->description = (char *)(inbuffer + offset-1); + offset += length_description; + return offset; + } + + const char * getType(){ return "visualization_msgs/InteractiveMarkerControl"; }; + const char * getMD5(){ return "b3c81e785788195d1840b86c28da1aac"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerFeedback.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..3d5cebb2127b1da33f980f20b39b2ea302d1812b --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerFeedback.h @@ -0,0 +1,151 @@ +#ifndef _ROS_visualization_msgs_InteractiveMarkerFeedback_h +#define _ROS_visualization_msgs_InteractiveMarkerFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Point.h" + +namespace visualization_msgs +{ + + class InteractiveMarkerFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _client_id_type; + _client_id_type client_id; + typedef const char* _marker_name_type; + _marker_name_type marker_name; + typedef const char* _control_name_type; + _control_name_type control_name; + typedef uint8_t _event_type_type; + _event_type_type event_type; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + typedef uint32_t _menu_entry_id_type; + _menu_entry_id_type menu_entry_id; + typedef geometry_msgs::Point _mouse_point_type; + _mouse_point_type mouse_point; + typedef bool _mouse_point_valid_type; + _mouse_point_valid_type mouse_point_valid; + enum { KEEP_ALIVE = 0 }; + enum { POSE_UPDATE = 1 }; + enum { MENU_SELECT = 2 }; + enum { BUTTON_CLICK = 3 }; + enum { MOUSE_DOWN = 4 }; + enum { MOUSE_UP = 5 }; + + InteractiveMarkerFeedback(): + header(), + client_id(""), + marker_name(""), + control_name(""), + event_type(0), + pose(), + menu_entry_id(0), + mouse_point(), + mouse_point_valid(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_client_id = strlen(this->client_id); + varToArr(outbuffer + offset, length_client_id); + offset += 4; + memcpy(outbuffer + offset, this->client_id, length_client_id); + offset += length_client_id; + uint32_t length_marker_name = strlen(this->marker_name); + varToArr(outbuffer + offset, length_marker_name); + offset += 4; + memcpy(outbuffer + offset, this->marker_name, length_marker_name); + offset += length_marker_name; + uint32_t length_control_name = strlen(this->control_name); + varToArr(outbuffer + offset, length_control_name); + offset += 4; + memcpy(outbuffer + offset, this->control_name, length_control_name); + offset += length_control_name; + *(outbuffer + offset + 0) = (this->event_type >> (8 * 0)) & 0xFF; + offset += sizeof(this->event_type); + offset += this->pose.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->menu_entry_id >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->menu_entry_id >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->menu_entry_id >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->menu_entry_id >> (8 * 3)) & 0xFF; + offset += sizeof(this->menu_entry_id); + offset += this->mouse_point.serialize(outbuffer + offset); + union { + bool real; + uint8_t base; + } u_mouse_point_valid; + u_mouse_point_valid.real = this->mouse_point_valid; + *(outbuffer + offset + 0) = (u_mouse_point_valid.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->mouse_point_valid); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_client_id; + arrToVar(length_client_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_client_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_client_id-1]=0; + this->client_id = (char *)(inbuffer + offset-1); + offset += length_client_id; + uint32_t length_marker_name; + arrToVar(length_marker_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_marker_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_marker_name-1]=0; + this->marker_name = (char *)(inbuffer + offset-1); + offset += length_marker_name; + uint32_t length_control_name; + arrToVar(length_control_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_control_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_control_name-1]=0; + this->control_name = (char *)(inbuffer + offset-1); + offset += length_control_name; + this->event_type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->event_type); + offset += this->pose.deserialize(inbuffer + offset); + this->menu_entry_id = ((uint32_t) (*(inbuffer + offset))); + this->menu_entry_id |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->menu_entry_id |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->menu_entry_id |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->menu_entry_id); + offset += this->mouse_point.deserialize(inbuffer + offset); + union { + bool real; + uint8_t base; + } u_mouse_point_valid; + u_mouse_point_valid.base = 0; + u_mouse_point_valid.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->mouse_point_valid = u_mouse_point_valid.real; + offset += sizeof(this->mouse_point_valid); + return offset; + } + + const char * getType(){ return "visualization_msgs/InteractiveMarkerFeedback"; }; + const char * getMD5(){ return "ab0f1eee058667e28c19ff3ffc3f4b78"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerInit.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerInit.h new file mode 100644 index 0000000000000000000000000000000000000000..a6fb154a839647e1720fc14cee0500fc35a302c8 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerInit.h @@ -0,0 +1,105 @@ +#ifndef _ROS_visualization_msgs_InteractiveMarkerInit_h +#define _ROS_visualization_msgs_InteractiveMarkerInit_h + +#include +#include +#include +#include "ros/msg.h" +#include "visualization_msgs/InteractiveMarker.h" + +namespace visualization_msgs +{ + + class InteractiveMarkerInit : public ros::Msg + { + public: + typedef const char* _server_id_type; + _server_id_type server_id; + typedef uint64_t _seq_num_type; + _seq_num_type seq_num; + uint32_t markers_length; + typedef visualization_msgs::InteractiveMarker _markers_type; + _markers_type st_markers; + _markers_type * markers; + + InteractiveMarkerInit(): + server_id(""), + seq_num(0), + markers_length(0), markers(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_server_id = strlen(this->server_id); + varToArr(outbuffer + offset, length_server_id); + offset += 4; + memcpy(outbuffer + offset, this->server_id, length_server_id); + offset += length_server_id; + union { + uint64_t real; + uint32_t base; + } u_seq_num; + u_seq_num.real = this->seq_num; + *(outbuffer + offset + 0) = (u_seq_num.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_seq_num.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_seq_num.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_seq_num.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->seq_num); + *(outbuffer + offset + 0) = (this->markers_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->markers_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->markers_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->markers_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->markers_length); + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->markers[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_server_id; + arrToVar(length_server_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_server_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_server_id-1]=0; + this->server_id = (char *)(inbuffer + offset-1); + offset += length_server_id; + union { + uint64_t real; + uint32_t base; + } u_seq_num; + u_seq_num.base = 0; + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->seq_num = u_seq_num.real; + offset += sizeof(this->seq_num); + uint32_t markers_lengthT = ((uint32_t) (*(inbuffer + offset))); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->markers_length); + if(markers_lengthT > markers_length) + this->markers = (visualization_msgs::InteractiveMarker*)realloc(this->markers, markers_lengthT * sizeof(visualization_msgs::InteractiveMarker)); + markers_length = markers_lengthT; + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->st_markers.deserialize(inbuffer + offset); + memcpy( &(this->markers[i]), &(this->st_markers), sizeof(visualization_msgs::InteractiveMarker)); + } + return offset; + } + + const char * getType(){ return "visualization_msgs/InteractiveMarkerInit"; }; + const char * getMD5(){ return "d5f2c5045a72456d228676ab91048734"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerPose.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerPose.h new file mode 100644 index 0000000000000000000000000000000000000000..f46032af0cc48ba76797cfb5ba82538ec9c04893 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerPose.h @@ -0,0 +1,67 @@ +#ifndef _ROS_visualization_msgs_InteractiveMarkerPose_h +#define _ROS_visualization_msgs_InteractiveMarkerPose_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" + +namespace visualization_msgs +{ + + class InteractiveMarkerPose : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + typedef const char* _name_type; + _name_type name; + + InteractiveMarkerPose(): + header(), + pose(), + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->pose.serialize(outbuffer + offset); + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->pose.deserialize(inbuffer + offset); + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return "visualization_msgs/InteractiveMarkerPose"; }; + const char * getMD5(){ return "a6e6833209a196a38d798dadb02c81f8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerUpdate.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerUpdate.h new file mode 100644 index 0000000000000000000000000000000000000000..8cea6ca12571ee5aa8223d0a5f29b4c0b3a2427b --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/InteractiveMarkerUpdate.h @@ -0,0 +1,177 @@ +#ifndef _ROS_visualization_msgs_InteractiveMarkerUpdate_h +#define _ROS_visualization_msgs_InteractiveMarkerUpdate_h + +#include +#include +#include +#include "ros/msg.h" +#include "visualization_msgs/InteractiveMarker.h" +#include "visualization_msgs/InteractiveMarkerPose.h" + +namespace visualization_msgs +{ + + class InteractiveMarkerUpdate : public ros::Msg + { + public: + typedef const char* _server_id_type; + _server_id_type server_id; + typedef uint64_t _seq_num_type; + _seq_num_type seq_num; + typedef uint8_t _type_type; + _type_type type; + uint32_t markers_length; + typedef visualization_msgs::InteractiveMarker _markers_type; + _markers_type st_markers; + _markers_type * markers; + uint32_t poses_length; + typedef visualization_msgs::InteractiveMarkerPose _poses_type; + _poses_type st_poses; + _poses_type * poses; + uint32_t erases_length; + typedef char* _erases_type; + _erases_type st_erases; + _erases_type * erases; + enum { KEEP_ALIVE = 0 }; + enum { UPDATE = 1 }; + + InteractiveMarkerUpdate(): + server_id(""), + seq_num(0), + type(0), + markers_length(0), markers(NULL), + poses_length(0), poses(NULL), + erases_length(0), erases(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_server_id = strlen(this->server_id); + varToArr(outbuffer + offset, length_server_id); + offset += 4; + memcpy(outbuffer + offset, this->server_id, length_server_id); + offset += length_server_id; + union { + uint64_t real; + uint32_t base; + } u_seq_num; + u_seq_num.real = this->seq_num; + *(outbuffer + offset + 0) = (u_seq_num.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_seq_num.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_seq_num.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_seq_num.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->seq_num); + *(outbuffer + offset + 0) = (this->type >> (8 * 0)) & 0xFF; + offset += sizeof(this->type); + *(outbuffer + offset + 0) = (this->markers_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->markers_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->markers_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->markers_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->markers_length); + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->markers[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->poses_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->poses_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->poses_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->poses_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->poses_length); + for( uint32_t i = 0; i < poses_length; i++){ + offset += this->poses[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->erases_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->erases_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->erases_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->erases_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->erases_length); + for( uint32_t i = 0; i < erases_length; i++){ + uint32_t length_erasesi = strlen(this->erases[i]); + varToArr(outbuffer + offset, length_erasesi); + offset += 4; + memcpy(outbuffer + offset, this->erases[i], length_erasesi); + offset += length_erasesi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_server_id; + arrToVar(length_server_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_server_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_server_id-1]=0; + this->server_id = (char *)(inbuffer + offset-1); + offset += length_server_id; + union { + uint64_t real; + uint32_t base; + } u_seq_num; + u_seq_num.base = 0; + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->seq_num = u_seq_num.real; + offset += sizeof(this->seq_num); + this->type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->type); + uint32_t markers_lengthT = ((uint32_t) (*(inbuffer + offset))); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->markers_length); + if(markers_lengthT > markers_length) + this->markers = (visualization_msgs::InteractiveMarker*)realloc(this->markers, markers_lengthT * sizeof(visualization_msgs::InteractiveMarker)); + markers_length = markers_lengthT; + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->st_markers.deserialize(inbuffer + offset); + memcpy( &(this->markers[i]), &(this->st_markers), sizeof(visualization_msgs::InteractiveMarker)); + } + uint32_t poses_lengthT = ((uint32_t) (*(inbuffer + offset))); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->poses_length); + if(poses_lengthT > poses_length) + this->poses = (visualization_msgs::InteractiveMarkerPose*)realloc(this->poses, poses_lengthT * sizeof(visualization_msgs::InteractiveMarkerPose)); + poses_length = poses_lengthT; + for( uint32_t i = 0; i < poses_length; i++){ + offset += this->st_poses.deserialize(inbuffer + offset); + memcpy( &(this->poses[i]), &(this->st_poses), sizeof(visualization_msgs::InteractiveMarkerPose)); + } + uint32_t erases_lengthT = ((uint32_t) (*(inbuffer + offset))); + erases_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + erases_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + erases_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->erases_length); + if(erases_lengthT > erases_length) + this->erases = (char**)realloc(this->erases, erases_lengthT * sizeof(char*)); + erases_length = erases_lengthT; + for( uint32_t i = 0; i < erases_length; i++){ + uint32_t length_st_erases; + arrToVar(length_st_erases, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_erases; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_erases-1]=0; + this->st_erases = (char *)(inbuffer + offset-1); + offset += length_st_erases; + memcpy( &(this->erases[i]), &(this->st_erases), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return "visualization_msgs/InteractiveMarkerUpdate"; }; + const char * getMD5(){ return "710d308d0a9276d65945e92dd30b3946"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/Marker.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/Marker.h new file mode 100644 index 0000000000000000000000000000000000000000..1c6e1b2e428b68127a82a9b8f1451bd100ad21d9 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/Marker.h @@ -0,0 +1,312 @@ +#ifndef _ROS_visualization_msgs_Marker_h +#define _ROS_visualization_msgs_Marker_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Vector3.h" +#include "std_msgs/ColorRGBA.h" +#include "ros/duration.h" +#include "geometry_msgs/Point.h" + +namespace visualization_msgs +{ + + class Marker : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _ns_type; + _ns_type ns; + typedef int32_t _id_type; + _id_type id; + typedef int32_t _type_type; + _type_type type; + typedef int32_t _action_type; + _action_type action; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + typedef geometry_msgs::Vector3 _scale_type; + _scale_type scale; + typedef std_msgs::ColorRGBA _color_type; + _color_type color; + typedef ros::Duration _lifetime_type; + _lifetime_type lifetime; + typedef bool _frame_locked_type; + _frame_locked_type frame_locked; + uint32_t points_length; + typedef geometry_msgs::Point _points_type; + _points_type st_points; + _points_type * points; + uint32_t colors_length; + typedef std_msgs::ColorRGBA _colors_type; + _colors_type st_colors; + _colors_type * colors; + typedef const char* _text_type; + _text_type text; + typedef const char* _mesh_resource_type; + _mesh_resource_type mesh_resource; + typedef bool _mesh_use_embedded_materials_type; + _mesh_use_embedded_materials_type mesh_use_embedded_materials; + enum { ARROW = 0 }; + enum { CUBE = 1 }; + enum { SPHERE = 2 }; + enum { CYLINDER = 3 }; + enum { LINE_STRIP = 4 }; + enum { LINE_LIST = 5 }; + enum { CUBE_LIST = 6 }; + enum { SPHERE_LIST = 7 }; + enum { POINTS = 8 }; + enum { TEXT_VIEW_FACING = 9 }; + enum { MESH_RESOURCE = 10 }; + enum { TRIANGLE_LIST = 11 }; + enum { ADD = 0 }; + enum { MODIFY = 0 }; + enum { DELETE = 2 }; + enum { DELETEALL = 3 }; + + Marker(): + header(), + ns(""), + id(0), + type(0), + action(0), + pose(), + scale(), + color(), + lifetime(), + frame_locked(0), + points_length(0), points(NULL), + colors_length(0), colors(NULL), + text(""), + mesh_resource(""), + mesh_use_embedded_materials(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_ns = strlen(this->ns); + varToArr(outbuffer + offset, length_ns); + offset += 4; + memcpy(outbuffer + offset, this->ns, length_ns); + offset += length_ns; + union { + int32_t real; + uint32_t base; + } u_id; + u_id.real = this->id; + *(outbuffer + offset + 0) = (u_id.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_id.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_id.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_id.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->id); + union { + int32_t real; + uint32_t base; + } u_type; + u_type.real = this->type; + *(outbuffer + offset + 0) = (u_type.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_type.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_type.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_type.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->type); + union { + int32_t real; + uint32_t base; + } u_action; + u_action.real = this->action; + *(outbuffer + offset + 0) = (u_action.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_action.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_action.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_action.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->action); + offset += this->pose.serialize(outbuffer + offset); + offset += this->scale.serialize(outbuffer + offset); + offset += this->color.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->lifetime.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->lifetime.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->lifetime.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->lifetime.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->lifetime.sec); + *(outbuffer + offset + 0) = (this->lifetime.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->lifetime.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->lifetime.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->lifetime.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->lifetime.nsec); + union { + bool real; + uint8_t base; + } u_frame_locked; + u_frame_locked.real = this->frame_locked; + *(outbuffer + offset + 0) = (u_frame_locked.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->frame_locked); + *(outbuffer + offset + 0) = (this->points_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->points_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->points_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->points_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->points_length); + for( uint32_t i = 0; i < points_length; i++){ + offset += this->points[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->colors_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->colors_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->colors_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->colors_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->colors_length); + for( uint32_t i = 0; i < colors_length; i++){ + offset += this->colors[i].serialize(outbuffer + offset); + } + uint32_t length_text = strlen(this->text); + varToArr(outbuffer + offset, length_text); + offset += 4; + memcpy(outbuffer + offset, this->text, length_text); + offset += length_text; + uint32_t length_mesh_resource = strlen(this->mesh_resource); + varToArr(outbuffer + offset, length_mesh_resource); + offset += 4; + memcpy(outbuffer + offset, this->mesh_resource, length_mesh_resource); + offset += length_mesh_resource; + union { + bool real; + uint8_t base; + } u_mesh_use_embedded_materials; + u_mesh_use_embedded_materials.real = this->mesh_use_embedded_materials; + *(outbuffer + offset + 0) = (u_mesh_use_embedded_materials.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->mesh_use_embedded_materials); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_ns; + arrToVar(length_ns, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_ns; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_ns-1]=0; + this->ns = (char *)(inbuffer + offset-1); + offset += length_ns; + union { + int32_t real; + uint32_t base; + } u_id; + u_id.base = 0; + u_id.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->id = u_id.real; + offset += sizeof(this->id); + union { + int32_t real; + uint32_t base; + } u_type; + u_type.base = 0; + u_type.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_type.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_type.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_type.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->type = u_type.real; + offset += sizeof(this->type); + union { + int32_t real; + uint32_t base; + } u_action; + u_action.base = 0; + u_action.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_action.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_action.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_action.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->action = u_action.real; + offset += sizeof(this->action); + offset += this->pose.deserialize(inbuffer + offset); + offset += this->scale.deserialize(inbuffer + offset); + offset += this->color.deserialize(inbuffer + offset); + this->lifetime.sec = ((uint32_t) (*(inbuffer + offset))); + this->lifetime.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->lifetime.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->lifetime.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->lifetime.sec); + this->lifetime.nsec = ((uint32_t) (*(inbuffer + offset))); + this->lifetime.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->lifetime.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->lifetime.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->lifetime.nsec); + union { + bool real; + uint8_t base; + } u_frame_locked; + u_frame_locked.base = 0; + u_frame_locked.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->frame_locked = u_frame_locked.real; + offset += sizeof(this->frame_locked); + uint32_t points_lengthT = ((uint32_t) (*(inbuffer + offset))); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->points_length); + if(points_lengthT > points_length) + this->points = (geometry_msgs::Point*)realloc(this->points, points_lengthT * sizeof(geometry_msgs::Point)); + points_length = points_lengthT; + for( uint32_t i = 0; i < points_length; i++){ + offset += this->st_points.deserialize(inbuffer + offset); + memcpy( &(this->points[i]), &(this->st_points), sizeof(geometry_msgs::Point)); + } + uint32_t colors_lengthT = ((uint32_t) (*(inbuffer + offset))); + colors_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + colors_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + colors_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->colors_length); + if(colors_lengthT > colors_length) + this->colors = (std_msgs::ColorRGBA*)realloc(this->colors, colors_lengthT * sizeof(std_msgs::ColorRGBA)); + colors_length = colors_lengthT; + for( uint32_t i = 0; i < colors_length; i++){ + offset += this->st_colors.deserialize(inbuffer + offset); + memcpy( &(this->colors[i]), &(this->st_colors), sizeof(std_msgs::ColorRGBA)); + } + uint32_t length_text; + arrToVar(length_text, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_text; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_text-1]=0; + this->text = (char *)(inbuffer + offset-1); + offset += length_text; + uint32_t length_mesh_resource; + arrToVar(length_mesh_resource, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_mesh_resource; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_mesh_resource-1]=0; + this->mesh_resource = (char *)(inbuffer + offset-1); + offset += length_mesh_resource; + union { + bool real; + uint8_t base; + } u_mesh_use_embedded_materials; + u_mesh_use_embedded_materials.base = 0; + u_mesh_use_embedded_materials.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->mesh_use_embedded_materials = u_mesh_use_embedded_materials.real; + offset += sizeof(this->mesh_use_embedded_materials); + return offset; + } + + const char * getType(){ return "visualization_msgs/Marker"; }; + const char * getMD5(){ return "4048c9de2a16f4ae8e0538085ebf1b97"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/MarkerArray.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/MarkerArray.h new file mode 100644 index 0000000000000000000000000000000000000000..20d1fce0a6bdd2f3889266d860c1a04834641ff3 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/MarkerArray.h @@ -0,0 +1,64 @@ +#ifndef _ROS_visualization_msgs_MarkerArray_h +#define _ROS_visualization_msgs_MarkerArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "visualization_msgs/Marker.h" + +namespace visualization_msgs +{ + + class MarkerArray : public ros::Msg + { + public: + uint32_t markers_length; + typedef visualization_msgs::Marker _markers_type; + _markers_type st_markers; + _markers_type * markers; + + MarkerArray(): + markers_length(0), markers(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->markers_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->markers_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->markers_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->markers_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->markers_length); + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->markers[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t markers_lengthT = ((uint32_t) (*(inbuffer + offset))); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->markers_length); + if(markers_lengthT > markers_length) + this->markers = (visualization_msgs::Marker*)realloc(this->markers, markers_lengthT * sizeof(visualization_msgs::Marker)); + markers_length = markers_lengthT; + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->st_markers.deserialize(inbuffer + offset); + memcpy( &(this->markers[i]), &(this->st_markers), sizeof(visualization_msgs::Marker)); + } + return offset; + } + + const char * getType(){ return "visualization_msgs/MarkerArray"; }; + const char * getMD5(){ return "d155b9ce5188fbaf89745847fd5882d7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/MenuEntry.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/MenuEntry.h new file mode 100644 index 0000000000000000000000000000000000000000..c7b6c2393ac3e1c78fab27caf77ba8fef349a712 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/visualization_msgs/MenuEntry.h @@ -0,0 +1,108 @@ +#ifndef _ROS_visualization_msgs_MenuEntry_h +#define _ROS_visualization_msgs_MenuEntry_h + +#include +#include +#include +#include "ros/msg.h" + +namespace visualization_msgs +{ + + class MenuEntry : public ros::Msg + { + public: + typedef uint32_t _id_type; + _id_type id; + typedef uint32_t _parent_id_type; + _parent_id_type parent_id; + typedef const char* _title_type; + _title_type title; + typedef const char* _command_type; + _command_type command; + typedef uint8_t _command_type_type; + _command_type_type command_type; + enum { FEEDBACK = 0 }; + enum { ROSRUN = 1 }; + enum { ROSLAUNCH = 2 }; + + MenuEntry(): + id(0), + parent_id(0), + title(""), + command(""), + command_type(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->id >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->id >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->id >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->id >> (8 * 3)) & 0xFF; + offset += sizeof(this->id); + *(outbuffer + offset + 0) = (this->parent_id >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->parent_id >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->parent_id >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->parent_id >> (8 * 3)) & 0xFF; + offset += sizeof(this->parent_id); + uint32_t length_title = strlen(this->title); + varToArr(outbuffer + offset, length_title); + offset += 4; + memcpy(outbuffer + offset, this->title, length_title); + offset += length_title; + uint32_t length_command = strlen(this->command); + varToArr(outbuffer + offset, length_command); + offset += 4; + memcpy(outbuffer + offset, this->command, length_command); + offset += length_command; + *(outbuffer + offset + 0) = (this->command_type >> (8 * 0)) & 0xFF; + offset += sizeof(this->command_type); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->id = ((uint32_t) (*(inbuffer + offset))); + this->id |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->id |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->id |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->id); + this->parent_id = ((uint32_t) (*(inbuffer + offset))); + this->parent_id |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->parent_id |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->parent_id |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->parent_id); + uint32_t length_title; + arrToVar(length_title, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_title; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_title-1]=0; + this->title = (char *)(inbuffer + offset-1); + offset += length_title; + uint32_t length_command; + arrToVar(length_command, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_command; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_command-1]=0; + this->command = (char *)(inbuffer + offset-1); + offset += length_command; + this->command_type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->command_type); + return offset; + } + + const char * getType(){ return "visualization_msgs/MenuEntry"; }; + const char * getMD5(){ return "b90ec63024573de83b57aa93eb39be2d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/wfov_camera_msgs/WFOVCompressedImage.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/wfov_camera_msgs/WFOVCompressedImage.h new file mode 100644 index 0000000000000000000000000000000000000000..c6b05bc4138b685c531db1569b99420d5f777eab --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/wfov_camera_msgs/WFOVCompressedImage.h @@ -0,0 +1,169 @@ +#ifndef _ROS_wfov_camera_msgs_WFOVCompressedImage_h +#define _ROS_wfov_camera_msgs_WFOVCompressedImage_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/CompressedImage.h" +#include "sensor_msgs/CameraInfo.h" +#include "geometry_msgs/TransformStamped.h" + +namespace wfov_camera_msgs +{ + + class WFOVCompressedImage : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _time_reference_type; + _time_reference_type time_reference; + typedef sensor_msgs::CompressedImage _image_type; + _image_type image; + typedef sensor_msgs::CameraInfo _info_type; + _info_type info; + typedef float _shutter_type; + _shutter_type shutter; + typedef float _gain_type; + _gain_type gain; + typedef uint16_t _white_balance_blue_type; + _white_balance_blue_type white_balance_blue; + typedef uint16_t _white_balance_red_type; + _white_balance_red_type white_balance_red; + typedef float _temperature_type; + _temperature_type temperature; + typedef geometry_msgs::TransformStamped _worldToCamera_type; + _worldToCamera_type worldToCamera; + + WFOVCompressedImage(): + header(), + time_reference(""), + image(), + info(), + shutter(0), + gain(0), + white_balance_blue(0), + white_balance_red(0), + temperature(0), + worldToCamera() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_time_reference = strlen(this->time_reference); + varToArr(outbuffer + offset, length_time_reference); + offset += 4; + memcpy(outbuffer + offset, this->time_reference, length_time_reference); + offset += length_time_reference; + offset += this->image.serialize(outbuffer + offset); + offset += this->info.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_shutter; + u_shutter.real = this->shutter; + *(outbuffer + offset + 0) = (u_shutter.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_shutter.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_shutter.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_shutter.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->shutter); + union { + float real; + uint32_t base; + } u_gain; + u_gain.real = this->gain; + *(outbuffer + offset + 0) = (u_gain.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_gain.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_gain.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_gain.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->gain); + *(outbuffer + offset + 0) = (this->white_balance_blue >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->white_balance_blue >> (8 * 1)) & 0xFF; + offset += sizeof(this->white_balance_blue); + *(outbuffer + offset + 0) = (this->white_balance_red >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->white_balance_red >> (8 * 1)) & 0xFF; + offset += sizeof(this->white_balance_red); + union { + float real; + uint32_t base; + } u_temperature; + u_temperature.real = this->temperature; + *(outbuffer + offset + 0) = (u_temperature.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_temperature.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_temperature.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_temperature.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->temperature); + offset += this->worldToCamera.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_time_reference; + arrToVar(length_time_reference, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_time_reference; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_time_reference-1]=0; + this->time_reference = (char *)(inbuffer + offset-1); + offset += length_time_reference; + offset += this->image.deserialize(inbuffer + offset); + offset += this->info.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_shutter; + u_shutter.base = 0; + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->shutter = u_shutter.real; + offset += sizeof(this->shutter); + union { + float real; + uint32_t base; + } u_gain; + u_gain.base = 0; + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->gain = u_gain.real; + offset += sizeof(this->gain); + this->white_balance_blue = ((uint16_t) (*(inbuffer + offset))); + this->white_balance_blue |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->white_balance_blue); + this->white_balance_red = ((uint16_t) (*(inbuffer + offset))); + this->white_balance_red |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->white_balance_red); + union { + float real; + uint32_t base; + } u_temperature; + u_temperature.base = 0; + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->temperature = u_temperature.real; + offset += sizeof(this->temperature); + offset += this->worldToCamera.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "wfov_camera_msgs/WFOVCompressedImage"; }; + const char * getMD5(){ return "5b0f85e79ffccd27dc377911c83e026f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/wfov_camera_msgs/WFOVImage.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/wfov_camera_msgs/WFOVImage.h new file mode 100644 index 0000000000000000000000000000000000000000..6ce4f0e281911555b7ca8e2e4128860d4bbef069 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/wfov_camera_msgs/WFOVImage.h @@ -0,0 +1,163 @@ +#ifndef _ROS_wfov_camera_msgs_WFOVImage_h +#define _ROS_wfov_camera_msgs_WFOVImage_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/Image.h" +#include "sensor_msgs/CameraInfo.h" + +namespace wfov_camera_msgs +{ + + class WFOVImage : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _time_reference_type; + _time_reference_type time_reference; + typedef sensor_msgs::Image _image_type; + _image_type image; + typedef sensor_msgs::CameraInfo _info_type; + _info_type info; + typedef float _shutter_type; + _shutter_type shutter; + typedef float _gain_type; + _gain_type gain; + typedef uint16_t _white_balance_blue_type; + _white_balance_blue_type white_balance_blue; + typedef uint16_t _white_balance_red_type; + _white_balance_red_type white_balance_red; + typedef float _temperature_type; + _temperature_type temperature; + + WFOVImage(): + header(), + time_reference(""), + image(), + info(), + shutter(0), + gain(0), + white_balance_blue(0), + white_balance_red(0), + temperature(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_time_reference = strlen(this->time_reference); + varToArr(outbuffer + offset, length_time_reference); + offset += 4; + memcpy(outbuffer + offset, this->time_reference, length_time_reference); + offset += length_time_reference; + offset += this->image.serialize(outbuffer + offset); + offset += this->info.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_shutter; + u_shutter.real = this->shutter; + *(outbuffer + offset + 0) = (u_shutter.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_shutter.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_shutter.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_shutter.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->shutter); + union { + float real; + uint32_t base; + } u_gain; + u_gain.real = this->gain; + *(outbuffer + offset + 0) = (u_gain.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_gain.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_gain.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_gain.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->gain); + *(outbuffer + offset + 0) = (this->white_balance_blue >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->white_balance_blue >> (8 * 1)) & 0xFF; + offset += sizeof(this->white_balance_blue); + *(outbuffer + offset + 0) = (this->white_balance_red >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->white_balance_red >> (8 * 1)) & 0xFF; + offset += sizeof(this->white_balance_red); + union { + float real; + uint32_t base; + } u_temperature; + u_temperature.real = this->temperature; + *(outbuffer + offset + 0) = (u_temperature.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_temperature.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_temperature.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_temperature.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->temperature); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_time_reference; + arrToVar(length_time_reference, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_time_reference; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_time_reference-1]=0; + this->time_reference = (char *)(inbuffer + offset-1); + offset += length_time_reference; + offset += this->image.deserialize(inbuffer + offset); + offset += this->info.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_shutter; + u_shutter.base = 0; + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->shutter = u_shutter.real; + offset += sizeof(this->shutter); + union { + float real; + uint32_t base; + } u_gain; + u_gain.base = 0; + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->gain = u_gain.real; + offset += sizeof(this->gain); + this->white_balance_blue = ((uint16_t) (*(inbuffer + offset))); + this->white_balance_blue |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->white_balance_blue); + this->white_balance_red = ((uint16_t) (*(inbuffer + offset))); + this->white_balance_red |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->white_balance_red); + union { + float real; + uint32_t base; + } u_temperature; + u_temperature.base = 0; + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->temperature = u_temperature.real; + offset += sizeof(this->temperature); + return offset; + } + + const char * getType(){ return "wfov_camera_msgs/WFOVImage"; }; + const char * getMD5(){ return "807d0db423ab5e1561cfeba09a10bc88"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/wfov_camera_msgs/WFOVTrigger.h b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/wfov_camera_msgs/WFOVTrigger.h new file mode 100644 index 0000000000000000000000000000000000000000..67b0d0f1ce5902acabb7f458639d06a3b700d7d5 --- /dev/null +++ b/cr/externals/cr.robotout.mxo/Contents/Resources/ros_lib/wfov_camera_msgs/WFOVTrigger.h @@ -0,0 +1,141 @@ +#ifndef _ROS_wfov_camera_msgs_WFOVTrigger_h +#define _ROS_wfov_camera_msgs_WFOVTrigger_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "ros/time.h" + +namespace wfov_camera_msgs +{ + + class WFOVTrigger : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _time_reference_type; + _time_reference_type time_reference; + typedef ros::Time _trigger_time_type; + _trigger_time_type trigger_time; + typedef const char* _trigger_time_reference_type; + _trigger_time_reference_type trigger_time_reference; + typedef uint32_t _shutter_type; + _shutter_type shutter; + typedef uint32_t _id_type; + _id_type id; + typedef uint32_t _trigger_seq_type; + _trigger_seq_type trigger_seq; + + WFOVTrigger(): + header(), + time_reference(""), + trigger_time(), + trigger_time_reference(""), + shutter(0), + id(0), + trigger_seq(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_time_reference = strlen(this->time_reference); + varToArr(outbuffer + offset, length_time_reference); + offset += 4; + memcpy(outbuffer + offset, this->time_reference, length_time_reference); + offset += length_time_reference; + *(outbuffer + offset + 0) = (this->trigger_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->trigger_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->trigger_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->trigger_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->trigger_time.sec); + *(outbuffer + offset + 0) = (this->trigger_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->trigger_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->trigger_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->trigger_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->trigger_time.nsec); + uint32_t length_trigger_time_reference = strlen(this->trigger_time_reference); + varToArr(outbuffer + offset, length_trigger_time_reference); + offset += 4; + memcpy(outbuffer + offset, this->trigger_time_reference, length_trigger_time_reference); + offset += length_trigger_time_reference; + *(outbuffer + offset + 0) = (this->shutter >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->shutter >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->shutter >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->shutter >> (8 * 3)) & 0xFF; + offset += sizeof(this->shutter); + *(outbuffer + offset + 0) = (this->id >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->id >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->id >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->id >> (8 * 3)) & 0xFF; + offset += sizeof(this->id); + *(outbuffer + offset + 0) = (this->trigger_seq >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->trigger_seq >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->trigger_seq >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->trigger_seq >> (8 * 3)) & 0xFF; + offset += sizeof(this->trigger_seq); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_time_reference; + arrToVar(length_time_reference, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_time_reference; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_time_reference-1]=0; + this->time_reference = (char *)(inbuffer + offset-1); + offset += length_time_reference; + this->trigger_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->trigger_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->trigger_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->trigger_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->trigger_time.sec); + this->trigger_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->trigger_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->trigger_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->trigger_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->trigger_time.nsec); + uint32_t length_trigger_time_reference; + arrToVar(length_trigger_time_reference, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_trigger_time_reference; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_trigger_time_reference-1]=0; + this->trigger_time_reference = (char *)(inbuffer + offset-1); + offset += length_trigger_time_reference; + this->shutter = ((uint32_t) (*(inbuffer + offset))); + this->shutter |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->shutter |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->shutter |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->shutter); + this->id = ((uint32_t) (*(inbuffer + offset))); + this->id |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->id |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->id |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->id); + this->trigger_seq = ((uint32_t) (*(inbuffer + offset))); + this->trigger_seq |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->trigger_seq |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->trigger_seq |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->trigger_seq); + return offset; + } + + const char * getType(){ return "wfov_camera_msgs/WFOVTrigger"; }; + const char * getMD5(){ return "e38c040150f1be3148468f6b9974f8bf"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/cr/extras/cr/demo01_IO_complete.maxpat b/cr/extras/arduino/demo01_IO_complete.maxpat similarity index 100% rename from cr/extras/cr/demo01_IO_complete.maxpat rename to cr/extras/arduino/demo01_IO_complete.maxpat diff --git a/cr/extras/cr/demo02_LED.maxpat b/cr/extras/arduino/demo02_LED.maxpat similarity index 100% rename from cr/extras/cr/demo02_LED.maxpat rename to cr/extras/arduino/demo02_LED.maxpat diff --git a/cr/extras/cr/demo03_pushButton.maxpat b/cr/extras/arduino/demo03_pushButton.maxpat similarity index 100% rename from cr/extras/cr/demo03_pushButton.maxpat rename to cr/extras/arduino/demo03_pushButton.maxpat diff --git a/cr/extras/cr/demo04_tilt.maxpat b/cr/extras/arduino/demo04_tilt.maxpat similarity index 100% rename from cr/extras/cr/demo04_tilt.maxpat rename to cr/extras/arduino/demo04_tilt.maxpat diff --git a/cr/extras/cr/demo05_flex.maxpat b/cr/extras/arduino/demo05_flex.maxpat similarity index 100% rename from cr/extras/cr/demo05_flex.maxpat rename to cr/extras/arduino/demo05_flex.maxpat diff --git a/cr/extras/cr/demo06_proximity.maxpat b/cr/extras/arduino/demo06_proximity.maxpat similarity index 100% rename from cr/extras/cr/demo06_proximity.maxpat rename to cr/extras/arduino/demo06_proximity.maxpat diff --git a/cr/extras/cr/demo07_DCmotor.maxpat b/cr/extras/arduino/demo07_DCmotor.maxpat similarity index 100% rename from cr/extras/cr/demo07_DCmotor.maxpat rename to cr/extras/arduino/demo07_DCmotor.maxpat diff --git a/cr/extras/cr/tutorial01_continuousAndDiscrete.maxpat b/cr/extras/arduino/tutorial01_continuousAndDiscrete.maxpat similarity index 100% rename from cr/extras/cr/tutorial01_continuousAndDiscrete.maxpat rename to cr/extras/arduino/tutorial01_continuousAndDiscrete.maxpat diff --git a/cr/extras/cr/tutorial02_analog.maxpat b/cr/extras/arduino/tutorial02_analog.maxpat similarity index 100% rename from cr/extras/cr/tutorial02_analog.maxpat rename to cr/extras/arduino/tutorial02_analog.maxpat diff --git a/cr/extras/cr/tutorial03_digital.maxpat b/cr/extras/arduino/tutorial03_digital.maxpat similarity index 100% rename from cr/extras/cr/tutorial03_digital.maxpat rename to cr/extras/arduino/tutorial03_digital.maxpat diff --git a/cr/extras/cr/tutorial04_pwm.maxpat b/cr/extras/arduino/tutorial04_pwm.maxpat similarity index 100% rename from cr/extras/cr/tutorial04_pwm.maxpat rename to cr/extras/arduino/tutorial04_pwm.maxpat diff --git a/cr/extras/cr/tutorial05_servo.maxpat b/cr/extras/arduino/tutorial05_servo.maxpat similarity index 100% rename from cr/extras/cr/tutorial05_servo.maxpat rename to cr/extras/arduino/tutorial05_servo.maxpat diff --git a/cr/extras/ros/demo_robotin_imu.maxpat b/cr/extras/ros/demo_robotin_imu.maxpat new file mode 100644 index 0000000000000000000000000000000000000000..49d16db76734a1e844d67b80dacc350ab8b51fec --- /dev/null +++ b/cr/extras/ros/demo_robotin_imu.maxpat @@ -0,0 +1,1246 @@ +{ + "patcher" : { + "fileversion" : 1, + "appversion" : { + "major" : 7, + "minor" : 3, + "revision" : 4, + "architecture" : "x86", + "modernui" : 1 + } +, + "rect" : [ 92.0, 231.0, 1313.0, 671.0 ], + "bglocked" : 0, + "openinpresentation" : 0, + "default_fontsize" : 12.0, + "default_fontface" : 0, + "default_fontname" : "Arial", + "gridonopen" : 1, + "gridsize" : [ 15.0, 15.0 ], + "gridsnaponopen" : 1, + "objectsnaponopen" : 1, + "statusbarvisible" : 2, + "toolbarvisible" : 1, + "lefttoolbarpinned" : 0, + "toptoolbarpinned" : 0, + "righttoolbarpinned" : 0, + "bottomtoolbarpinned" : 0, + "toolbars_unpinned_last_save" : 0, + "tallnewobj" : 0, + "boxanimatetime" : 200, + "enablehscroll" : 1, + "enablevscroll" : 1, + "devicewidth" : 0.0, + "description" : "", + "digest" : "", + "tags" : "", + "style" : "", + "subpatcher_template" : "", + "boxes" : [ { + "box" : { + "id" : "obj-10", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 123.600006, 335.5, 72.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-22", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 67.5, 503.5, 59.0, 20.0 ], + "style" : "", + "text" : "Frame ID" + } + + } +, { + "box" : { + "id" : "obj-71", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 67.5, 479.5, 55.0, 22.0 ], + "style" : "", + "text" : "imu_link" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-70", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1146.099976, 426.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-66", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 991.099976, 452.5, 19.0, 20.0 ], + "style" : "", + "text" : "Z" + } + + } +, { + "box" : { + "id" : "obj-68", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 946.099976, 452.5, 19.0, 20.0 ], + "style" : "", + "text" : "Y" + } + + } +, { + "box" : { + "id" : "obj-69", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 894.599976, 452.5, 19.0, 20.0 ], + "style" : "", + "text" : "X" + } + + } +, { + "box" : { + "id" : "obj-63", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 663.099976, 452.5, 19.0, 20.0 ], + "style" : "", + "text" : "Z" + } + + } +, { + "box" : { + "id" : "obj-64", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 618.099976, 452.5, 19.0, 20.0 ], + "style" : "", + "text" : "Y" + } + + } +, { + "box" : { + "id" : "obj-65", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 566.599976, 452.5, 19.0, 20.0 ], + "style" : "", + "text" : "X" + } + + } +, { + "box" : { + "id" : "obj-60", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 579.099976, 480.0, 98.0, 20.0 ], + "style" : "", + "text" : "Angular Velocity" + } + + } +, { + "box" : { + "id" : "obj-59", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 897.599976, 480.0, 116.0, 20.0 ], + "style" : "", + "text" : "Linear Acceleration" + } + + } +, { + "box" : { + "id" : "obj-20", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 1061.099976, 480.0, 116.0, 33.0 ], + "style" : "", + "text" : "Linear Acceleration Covariance" + } + + } +, { + "box" : { + "id" : "obj-15", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 735.099976, 480.0, 98.0, 33.0 ], + "style" : "", + "text" : "Angular Velocity Covariance" + } + + } +, { + "box" : { + "id" : "obj-9", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 391.100006, 480.0, 133.0, 20.0 ], + "style" : "", + "text" : "Orientation Covariance" + } + + } +, { + "box" : { + "id" : "obj-67", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 332.0, 452.5, 23.0, 20.0 ], + "style" : "", + "text" : "W" + } + + } +, { + "box" : { + "id" : "obj-12", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 282.5, 452.5, 19.0, 20.0 ], + "style" : "", + "text" : "Z" + } + + } +, { + "box" : { + "id" : "obj-16", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 237.5, 452.5, 19.0, 20.0 ], + "style" : "", + "text" : "Y" + } + + } +, { + "box" : { + "id" : "obj-17", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 186.0, 452.5, 19.0, 20.0 ], + "style" : "", + "text" : "X" + } + + } +, { + "box" : { + "id" : "obj-8", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 221.5, 480.0, 70.0, 20.0 ], + "style" : "", + "text" : "Orientation" + } + + } +, { + "box" : { + "id" : "obj-7", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 35.600006, 359.5, 104.0, 33.0 ], + "style" : "", + "text" : "TimeStamp\nsec and nano-sec" + } + + } +, { + "box" : { + "id" : "obj-6", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 33.399994, 234.0, 30.0, 20.0 ], + "style" : "", + "text" : "Seq" + } + + } +, { + "box" : { + "id" : "obj-4", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 41.0, 179.0, 30.0, 22.0 ], + "style" : "", + "text" : "imu" + } + + } +, { + "box" : { + "id" : "obj-5", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 41.0, 151.0, 41.0, 20.0 ], + "style" : "", + "text" : "Name" + } + + } +, { + "box" : { + "id" : "obj-3", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 480.100006, 69.0, 89.0, 20.0 ], + "style" : "", + "text" : "IMU Message " + } + + } +, { + "box" : { + "id" : "obj-2", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 186.0, 94.0, 44.0, 20.0 ], + "style" : "", + "text" : "On/Off" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-58", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1094.099976, 426.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-57", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 872.599976, 426.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-48", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1042.099976, 426.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-49", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1146.099976, 402.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-50", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1094.099976, 402.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-51", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1042.099976, 402.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-52", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1146.099976, 378.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-53", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1094.099976, 378.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-54", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1042.099976, 378.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-55", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 976.599976, 426.5, 57.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-56", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 924.599976, 426.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-39", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 810.599976, 402.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-40", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 758.599976, 402.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-41", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 706.599976, 402.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-42", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 810.599976, 378.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-43", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 758.599976, 378.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-44", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 706.599976, 378.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-45", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 647.599976, 426.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-46", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 595.599976, 426.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-47", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 543.599976, 426.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-36", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 810.599976, 426.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-37", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 758.599976, 426.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-38", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 706.599976, 426.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-33", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 484.600006, 426.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-34", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 432.600006, 426.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-35", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 380.600006, 426.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-30", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 484.600006, 402.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-31", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 432.600006, 402.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-32", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 380.600006, 402.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-27", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 484.600006, 378.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-28", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 432.600006, 378.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-29", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 380.600006, 378.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-24", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 318.5, 423.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-25", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 267.0, 423.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-26", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 217.399994, 423.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-23", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 165.399994, 423.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-19", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 35.600006, 335.5, 86.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-18", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 61.100006, 234.0, 53.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-14", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 42, + "outlettype" : [ "", "int", "int", "int", "", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float" ], + "patching_rect" : [ 244.600006, 234.0, 624.0, 22.0 ], + "style" : "", + "text" : "unpack sym 0 0 0 sym 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0." + } + + } +, { + "box" : { + "id" : "obj-13", + "maxclass" : "toggle", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "int" ], + "parameter_enable" : 0, + "patching_rect" : [ 244.600006, 94.0, 24.0, 24.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-1", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 244.600006, 160.0, 175.0, 22.0 ], + "style" : "", + "text" : "cr.robotin 192.168.1.200 @imu" + } + + } + ], + "lines" : [ { + "patchline" : { + "destination" : [ "obj-14", 0 ], + "source" : [ "obj-1", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-13", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-10", 0 ], + "source" : [ "obj-14", 3 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-18", 0 ], + "source" : [ "obj-14", 1 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-19", 0 ], + "source" : [ "obj-14", 2 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-23", 0 ], + "source" : [ "obj-14", 5 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-24", 0 ], + "source" : [ "obj-14", 8 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-25", 0 ], + "source" : [ "obj-14", 7 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-26", 0 ], + "source" : [ "obj-14", 6 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-27", 0 ], + "source" : [ "obj-14", 11 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-28", 0 ], + "source" : [ "obj-14", 10 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-29", 0 ], + "source" : [ "obj-14", 9 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-30", 0 ], + "source" : [ "obj-14", 14 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-31", 0 ], + "source" : [ "obj-14", 13 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-32", 0 ], + "source" : [ "obj-14", 12 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-33", 0 ], + "source" : [ "obj-14", 17 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-34", 0 ], + "source" : [ "obj-14", 16 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-35", 0 ], + "source" : [ "obj-14", 15 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-36", 0 ], + "source" : [ "obj-14", 29 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-37", 0 ], + "source" : [ "obj-14", 28 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-38", 0 ], + "source" : [ "obj-14", 27 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-39", 0 ], + "source" : [ "obj-14", 26 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-4", 0 ], + "source" : [ "obj-14", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-40", 0 ], + "source" : [ "obj-14", 25 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-41", 0 ], + "source" : [ "obj-14", 24 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-42", 0 ], + "source" : [ "obj-14", 23 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-43", 0 ], + "source" : [ "obj-14", 22 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-44", 0 ], + "source" : [ "obj-14", 21 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-45", 0 ], + "source" : [ "obj-14", 20 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-46", 0 ], + "source" : [ "obj-14", 19 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-47", 0 ], + "source" : [ "obj-14", 18 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-48", 0 ], + "source" : [ "obj-14", 39 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-49", 0 ], + "source" : [ "obj-14", 38 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-50", 0 ], + "source" : [ "obj-14", 37 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-51", 0 ], + "source" : [ "obj-14", 36 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-52", 0 ], + "source" : [ "obj-14", 35 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-53", 0 ], + "source" : [ "obj-14", 34 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-54", 0 ], + "source" : [ "obj-14", 33 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-55", 0 ], + "source" : [ "obj-14", 32 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-56", 0 ], + "source" : [ "obj-14", 31 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-57", 0 ], + "source" : [ "obj-14", 30 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-58", 0 ], + "source" : [ "obj-14", 40 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-70", 0 ], + "source" : [ "obj-14", 41 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-71", 0 ], + "source" : [ "obj-14", 4 ] + } + + } + ], + "dependency_cache" : [ { + "name" : "cr.robotin.mxo", + "type" : "iLaX" + } + ], + "autosave" : 0 + } + +} diff --git a/cr/extras/ros/demo_robotin_joints.maxpat b/cr/extras/ros/demo_robotin_joints.maxpat new file mode 100644 index 0000000000000000000000000000000000000000..cd08fa0faee1fd6a476ed9259b6c62e8ad9ac7d9 --- /dev/null +++ b/cr/extras/ros/demo_robotin_joints.maxpat @@ -0,0 +1,545 @@ +{ + "patcher" : { + "fileversion" : 1, + "appversion" : { + "major" : 7, + "minor" : 3, + "revision" : 4, + "architecture" : "x86", + "modernui" : 1 + } +, + "rect" : [ 114.0, 169.0, 1132.0, 430.0 ], + "bglocked" : 0, + "openinpresentation" : 0, + "default_fontsize" : 12.0, + "default_fontface" : 0, + "default_fontname" : "Arial", + "gridonopen" : 1, + "gridsize" : [ 15.0, 15.0 ], + "gridsnaponopen" : 1, + "objectsnaponopen" : 1, + "statusbarvisible" : 2, + "toolbarvisible" : 1, + "lefttoolbarpinned" : 0, + "toptoolbarpinned" : 0, + "righttoolbarpinned" : 0, + "bottomtoolbarpinned" : 0, + "toolbars_unpinned_last_save" : 0, + "tallnewobj" : 0, + "boxanimatetime" : 200, + "enablehscroll" : 1, + "enablevscroll" : 1, + "devicewidth" : 0.0, + "description" : "", + "digest" : "", + "tags" : "", + "style" : "", + "subpatcher_template" : "", + "boxes" : [ { + "box" : { + "id" : "obj-16", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 399.0, 284.0, 90.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-28", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 898.0, 315.0, 90.0, 20.0 ], + "style" : "", + "text" : "Effort 2" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-29", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 898.0, 284.0, 90.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-30", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 824.0, 315.0, 66.0, 20.0 ], + "style" : "", + "text" : "Velocity 2" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-31", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 824.0, 284.0, 66.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-32", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 751.0, 315.0, 66.0, 20.0 ], + "style" : "", + "text" : "Position 2" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-33", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 751.0, 284.0, 66.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-26", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 898.0, 220.0, 90.0, 20.0 ], + "style" : "", + "text" : "Effort 1" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-27", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 898.0, 189.0, 90.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-24", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 824.0, 220.0, 66.0, 20.0 ], + "style" : "", + "text" : "Velocity 1" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-25", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 824.0, 189.0, 66.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-23", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 751.0, 220.0, 66.0, 20.0 ], + "style" : "", + "text" : "Position 1" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-22", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 751.0, 189.0, 66.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-15", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 654.0, 315.0, 47.0, 20.0 ], + "style" : "", + "text" : "Joint 2" + } + + } +, { + "box" : { + "id" : "obj-17", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 654.0, 284.0, 119.0, 22.0 ], + "style" : "", + "text" : "wheel_right_joint" + } + + } +, { + "box" : { + "id" : "obj-12", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 654.0, 220.0, 47.0, 20.0 ], + "style" : "", + "text" : "Joint 1" + } + + } +, { + "box" : { + "id" : "obj-13", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 654.0, 189.0, 111.0, 22.0 ], + "style" : "", + "text" : "wheel_left_joint" + } + + } +, { + "box" : { + "id" : "obj-8", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 513.5, 308.0, 77.0, 20.0 ], + "style" : "", + "text" : "Frame ID" + } + + } +, { + "box" : { + "id" : "obj-10", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 513.5, 284.0, 87.0, 22.0 ], + "style" : "", + "text" : "base_footprint" + } + + } +, { + "box" : { + "id" : "obj-9", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 73.0, 248.0, 43.0, 20.0 ], + "style" : "", + "text" : "Name" + } + + } +, { + "box" : { + "id" : "obj-7", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 307.0, 308.0, 104.0, 33.0 ], + "style" : "", + "text" : "TimeStamp\nsec and nano-sec" + } + + } +, { + "box" : { + "id" : "obj-6", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 195.0, 308.0, 33.0, 20.0 ], + "style" : "", + "text" : "Seq" + } + + } +, { + "box" : { + "id" : "obj-19", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 307.0, 284.0, 90.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-18", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 195.0, 284.0, 85.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-2", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 120.0, 248.0, 39.0, 22.0 ], + "style" : "", + "text" : "joints" + } + + } +, { + "box" : { + "id" : "obj-20", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 346.0, 37.0, 74.0, 20.0 ], + "style" : "", + "text" : "Joints State" + } + + } +, { + "box" : { + "id" : "obj-103", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 13, + "outlettype" : [ "", "int", "int", "int", "", "", "", "float", "float", "float", "float", "float", "float" ], + "patching_rect" : [ 182.0, 170.0, 261.0, 22.0 ], + "style" : "", + "text" : "unpack sym 0 0 0 sym sym sym 0. 0. 0. 0. 0. 0." + } + + } +, { + "box" : { + "id" : "obj-4", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 232.5, 71.0, 39.0, 22.0 ], + "style" : "", + "text" : "close" + } + + } +, { + "box" : { + "id" : "obj-3", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 182.0, 71.0, 37.0, 22.0 ], + "style" : "", + "text" : "open" + } + + } +, { + "box" : { + "id" : "obj-1", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 182.0, 124.0, 183.0, 22.0 ], + "style" : "", + "text" : "cr.robotin 192.168.1.200 @joints" + } + + } + ], + "lines" : [ { + "patchline" : { + "destination" : [ "obj-103", 0 ], + "source" : [ "obj-1", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-10", 0 ], + "source" : [ "obj-103", 4 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-13", 0 ], + "source" : [ "obj-103", 5 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-16", 0 ], + "source" : [ "obj-103", 3 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-17", 0 ], + "source" : [ "obj-103", 6 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-18", 0 ], + "source" : [ "obj-103", 1 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-19", 0 ], + "source" : [ "obj-103", 2 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-2", 0 ], + "source" : [ "obj-103", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-22", 0 ], + "source" : [ "obj-103", 7 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-25", 0 ], + "source" : [ "obj-103", 9 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-27", 0 ], + "source" : [ "obj-103", 11 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-29", 0 ], + "source" : [ "obj-103", 12 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-31", 0 ], + "source" : [ "obj-103", 10 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-33", 0 ], + "source" : [ "obj-103", 8 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-3", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-4", 0 ] + } + + } + ], + "dependency_cache" : [ { + "name" : "cr.robotin.mxo", + "type" : "iLaX" + } + ], + "autosave" : 0 + } + +} diff --git a/cr/extras/ros/demo_robotin_laser.maxpat b/cr/extras/ros/demo_robotin_laser.maxpat new file mode 100644 index 0000000000000000000000000000000000000000..dfbf92648cfefd0f000babd5c793a1da136f8b07 --- /dev/null +++ b/cr/extras/ros/demo_robotin_laser.maxpat @@ -0,0 +1,521 @@ +{ + "patcher" : { + "fileversion" : 1, + "appversion" : { + "major" : 7, + "minor" : 3, + "revision" : 4, + "architecture" : "x86", + "modernui" : 1 + } +, + "rect" : [ 192.0, 115.0, 785.0, 462.0 ], + "bglocked" : 0, + "openinpresentation" : 0, + "default_fontsize" : 12.0, + "default_fontface" : 0, + "default_fontname" : "Arial", + "gridonopen" : 1, + "gridsize" : [ 15.0, 15.0 ], + "gridsnaponopen" : 1, + "objectsnaponopen" : 1, + "statusbarvisible" : 2, + "toolbarvisible" : 1, + "lefttoolbarpinned" : 0, + "toptoolbarpinned" : 0, + "righttoolbarpinned" : 0, + "bottomtoolbarpinned" : 0, + "toolbars_unpinned_last_save" : 0, + "tallnewobj" : 0, + "boxanimatetime" : 200, + "enablehscroll" : 1, + "enablevscroll" : 1, + "devicewidth" : 0.0, + "description" : "", + "digest" : "", + "tags" : "", + "style" : "", + "subpatcher_template" : "", + "boxes" : [ { + "box" : { + "id" : "obj-16", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 181.0, 353.5, 68.0, 20.0 ], + "style" : "", + "text" : "Frame ID " + } + + } +, { + "box" : { + "id" : "obj-20", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 62.0, 349.0, 105.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-14", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 659.0, 353.5, 50.0, 33.0 ], + "style" : "", + "text" : "Range (max)" + } + + } +, { + "box" : { + "id" : "obj-15", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 600.0, 353.5, 50.0, 33.0 ], + "style" : "", + "text" : "Range (min)" + } + + } +, { + "box" : { + "id" : "obj-13", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 543.0, 353.5, 50.0, 33.0 ], + "style" : "", + "text" : "Scan Time" + } + + } +, { + "box" : { + "id" : "obj-12", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 470.0, 353.5, 71.0, 33.0 ], + "style" : "", + "text" : "Time (increment)" + } + + } +, { + "box" : { + "id" : "obj-11", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 395.0, 353.5, 70.0, 33.0 ], + "style" : "", + "text" : "Angle (increment)" + } + + } +, { + "box" : { + "id" : "obj-10", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 348.181824, 353.5, 45.0, 33.0 ], + "style" : "", + "text" : "Angle (max)" + } + + } +, { + "box" : { + "id" : "obj-8", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 285.5, 353.5, 43.0, 33.0 ], + "style" : "", + "text" : "Angle (min)" + } + + } +, { + "box" : { + "id" : "obj-5", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 181.0, 325.0, 69.0, 22.0 ], + "style" : "", + "text" : "base_scan" + } + + } +, { + "box" : { + "id" : "obj-9", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 102.0, 149.0, 41.0, 20.0 ], + "style" : "", + "text" : "Name" + } + + } +, { + "box" : { + "id" : "obj-7", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 62.0, 373.0, 104.0, 33.0 ], + "style" : "", + "text" : "TimeStamp\nsec and nano-sec" + } + + } +, { + "box" : { + "id" : "obj-6", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 77.0, 242.5, 30.0, 20.0 ], + "style" : "", + "text" : "Seq" + } + + } +, { + "box" : { + "id" : "obj-19", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 62.0, 325.0, 105.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-18", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 109.0, 242.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-2", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 385.0, 53.0, 132.0, 20.0 ], + "style" : "", + "text" : " Laser Scan Message " + } + + } +, { + "box" : { + "id" : "obj-62", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 102.0, 175.0, 37.0, 22.0 ], + "style" : "", + "text" : "laser" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-92", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 659.0, 325.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-93", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 600.0, 325.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-94", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 543.0, 325.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-95", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 480.0, 325.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-96", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 401.0, 325.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-97", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 343.181824, 325.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-98", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 285.5, 325.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-103", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 12, + "outlettype" : [ "", "int", "int", "int", "", "float", "float", "float", "float", "float", "float", "float" ], + "patching_rect" : [ 245.0, 182.0, 223.0, 22.0 ], + "style" : "", + "text" : "unpack sym 0 0 0 sym 0. 0. 0. 0. 0. 0. 0." + } + + } +, { + "box" : { + "id" : "obj-4", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 296.5, 92.0, 39.0, 22.0 ], + "style" : "", + "text" : "close" + } + + } +, { + "box" : { + "id" : "obj-3", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 246.0, 92.0, 37.0, 22.0 ], + "style" : "", + "text" : "open" + } + + } +, { + "box" : { + "id" : "obj-1", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 245.0, 138.0, 181.0, 22.0 ], + "style" : "", + "text" : "cr.robotin 192.168.1.200 @laser" + } + + } + ], + "lines" : [ { + "patchline" : { + "destination" : [ "obj-103", 0 ], + "source" : [ "obj-1", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-18", 0 ], + "source" : [ "obj-103", 1 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-19", 0 ], + "source" : [ "obj-103", 2 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-20", 0 ], + "source" : [ "obj-103", 3 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-5", 0 ], + "source" : [ "obj-103", 4 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-62", 0 ], + "source" : [ "obj-103", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-92", 0 ], + "source" : [ "obj-103", 11 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-93", 0 ], + "source" : [ "obj-103", 10 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-94", 0 ], + "source" : [ "obj-103", 9 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-95", 0 ], + "source" : [ "obj-103", 8 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-96", 0 ], + "source" : [ "obj-103", 7 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-97", 0 ], + "source" : [ "obj-103", 6 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-98", 0 ], + "source" : [ "obj-103", 5 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-3", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-4", 0 ] + } + + } + ], + "dependency_cache" : [ { + "name" : "cr.robotin.mxo", + "type" : "iLaX" + } + ], + "autosave" : 0 + } + +} diff --git a/cr/extras/ros/demo_robotin_odometry.maxpat b/cr/extras/ros/demo_robotin_odometry.maxpat new file mode 100644 index 0000000000000000000000000000000000000000..e2a3b967c81d5e745d987d91bf281b7f05e772ba --- /dev/null +++ b/cr/extras/ros/demo_robotin_odometry.maxpat @@ -0,0 +1,1992 @@ +{ + "patcher" : { + "fileversion" : 1, + "appversion" : { + "major" : 7, + "minor" : 3, + "revision" : 4, + "architecture" : "x86", + "modernui" : 1 + } +, + "rect" : [ 37.0, 155.0, 1540.0, 695.0 ], + "bglocked" : 0, + "openinpresentation" : 0, + "default_fontsize" : 12.0, + "default_fontface" : 0, + "default_fontname" : "Arial", + "gridonopen" : 1, + "gridsize" : [ 15.0, 15.0 ], + "gridsnaponopen" : 1, + "objectsnaponopen" : 1, + "statusbarvisible" : 2, + "toolbarvisible" : 1, + "lefttoolbarpinned" : 0, + "toptoolbarpinned" : 0, + "righttoolbarpinned" : 0, + "bottomtoolbarpinned" : 0, + "toolbars_unpinned_last_save" : 0, + "tallnewobj" : 0, + "boxanimatetime" : 200, + "enablehscroll" : 1, + "enablevscroll" : 1, + "devicewidth" : 0.0, + "description" : "", + "digest" : "", + "tags" : "", + "style" : "", + "subpatcher_template" : "", + "boxes" : [ { + "box" : { + "id" : "obj-5", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 145.0, 289.5, 79.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-33", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 289.0, 105.0, 39.0, 22.0 ], + "style" : "", + "text" : "close" + } + + } +, { + "box" : { + "id" : "obj-36", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 248.0, 105.0, 37.0, 22.0 ], + "style" : "", + "text" : "open" + } + + } +, { + "box" : { + "id" : "obj-25", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 133.0, 473.0, 82.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-22", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 66.0, 473.0, 41.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-129", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1430.5, 310.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-130", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1378.5, 310.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-131", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1326.5, 310.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-132", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1430.5, 286.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-133", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1378.5, 286.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-134", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1326.5, 286.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-135", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1430.5, 262.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-136", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1378.5, 262.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-137", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1326.5, 262.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-138", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1274.5, 310.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-139", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1222.5, 310.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-140", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1170.5, 310.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-141", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1274.5, 286.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-142", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1222.5, 286.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-143", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1170.5, 286.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-144", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1274.5, 262.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-145", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1222.5, 262.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-146", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1170.5, 262.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-147", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1430.5, 382.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-148", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1378.5, 382.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-149", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1326.5, 382.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-150", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1430.5, 358.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-151", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1378.5, 358.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-152", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1326.5, 358.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-153", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1430.5, 334.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-154", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1378.5, 334.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-155", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1326.5, 334.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-156", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1274.5, 382.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-157", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1222.5, 382.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-158", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1170.5, 382.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-159", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1274.5, 358.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-160", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1222.5, 358.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-161", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1170.5, 358.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-162", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1274.5, 334.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-163", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1222.5, 334.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-164", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1170.5, 334.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-115", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 1193.5, 516.5, 19.0, 20.0 ], + "style" : "", + "text" : "Z" + } + + } +, { + "box" : { + "id" : "obj-116", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 1141.5, 516.5, 19.0, 20.0 ], + "style" : "", + "text" : "Y" + } + + } +, { + "box" : { + "id" : "obj-117", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 1085.0, 516.5, 19.0, 20.0 ], + "style" : "", + "text" : "X" + } + + } +, { + "box" : { + "id" : "obj-118", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 1001.0, 516.5, 19.0, 20.0 ], + "style" : "", + "text" : "Z" + } + + } +, { + "box" : { + "id" : "obj-119", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 944.5, 516.5, 19.0, 20.0 ], + "style" : "", + "text" : "Y" + } + + } +, { + "box" : { + "id" : "obj-120", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 888.0, 516.5, 19.0, 20.0 ], + "style" : "", + "text" : "X" + } + + } +, { + "box" : { + "id" : "obj-121", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 1093.0, 551.5, 135.0, 20.0 ], + "style" : "", + "text" : "Twist - Angular Velocity" + } + + } +, { + "box" : { + "id" : "obj-122", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 891.5, 551.5, 128.0, 20.0 ], + "style" : "", + "text" : "Twist - Linear Velocity\n" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-123", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1178.0, 475.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-124", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1126.0, 475.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-125", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 1074.0, 475.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-126", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 981.0, 475.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-127", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 929.0, 475.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-128", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 877.0, 475.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-106", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 845.5, 310.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-107", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 793.5, 310.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-108", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 741.5, 310.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-109", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 845.5, 286.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-110", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 793.5, 286.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-111", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 741.5, 286.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-112", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 845.5, 262.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-113", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 793.5, 262.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-114", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 741.5, 262.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-79", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 689.5, 310.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-80", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 637.5, 310.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-81", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 585.5, 310.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-82", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 689.5, 286.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-83", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 637.5, 286.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-84", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 585.5, 286.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-85", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 689.5, 262.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-86", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 637.5, 262.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-87", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 585.5, 262.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-70", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 845.5, 382.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-71", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 793.5, 382.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-72", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 741.5, 382.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-73", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 845.5, 358.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-74", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 793.5, 358.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-75", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 741.5, 358.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-76", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 845.5, 334.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-77", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 793.5, 334.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-78", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 741.5, 334.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-69", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 679.5, 424.5, 112.0, 20.0 ], + "style" : "", + "text" : "Pose - Covariance" + } + + } +, { + "box" : { + "id" : "obj-67", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 612.0, 516.5, 23.0, 20.0 ], + "style" : "", + "text" : "W" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-68", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 592.0, 475.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-12", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 558.0, 516.5, 19.0, 20.0 ], + "style" : "", + "text" : "Z" + } + + } +, { + "box" : { + "id" : "obj-16", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 501.5, 516.5, 19.0, 20.0 ], + "style" : "", + "text" : "Y" + } + + } +, { + "box" : { + "id" : "obj-17", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 445.0, 516.5, 19.0, 20.0 ], + "style" : "", + "text" : "X" + } + + } +, { + "box" : { + "id" : "obj-15", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 361.0, 516.5, 19.0, 20.0 ], + "style" : "", + "text" : "Z" + } + + } +, { + "box" : { + "id" : "obj-20", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 304.5, 516.5, 19.0, 20.0 ], + "style" : "", + "text" : "Y" + } + + } +, { + "box" : { + "id" : "obj-4", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 248.0, 516.5, 19.0, 20.0 ], + "style" : "", + "text" : "X" + } + + } +, { + "box" : { + "id" : "obj-59", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 476.0, 551.5, 112.0, 20.0 ], + "style" : "", + "text" : "Pose - Orientation" + } + + } +, { + "box" : { + "id" : "obj-60", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 265.0, 551.5, 94.0, 20.0 ], + "style" : "", + "text" : "Pose - Position\n" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-61", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 538.0, 475.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-62", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 486.0, 475.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-63", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 434.0, 475.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-64", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 341.0, 475.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-65", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 289.0, 475.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-66", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 237.0, 475.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-11", + "linecount" : 3, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 133.0, 503.5, 47.0, 47.0 ], + "style" : "", + "text" : "Child Frame ID" + } + + } +, { + "box" : { + "id" : "obj-10", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 66.0, 503.5, 50.0, 33.0 ], + "style" : "", + "text" : "Frame \nID" + } + + } +, { + "box" : { + "id" : "obj-8", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 57.0, 191.0, 61.0, 22.0 ], + "style" : "", + "text" : "odometry" + } + + } +, { + "box" : { + "id" : "obj-9", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 57.0, 163.0, 41.0, 20.0 ], + "style" : "", + "text" : "Name" + } + + } +, { + "box" : { + "id" : "obj-7", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 53.0, 313.5, 104.0, 33.0 ], + "style" : "", + "text" : "TimeStamp\nsec and nano-sec" + } + + } +, { + "box" : { + "id" : "obj-6", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 41.0, 230.5, 58.0, 20.0 ], + "style" : "", + "text" : "Seq" + } + + } +, { + "box" : { + "id" : "obj-3", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 197.0, 106.0, 45.0, 20.0 ], + "style" : "", + "text" : "On/Off" + } + + } +, { + "box" : { + "id" : "obj-2", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 675.5, 69.0, 120.0, 20.0 ], + "style" : "", + "text" : " Odometry Message " + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-34", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 689.5, 382.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-35", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 637.5, 382.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-30", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 585.5, 382.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-31", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 689.5, 358.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-32", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 637.5, 358.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-27", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 585.5, 358.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-28", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 689.5, 334.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-29", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 637.5, 334.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-24", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 585.5, 334.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-19", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 53.0, 289.5, 90.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-18", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 73.0, 230.5, 78.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-14", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 86, + "outlettype" : [ "", "int", "int", "int", "", "", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "", "float", "float", "float", "float", "float", "float", "float", "float", "float" ], + "patching_rect" : [ 248.0, 205.0, 1263.0, 22.0 ], + "style" : "", + "text" : "unpack sym 0 0 0 sym sym 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.0. 0. 0. 0. 0. 0. 0. 0. 0. 0." + } + + } +, { + "box" : { + "id" : "obj-1", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 248.0, 163.0, 205.0, 22.0 ], + "style" : "", + "text" : "cr.robotin 192.168.1.200 @odometry" + } + + } + ], + "lines" : [ { + "patchline" : { + "destination" : [ "obj-14", 0 ], + "source" : [ "obj-1", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-112", 0 ], + "source" : [ "obj-14", 18 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-113", 0 ], + "source" : [ "obj-14", 17 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-114", 0 ], + "source" : [ "obj-14", 16 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-123", 0 ], + "source" : [ "obj-14", 53 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-124", 0 ], + "source" : [ "obj-14", 52 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-125", 0 ], + "source" : [ "obj-14", 51 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-126", 0 ], + "source" : [ "obj-14", 50 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-127", 0 ], + "source" : [ "obj-14", 49 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-128", 0 ], + "source" : [ "obj-14", 48 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-135", 0 ], + "source" : [ "obj-14", 59 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-136", 0 ], + "source" : [ "obj-14", 58 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-137", 0 ], + "source" : [ "obj-14", 57 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-144", 0 ], + "source" : [ "obj-14", 56 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-145", 0 ], + "source" : [ "obj-14", 55 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-146", 0 ], + "source" : [ "obj-14", 54 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-147", 0 ], + "source" : [ "obj-14", 85 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-148", 0 ], + "source" : [ "obj-14", 84 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-149", 0 ], + "source" : [ "obj-14", 83 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-156", 0 ], + "source" : [ "obj-14", 82 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-157", 0 ], + "source" : [ "obj-14", 81 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-158", 0 ], + "source" : [ "obj-14", 80 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-18", 0 ], + "source" : [ "obj-14", 1 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-19", 0 ], + "source" : [ "obj-14", 2 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-22", 0 ], + "source" : [ "obj-14", 4 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-25", 0 ], + "source" : [ "obj-14", 5 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-30", 0 ], + "source" : [ "obj-14", 42 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-34", 0 ], + "source" : [ "obj-14", 44 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-35", 0 ], + "source" : [ "obj-14", 43 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-5", 0 ], + "source" : [ "obj-14", 3 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-61", 0 ], + "source" : [ "obj-14", 11 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-62", 0 ], + "source" : [ "obj-14", 10 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-63", 0 ], + "source" : [ "obj-14", 9 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-64", 0 ], + "source" : [ "obj-14", 8 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-65", 0 ], + "source" : [ "obj-14", 7 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-66", 0 ], + "source" : [ "obj-14", 6 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-68", 0 ], + "source" : [ "obj-14", 12 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-70", 0 ], + "source" : [ "obj-14", 47 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-71", 0 ], + "source" : [ "obj-14", 46 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-72", 0 ], + "source" : [ "obj-14", 45 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-8", 0 ], + "source" : [ "obj-14", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-85", 0 ], + "source" : [ "obj-14", 15 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-86", 0 ], + "source" : [ "obj-14", 14 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-87", 0 ], + "source" : [ "obj-14", 13 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-33", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-36", 0 ] + } + + } + ], + "dependency_cache" : [ { + "name" : "cr.robotin.mxo", + "type" : "iLaX" + } + ], + "autosave" : 0 + } + +} diff --git a/cr/extras/ros/demo_robotin_sensors.maxpat b/cr/extras/ros/demo_robotin_sensors.maxpat new file mode 100644 index 0000000000000000000000000000000000000000..e18942a88865677498c12fcb557cd750835e3f91 --- /dev/null +++ b/cr/extras/ros/demo_robotin_sensors.maxpat @@ -0,0 +1,406 @@ +{ + "patcher" : { + "fileversion" : 1, + "appversion" : { + "major" : 7, + "minor" : 3, + "revision" : 4, + "architecture" : "x86", + "modernui" : 1 + } +, + "rect" : [ 719.0, 169.0, 652.0, 512.0 ], + "bglocked" : 0, + "openinpresentation" : 0, + "default_fontsize" : 12.0, + "default_fontface" : 0, + "default_fontname" : "Arial", + "gridonopen" : 1, + "gridsize" : [ 15.0, 15.0 ], + "gridsnaponopen" : 1, + "objectsnaponopen" : 1, + "statusbarvisible" : 2, + "toolbarvisible" : 1, + "lefttoolbarpinned" : 0, + "toptoolbarpinned" : 0, + "righttoolbarpinned" : 0, + "bottomtoolbarpinned" : 0, + "toolbars_unpinned_last_save" : 0, + "tallnewobj" : 0, + "boxanimatetime" : 200, + "enablehscroll" : 1, + "enablevscroll" : 1, + "devicewidth" : 0.0, + "description" : "", + "digest" : "", + "tags" : "", + "style" : "", + "subpatcher_template" : "", + "boxes" : [ { + "box" : { + "id" : "obj-39", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 41.0, 156.0, 53.0, 22.0 ], + "style" : "", + "text" : "sensors" + } + + } +, { + "box" : { + "id" : "obj-38", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 41.0, 127.0, 41.0, 20.0 ], + "style" : "", + "text" : "Name" + } + + } +, { + "box" : { + "id" : "obj-37", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 173.0, 225.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-35", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 116.0, 56.0, 45.0, 20.0 ], + "style" : "", + "text" : "On/Off" + } + + } +, { + "box" : { + "id" : "obj-34", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 534.0, 273.0, 54.0, 20.0 ], + "style" : "", + "text" : "Battery" + } + + } +, { + "box" : { + "id" : "obj-33", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 468.0, 273.0, 54.0, 33.0 ], + "style" : "", + "text" : "Right \nEncoder" + } + + } +, { + "box" : { + "id" : "obj-32", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 390.5, 273.0, 54.0, 33.0 ], + "style" : "", + "text" : "Left \nEncoder" + } + + } +, { + "box" : { + "id" : "obj-31", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 321.0, 273.0, 50.0, 20.0 ], + "style" : "", + "text" : "Button" + } + + } +, { + "box" : { + "id" : "obj-30", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 249.0, 273.0, 50.0, 20.0 ], + "style" : "", + "text" : "Cliff" + } + + } +, { + "box" : { + "id" : "obj-29", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 173.0, 273.0, 50.0, 20.0 ], + "style" : "", + "text" : "Bunper" + } + + } +, { + "box" : { + "id" : "obj-28", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 39.0, 273.0, 104.0, 33.0 ], + "style" : "", + "text" : "TimeStamp\nsec and nano-sec" + } + + } +, { + "box" : { + "id" : "obj-26", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 468.0, 225.5, 54.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-25", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 390.5, 225.5, 58.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-24", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 321.0, 225.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-22", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 249.0, 225.5, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-20", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 243.5, 30.0, 87.0, 20.0 ], + "style" : "", + "text" : "Sensors State\n" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-96", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 534.0, 225.5, 54.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-101", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 41.0, 244.5, 102.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-102", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 41.0, 220.5, 102.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-103", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 9, + "outlettype" : [ "", "int", "int", "int", "int", "int", "int", "int", "float" ], + "patching_rect" : [ 178.0, 143.0, 158.0, 22.0 ], + "style" : "", + "text" : "unpack sym 0 0 0 0 0 0 0 0." + } + + } +, { + "box" : { + "id" : "obj-13", + "maxclass" : "toggle", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "int" ], + "parameter_enable" : 0, + "patching_rect" : [ 178.0, 54.0, 24.0, 24.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-1", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 178.0, 104.0, 197.0, 22.0 ], + "style" : "", + "text" : "cr.robotin 192.168.1.200 @sensors" + } + + } + ], + "lines" : [ { + "patchline" : { + "destination" : [ "obj-103", 0 ], + "source" : [ "obj-1", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-101", 0 ], + "source" : [ "obj-103", 2 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-102", 0 ], + "source" : [ "obj-103", 1 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-22", 0 ], + "source" : [ "obj-103", 4 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-24", 0 ], + "source" : [ "obj-103", 5 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-25", 0 ], + "source" : [ "obj-103", 6 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-26", 0 ], + "source" : [ "obj-103", 7 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-37", 0 ], + "source" : [ "obj-103", 3 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-39", 0 ], + "source" : [ "obj-103", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-96", 0 ], + "source" : [ "obj-103", 8 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-13", 0 ] + } + + } + ], + "dependency_cache" : [ { + "name" : "cr.robotin.mxo", + "type" : "iLaX" + } + ], + "autosave" : 0 + } + +} diff --git a/cr/extras/ros/demo_robotin_tf.maxpat b/cr/extras/ros/demo_robotin_tf.maxpat new file mode 100644 index 0000000000000000000000000000000000000000..0c25fc2bd71ed2ba0b2209ef1cc71c11c2b08e50 --- /dev/null +++ b/cr/extras/ros/demo_robotin_tf.maxpat @@ -0,0 +1,561 @@ +{ + "patcher" : { + "fileversion" : 1, + "appversion" : { + "major" : 7, + "minor" : 3, + "revision" : 4, + "architecture" : "x86", + "modernui" : 1 + } +, + "rect" : [ 405.0, 181.0, 842.0, 394.0 ], + "bglocked" : 0, + "openinpresentation" : 0, + "default_fontsize" : 12.0, + "default_fontface" : 0, + "default_fontname" : "Arial", + "gridonopen" : 1, + "gridsize" : [ 15.0, 15.0 ], + "gridsnaponopen" : 1, + "objectsnaponopen" : 1, + "statusbarvisible" : 2, + "toolbarvisible" : 1, + "lefttoolbarpinned" : 0, + "toptoolbarpinned" : 0, + "righttoolbarpinned" : 0, + "bottomtoolbarpinned" : 0, + "toolbars_unpinned_last_save" : 0, + "tallnewobj" : 0, + "boxanimatetime" : 200, + "enablehscroll" : 1, + "enablevscroll" : 1, + "devicewidth" : 0.0, + "description" : "", + "digest" : "", + "tags" : "", + "style" : "", + "subpatcher_template" : "", + "boxes" : [ { + "box" : { + "id" : "obj-10", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 660.0, 271.0, 58.0, 20.0 ], + "style" : "", + "text" : "Rotation" + } + + } +, { + "box" : { + "id" : "obj-4", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 423.0, 271.0, 68.0, 20.0 ], + "style" : "", + "text" : "Translation" + } + + } +, { + "box" : { + "id" : "obj-16", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 264.0, 271.0, 93.0, 20.0 ], + "style" : "", + "text" : "Child Frame ID" + } + + } +, { + "box" : { + "id" : "obj-15", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 175.5, 270.0, 59.0, 20.0 ], + "style" : "", + "text" : "Frame ID" + } + + } +, { + "box" : { + "id" : "obj-14", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 264.0, 244.0, 93.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-12", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 173.5, 243.0, 61.0, 22.0 ], + "style" : "", + "text" : "base_link" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-11", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 369.0, 218.5, 54.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-8", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 493.0, 218.5, 54.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-9", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 432.0, 218.5, 54.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-6", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 636.0, 218.5, 54.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-7", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 580.0, 218.5, 54.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-5", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 36.0, 176.0, 41.0, 20.0 ], + "style" : "", + "text" : "Seq" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-3", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 748.0, 218.5, 54.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-2", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 748.0, 244.0, 54.0, 20.0 ], + "style" : "", + "text" : "W" + } + + } +, { + "box" : { + "id" : "obj-39", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 79.0, 145.0, 29.5, 22.0 ], + "style" : "", + "text" : "tf" + } + + } +, { + "box" : { + "id" : "obj-38", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 36.0, 145.0, 41.0, 20.0 ], + "style" : "", + "text" : "Name" + } + + } +, { + "box" : { + "id" : "obj-37", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 40.0, 273.0, 102.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-35", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 173.5, 58.0, 45.0, 20.0 ], + "style" : "", + "text" : "On/Off" + } + + } +, { + "box" : { + "id" : "obj-34", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 692.0, 244.0, 54.0, 20.0 ], + "style" : "", + "text" : "Z" + } + + } +, { + "box" : { + "id" : "obj-33", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 636.0, 244.0, 54.0, 20.0 ], + "style" : "", + "text" : "Y" + } + + } +, { + "box" : { + "id" : "obj-32", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 580.0, 244.0, 54.0, 20.0 ], + "style" : "", + "text" : "X" + } + + } +, { + "box" : { + "id" : "obj-31", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 497.0, 244.0, 50.0, 20.0 ], + "style" : "", + "text" : "Z" + } + + } +, { + "box" : { + "id" : "obj-30", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 432.0, 244.0, 50.0, 20.0 ], + "style" : "", + "text" : "Y" + } + + } +, { + "box" : { + "id" : "obj-29", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 371.0, 244.0, 50.0, 20.0 ], + "style" : "", + "text" : "X" + } + + } +, { + "box" : { + "id" : "obj-28", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 40.0, 297.0, 104.0, 33.0 ], + "style" : "", + "text" : "TimeStamp\nsec and nano-sec" + } + + } +, { + "box" : { + "id" : "obj-20", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 314.0, 29.0, 118.5, 20.0 ], + "style" : "", + "text" : "TF (Transformation)\n" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-96", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 692.0, 218.5, 54.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-101", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 40.0, 250.0, 102.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-102", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 79.0, 176.0, 74.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-103", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 13, + "outlettype" : [ "", "int", "int", "int", "", "", "float", "float", "float", "float", "float", "float", "float" ], + "patching_rect" : [ 235.5, 145.0, 249.0, 22.0 ], + "style" : "", + "text" : "unpack sym 0 0 0 sym sym 0. 0. 0. 0. 0. 0. 0." + } + + } +, { + "box" : { + "id" : "obj-13", + "maxclass" : "toggle", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "int" ], + "parameter_enable" : 0, + "patching_rect" : [ 235.5, 56.0, 24.0, 24.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-1", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 235.5, 106.0, 162.0, 22.0 ], + "style" : "", + "text" : "cr.robotin 192.168.1.200 @tf" + } + + } + ], + "lines" : [ { + "patchline" : { + "destination" : [ "obj-103", 0 ], + "source" : [ "obj-1", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-101", 0 ], + "source" : [ "obj-103", 2 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-102", 0 ], + "source" : [ "obj-103", 1 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-11", 0 ], + "source" : [ "obj-103", 6 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-12", 0 ], + "source" : [ "obj-103", 4 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-14", 0 ], + "source" : [ "obj-103", 5 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-3", 0 ], + "source" : [ "obj-103", 12 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-37", 0 ], + "source" : [ "obj-103", 3 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-39", 0 ], + "source" : [ "obj-103", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-6", 0 ], + "source" : [ "obj-103", 10 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-7", 0 ], + "source" : [ "obj-103", 9 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-8", 0 ], + "source" : [ "obj-103", 8 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-9", 0 ], + "source" : [ "obj-103", 7 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-96", 0 ], + "source" : [ "obj-103", 11 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-13", 0 ] + } + + } + ], + "dependency_cache" : [ { + "name" : "cr.robotin.mxo", + "type" : "iLaX" + } + ], + "autosave" : 0 + } + +} diff --git a/cr/extras/ros/demo_robotin_twist.maxpat b/cr/extras/ros/demo_robotin_twist.maxpat new file mode 100644 index 0000000000000000000000000000000000000000..00f76abf2494021a781ad2e671c577a34660d948 --- /dev/null +++ b/cr/extras/ros/demo_robotin_twist.maxpat @@ -0,0 +1,380 @@ +{ + "patcher" : { + "fileversion" : 1, + "appversion" : { + "major" : 7, + "minor" : 3, + "revision" : 4, + "architecture" : "x86", + "modernui" : 1 + } +, + "rect" : [ 324.0, 204.0, 627.0, 399.0 ], + "bglocked" : 0, + "openinpresentation" : 0, + "default_fontsize" : 12.0, + "default_fontface" : 0, + "default_fontname" : "Arial", + "gridonopen" : 1, + "gridsize" : [ 15.0, 15.0 ], + "gridsnaponopen" : 1, + "objectsnaponopen" : 1, + "statusbarvisible" : 2, + "toolbarvisible" : 1, + "lefttoolbarpinned" : 0, + "toptoolbarpinned" : 0, + "righttoolbarpinned" : 0, + "bottomtoolbarpinned" : 0, + "toolbars_unpinned_last_save" : 0, + "tallnewobj" : 0, + "boxanimatetime" : 200, + "enablehscroll" : 1, + "enablevscroll" : 1, + "devicewidth" : 0.0, + "description" : "", + "digest" : "", + "tags" : "", + "style" : "", + "subpatcher_template" : "", + "boxes" : [ { + "box" : { + "id" : "obj-18", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 78.25, 233.0, 34.0, 22.0 ], + "style" : "", + "text" : "twist" + } + + } +, { + "box" : { + "id" : "obj-38", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 76.5, 257.0, 41.0, 20.0 ], + "style" : "", + "text" : "Name" + } + + } +, { + "box" : { + "id" : "obj-35", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 159.0, 84.0, 44.0, 20.0 ], + "style" : "", + "text" : "On/Off" + } + + } +, { + "box" : { + "id" : "obj-14", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 505.0, 282.0, 19.0, 20.0 ], + "style" : "", + "text" : "Z" + } + + } +, { + "box" : { + "id" : "obj-16", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 448.5, 282.0, 19.0, 20.0 ], + "style" : "", + "text" : "Y" + } + + } +, { + "box" : { + "id" : "obj-17", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 392.0, 282.0, 19.0, 20.0 ], + "style" : "", + "text" : "X" + } + + } +, { + "box" : { + "id" : "obj-6", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 308.0, 282.0, 19.0, 20.0 ], + "style" : "", + "text" : "Z" + } + + } +, { + "box" : { + "id" : "obj-5", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 251.5, 282.0, 19.0, 20.0 ], + "style" : "", + "text" : "Y" + } + + } +, { + "box" : { + "id" : "obj-4", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 195.0, 282.0, 19.0, 20.0 ], + "style" : "", + "text" : "X" + } + + } +, { + "box" : { + "id" : "obj-3", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 401.0, 317.0, 101.0, 20.0 ], + "style" : "", + "text" : "Angular Velocity" + } + + } +, { + "box" : { + "id" : "obj-2", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 202.0, 317.0, 96.0, 20.0 ], + "style" : "", + "text" : "Linear Velocity\n" + } + + } +, { + "box" : { + "id" : "obj-36", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 243.0, 29.0, 153.0, 20.0 ], + "style" : "", + "text" : "Velocities - Twist Message " + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-15", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 486.0, 255.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-7", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 7, + "outlettype" : [ "", "float", "float", "float", "float", "float", "float" ], + "patching_rect" : [ 222.0, 171.0, 155.0, 22.0 ], + "style" : "", + "text" : "unpack sym 0. 0. 0. 0. 0. 0." + } + + } +, { + "box" : { + "id" : "obj-13", + "maxclass" : "toggle", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "int" ], + "parameter_enable" : 0, + "patching_rect" : [ 222.0, 82.0, 24.0, 24.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-10", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 434.0, 255.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-11", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 382.0, 255.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-12", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 289.0, 255.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-9", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 237.0, 255.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-8", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 185.0, 255.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-1", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 222.0, 135.0, 179.0, 22.0 ], + "style" : "", + "text" : "cr.robotin 192.168.1.200 @twist" + } + + } + ], + "lines" : [ { + "patchline" : { + "destination" : [ "obj-7", 0 ], + "source" : [ "obj-1", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-13", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-10", 0 ], + "source" : [ "obj-7", 5 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-11", 0 ], + "source" : [ "obj-7", 4 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-12", 0 ], + "source" : [ "obj-7", 3 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-15", 0 ], + "source" : [ "obj-7", 6 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-18", 0 ], + "source" : [ "obj-7", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-8", 0 ], + "source" : [ "obj-7", 1 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-9", 0 ], + "source" : [ "obj-7", 2 ] + } + + } + ], + "dependency_cache" : [ { + "name" : "cr.robotin.mxo", + "type" : "iLaX" + } + ], + "autosave" : 0 + } + +} diff --git a/cr/extras/ros/demo_robotout_twist.maxpat b/cr/extras/ros/demo_robotout_twist.maxpat new file mode 100644 index 0000000000000000000000000000000000000000..6cd6ac6f757c2b4ca4fdcceaa2336914c8d09f2b --- /dev/null +++ b/cr/extras/ros/demo_robotout_twist.maxpat @@ -0,0 +1,201 @@ +{ + "patcher" : { + "fileversion" : 1, + "appversion" : { + "major" : 7, + "minor" : 3, + "revision" : 4, + "architecture" : "x86", + "modernui" : 1 + } +, + "rect" : [ 253.0, 267.0, 746.0, 493.0 ], + "bglocked" : 0, + "openinpresentation" : 0, + "default_fontsize" : 12.0, + "default_fontface" : 0, + "default_fontname" : "Arial", + "gridonopen" : 1, + "gridsize" : [ 15.0, 15.0 ], + "gridsnaponopen" : 1, + "objectsnaponopen" : 1, + "statusbarvisible" : 2, + "toolbarvisible" : 1, + "lefttoolbarpinned" : 0, + "toptoolbarpinned" : 0, + "righttoolbarpinned" : 0, + "bottomtoolbarpinned" : 0, + "toolbars_unpinned_last_save" : 0, + "tallnewobj" : 0, + "boxanimatetime" : 200, + "enablehscroll" : 1, + "enablevscroll" : 1, + "devicewidth" : 0.0, + "description" : "", + "digest" : "", + "tags" : "", + "style" : "", + "subpatcher_template" : "", + "boxes" : [ { + "box" : { + "id" : "obj-2", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 139.0, 117.0, 41.0, 22.0 ], + "style" : "", + "text" : "break" + } + + } +, { + "box" : { + "id" : "obj-1", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 94.0, 161.0, 37.0, 22.0 ], + "style" : "", + "text" : "bang" + } + + } +, { + "box" : { + "id" : "obj-30", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 317.0, 106.0, 53.0, 33.0 ], + "style" : "", + "text" : "Angular Velocity" + } + + } +, { + "box" : { + "id" : "obj-31", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 210.333328, 106.0, 53.0, 33.0 ], + "style" : "", + "text" : "Linear Velocity\n" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-32", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 317.0, 143.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-40", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 210.333328, 143.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-22", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 47.0, 161.0, 37.0, 22.0 ], + "style" : "", + "text" : "open" + } + + } +, { + "box" : { + "id" : "obj-21", + "maxclass" : "newobj", + "numinlets" : 7, + "numoutlets" : 0, + "patching_rect" : [ 189.0, 221.0, 147.0, 22.0 ], + "style" : "", + "text" : "cr.robotout 192.168.1.200" + } + + } +, { + "box" : { + "id" : "obj-36", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 169.5, 68.0, 186.0, 20.0 ], + "style" : "", + "text" : "Velocities - Twist Message (Out) " + } + + } + ], + "lines" : [ { + "patchline" : { + "destination" : [ "obj-21", 0 ], + "source" : [ "obj-1", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 0 ], + "source" : [ "obj-2", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 0 ], + "source" : [ "obj-22", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 6 ], + "source" : [ "obj-32", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 1 ], + "source" : [ "obj-40", 0 ] + } + + } + ], + "dependency_cache" : [ { + "name" : "cr.robotout.mxo", + "type" : "iLaX" + } + ], + "autosave" : 0 + } + +} diff --git a/cr/extras/ros/demo_robotout_twist_full.maxpat b/cr/extras/ros/demo_robotout_twist_full.maxpat new file mode 100644 index 0000000000000000000000000000000000000000..964cbc6a3f98ca65b6fce699ac06367ba828fb9c --- /dev/null +++ b/cr/extras/ros/demo_robotout_twist_full.maxpat @@ -0,0 +1,355 @@ +{ + "patcher" : { + "fileversion" : 1, + "appversion" : { + "major" : 7, + "minor" : 3, + "revision" : 4, + "architecture" : "x86", + "modernui" : 1 + } +, + "rect" : [ 579.0, 243.0, 635.0, 332.0 ], + "bglocked" : 0, + "openinpresentation" : 0, + "default_fontsize" : 12.0, + "default_fontface" : 0, + "default_fontname" : "Arial", + "gridonopen" : 1, + "gridsize" : [ 15.0, 15.0 ], + "gridsnaponopen" : 1, + "objectsnaponopen" : 1, + "statusbarvisible" : 2, + "toolbarvisible" : 1, + "lefttoolbarpinned" : 0, + "toptoolbarpinned" : 0, + "righttoolbarpinned" : 0, + "bottomtoolbarpinned" : 0, + "toolbars_unpinned_last_save" : 0, + "tallnewobj" : 0, + "boxanimatetime" : 200, + "enablehscroll" : 1, + "enablevscroll" : 1, + "devicewidth" : 0.0, + "description" : "", + "digest" : "", + "tags" : "", + "style" : "", + "subpatcher_template" : "", + "boxes" : [ { + "box" : { + "id" : "obj-2", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 94.0, 101.0, 41.0, 22.0 ], + "style" : "", + "text" : "break" + } + + } +, { + "box" : { + "id" : "obj-1", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 94.0, 163.0, 37.0, 22.0 ], + "style" : "", + "text" : "bang" + } + + } +, { + "box" : { + "id" : "obj-24", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 455.0, 121.0, 19.0, 20.0 ], + "style" : "", + "text" : "Z" + } + + } +, { + "box" : { + "id" : "obj-25", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 407.5, 121.0, 19.0, 20.0 ], + "style" : "", + "text" : "Y" + } + + } +, { + "box" : { + "id" : "obj-26", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 351.0, 121.0, 19.0, 20.0 ], + "style" : "", + "text" : "X" + } + + } +, { + "box" : { + "id" : "obj-27", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 293.0, 121.0, 19.0, 20.0 ], + "style" : "", + "text" : "Z" + } + + } +, { + "box" : { + "id" : "obj-28", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 236.5, 121.0, 19.0, 20.0 ], + "style" : "", + "text" : "Y" + } + + } +, { + "box" : { + "id" : "obj-29", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 180.0, 121.0, 19.0, 20.0 ], + "style" : "", + "text" : "X" + } + + } +, { + "box" : { + "id" : "obj-30", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 373.0, 90.0, 101.0, 20.0 ], + "style" : "", + "text" : "Angular Velocity" + } + + } +, { + "box" : { + "id" : "obj-31", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 200.0, 90.0, 96.0, 20.0 ], + "style" : "", + "text" : "Linear Velocity\n" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-32", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 445.0, 143.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-33", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 393.0, 143.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-34", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 341.0, 143.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-37", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 274.0, 143.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-39", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 222.0, 143.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-40", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 170.0, 143.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-22", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 47.0, 163.0, 37.0, 22.0 ], + "style" : "", + "text" : "open" + } + + } +, { + "box" : { + "id" : "obj-21", + "maxclass" : "newobj", + "numinlets" : 7, + "numoutlets" : 0, + "patching_rect" : [ 189.0, 201.0, 147.0, 22.0 ], + "style" : "", + "text" : "cr.robotout 192.168.1.200" + } + + } +, { + "box" : { + "id" : "obj-36", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 180.0, 34.0, 186.0, 20.0 ], + "style" : "", + "text" : "Velocities - Twist Message (Out) " + } + + } + ], + "lines" : [ { + "patchline" : { + "destination" : [ "obj-21", 0 ], + "source" : [ "obj-1", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 0 ], + "source" : [ "obj-2", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 0 ], + "source" : [ "obj-22", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 6 ], + "source" : [ "obj-32", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 5 ], + "source" : [ "obj-33", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 4 ], + "source" : [ "obj-34", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 3 ], + "source" : [ "obj-37", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 2 ], + "source" : [ "obj-39", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 1 ], + "source" : [ "obj-40", 0 ] + } + + } + ], + "dependency_cache" : [ { + "name" : "cr.robotout.mxo", + "type" : "iLaX" + } + ], + "autosave" : 0 + } + +} diff --git a/cr/extras/ros/demo_robotout_twist_sliders.maxpat b/cr/extras/ros/demo_robotout_twist_sliders.maxpat new file mode 100644 index 0000000000000000000000000000000000000000..d2381f1b1dddb3b9ef259b3d90cb351f540db182 --- /dev/null +++ b/cr/extras/ros/demo_robotout_twist_sliders.maxpat @@ -0,0 +1,649 @@ +{ + "patcher" : { + "fileversion" : 1, + "appversion" : { + "major" : 7, + "minor" : 3, + "revision" : 4, + "architecture" : "x86", + "modernui" : 1 + } +, + "rect" : [ 289.0, 231.0, 614.0, 479.0 ], + "bglocked" : 0, + "openinpresentation" : 0, + "default_fontsize" : 12.0, + "default_fontface" : 0, + "default_fontname" : "Arial", + "gridonopen" : 1, + "gridsize" : [ 15.0, 15.0 ], + "gridsnaponopen" : 1, + "objectsnaponopen" : 1, + "statusbarvisible" : 2, + "toolbarvisible" : 1, + "lefttoolbarpinned" : 0, + "toptoolbarpinned" : 0, + "righttoolbarpinned" : 0, + "bottomtoolbarpinned" : 0, + "toolbars_unpinned_last_save" : 0, + "tallnewobj" : 0, + "boxanimatetime" : 200, + "enablehscroll" : 1, + "enablevscroll" : 1, + "devicewidth" : 0.0, + "description" : "", + "digest" : "", + "tags" : "", + "style" : "", + "subpatcher_template" : "", + "boxes" : [ { + "box" : { + "id" : "obj-13", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 30.0, 158.0, 49.0, 20.0 ], + "style" : "", + "text" : "BREAK\n" + } + + } +, { + "box" : { + "id" : "obj-6", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 30.0, 188.0, 37.0, 22.0 ], + "style" : "", + "text" : "bang" + } + + } +, { + "box" : { + "id" : "obj-5", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 30.0, 219.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-2", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 34.0, 350.5, 41.0, 22.0 ], + "style" : "", + "text" : "break" + } + + } +, { + "box" : { + "id" : "obj-11", + "maxclass" : "live.slider", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "float" ], + "parameter_enable" : 1, + "patching_rect" : [ 243.0, 161.0, 39.0, 95.0 ], + "saved_attribute_attributes" : { + "valueof" : { + "parameter_longname" : "live.slider[2]", + "parameter_shortname" : "live.slider", + "parameter_type" : 0, + "parameter_mmin" : -5.0, + "parameter_mmax" : 5.0, + "parameter_unitstyle" : 0 + } + + } +, + "varname" : "live.slider[2]" + } + + } +, { + "box" : { + "id" : "obj-10", + "maxclass" : "live.slider", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "float" ], + "parameter_enable" : 1, + "patching_rect" : [ 191.0, 158.0, 39.0, 95.0 ], + "saved_attribute_attributes" : { + "valueof" : { + "parameter_longname" : "live.slider[1]", + "parameter_shortname" : "live.slider", + "parameter_type" : 0, + "parameter_mmin" : -5.0, + "parameter_mmax" : 5.0, + "parameter_unitstyle" : 0 + } + + } +, + "varname" : "live.slider[1]" + } + + } +, { + "box" : { + "id" : "obj-9", + "maxclass" : "live.dial", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "float" ], + "parameter_enable" : 1, + "patching_rect" : [ 414.0, 194.0, 44.0, 47.0 ], + "saved_attribute_attributes" : { + "valueof" : { + "parameter_longname" : "live.dial[2]", + "parameter_shortname" : "live.dial", + "parameter_type" : 0, + "parameter_mmin" : -5.0, + "parameter_mmax" : 5.0, + "parameter_unitstyle" : 1 + } + + } +, + "varname" : "live.dial[2]" + } + + } +, { + "box" : { + "id" : "obj-8", + "maxclass" : "live.dial", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "float" ], + "parameter_enable" : 1, + "patching_rect" : [ 362.0, 194.0, 44.0, 47.0 ], + "saved_attribute_attributes" : { + "valueof" : { + "parameter_longname" : "live.dial[1]", + "parameter_shortname" : "live.dial", + "parameter_type" : 0, + "parameter_mmin" : -5.0, + "parameter_mmax" : 5.0, + "parameter_unitstyle" : 1 + } + + } +, + "varname" : "live.dial[1]" + } + + } +, { + "box" : { + "id" : "obj-4", + "maxclass" : "live.dial", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "float" ], + "parameter_enable" : 1, + "patching_rect" : [ 310.0, 194.0, 44.0, 47.0 ], + "saved_attribute_attributes" : { + "valueof" : { + "parameter_longname" : "live.dial", + "parameter_shortname" : "live.dial", + "parameter_type" : 0, + "parameter_mmin" : -5.0, + "parameter_mmax" : 5.0, + "parameter_unitstyle" : 1 + } + + } +, + "varname" : "live.dial" + } + + } +, { + "box" : { + "id" : "obj-3", + "maxclass" : "live.slider", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "float" ], + "parameter_enable" : 1, + "patching_rect" : [ 139.0, 158.0, 39.0, 95.0 ], + "saved_attribute_attributes" : { + "valueof" : { + "parameter_longname" : "live.slider", + "parameter_shortname" : "live.slider", + "parameter_type" : 0, + "parameter_mmin" : -5.0, + "parameter_mmax" : 5.0, + "parameter_unitstyle" : 0 + } + + } +, + "varname" : "live.slider" + } + + } +, { + "box" : { + "id" : "obj-1", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 77.0, 286.0, 37.0, 22.0 ], + "style" : "", + "text" : "bang" + } + + } +, { + "box" : { + "id" : "obj-24", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 429.0, 117.0, 19.0, 20.0 ], + "style" : "", + "text" : "Z" + } + + } +, { + "box" : { + "id" : "obj-25", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 381.5, 117.0, 19.0, 20.0 ], + "style" : "", + "text" : "Y" + } + + } +, { + "box" : { + "id" : "obj-26", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 325.0, 117.0, 19.0, 20.0 ], + "style" : "", + "text" : "X" + } + + } +, { + "box" : { + "id" : "obj-27", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 261.0, 117.0, 19.0, 20.0 ], + "style" : "", + "text" : "Z" + } + + } +, { + "box" : { + "id" : "obj-28", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 204.5, 117.0, 19.0, 20.0 ], + "style" : "", + "text" : "Y" + } + + } +, { + "box" : { + "id" : "obj-29", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 148.0, 117.0, 19.0, 20.0 ], + "style" : "", + "text" : "X" + } + + } +, { + "box" : { + "id" : "obj-30", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 340.5, 86.0, 101.0, 20.0 ], + "style" : "", + "text" : "Angular Velocity" + } + + } +, { + "box" : { + "id" : "obj-31", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 168.0, 86.0, 96.0, 20.0 ], + "style" : "", + "text" : "Linear Velocity\n" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-32", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 414.0, 267.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-33", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 362.0, 267.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-34", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 310.0, 267.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-37", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 243.0, 267.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-39", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 191.0, 267.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-40", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 139.0, 267.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-22", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 30.0, 286.0, 37.0, 22.0 ], + "style" : "", + "text" : "open" + } + + } +, { + "box" : { + "id" : "obj-21", + "maxclass" : "newobj", + "numinlets" : 7, + "numoutlets" : 0, + "patching_rect" : [ 158.0, 325.0, 147.0, 22.0 ], + "style" : "", + "text" : "cr.robotout 192.168.1.200" + } + + } +, { + "box" : { + "id" : "obj-36", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 180.0, 34.0, 186.0, 20.0 ], + "style" : "", + "text" : "Velocities - Twist Message (Out) " + } + + } + ], + "lines" : [ { + "patchline" : { + "destination" : [ "obj-21", 0 ], + "source" : [ "obj-1", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-39", 0 ], + "source" : [ "obj-10", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-37", 0 ], + "source" : [ "obj-11", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 0 ], + "source" : [ "obj-2", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 0 ], + "source" : [ "obj-22", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-40", 0 ], + "source" : [ "obj-3", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 6 ], + "source" : [ "obj-32", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 5 ], + "source" : [ "obj-33", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 4 ], + "source" : [ "obj-34", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 3 ], + "source" : [ "obj-37", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 2 ], + "source" : [ "obj-39", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-34", 0 ], + "source" : [ "obj-4", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 1 ], + "source" : [ "obj-40", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-32", 0 ], + "order" : 0, + "source" : [ "obj-5", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-33", 0 ], + "order" : 1, + "source" : [ "obj-5", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-34", 0 ], + "order" : 2, + "source" : [ "obj-5", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-37", 0 ], + "order" : 3, + "source" : [ "obj-5", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-39", 0 ], + "order" : 4, + "source" : [ "obj-5", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-40", 0 ], + "order" : 5, + "source" : [ "obj-5", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-5", 0 ], + "source" : [ "obj-6", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-33", 0 ], + "source" : [ "obj-8", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-32", 0 ], + "source" : [ "obj-9", 0 ] + } + + } + ], + "parameters" : { + "obj-9" : [ "live.dial[2]", "live.dial", 0 ], + "obj-10" : [ "live.slider[1]", "live.slider", 0 ], + "obj-4" : [ "live.dial", "live.dial", 0 ], + "obj-3" : [ "live.slider", "live.slider", 0 ], + "obj-11" : [ "live.slider[2]", "live.slider", 0 ], + "obj-8" : [ "live.dial[1]", "live.dial", 0 ] + } +, + "dependency_cache" : [ { + "name" : "cr.robotout.mxo", + "type" : "iLaX" + } + ], + "autosave" : 0 + } + +} diff --git a/cr/help/cr.robotin.maxhelp b/cr/help/cr.robotin.maxhelp new file mode 100644 index 0000000000000000000000000000000000000000..002be82493c289a3db61ce05b09214245defccb8 --- /dev/null +++ b/cr/help/cr.robotin.maxhelp @@ -0,0 +1,516 @@ +{ + "patcher" : { + "fileversion" : 1, + "appversion" : { + "major" : 7, + "minor" : 3, + "revision" : 1, + "architecture" : "x86", + "modernui" : 1 + } +, + "rect" : [ 611.0, 117.0, 750.0, 602.0 ], + "bglocked" : 0, + "openinpresentation" : 0, + "default_fontsize" : 12.0, + "default_fontface" : 0, + "default_fontname" : "Arial", + "gridonopen" : 1, + "gridsize" : [ 15.0, 15.0 ], + "gridsnaponopen" : 1, + "objectsnaponopen" : 1, + "statusbarvisible" : 2, + "toolbarvisible" : 1, + "lefttoolbarpinned" : 0, + "toptoolbarpinned" : 0, + "righttoolbarpinned" : 0, + "bottomtoolbarpinned" : 0, + "toolbars_unpinned_last_save" : 0, + "tallnewobj" : 0, + "boxanimatetime" : 200, + "enablehscroll" : 1, + "enablevscroll" : 1, + "devicewidth" : 0.0, + "description" : "", + "digest" : "", + "tags" : "", + "style" : "", + "subpatcher_template" : "", + "boxes" : [ { + "box" : { + "id" : "obj-27", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 457.5, 286.0, 208.5, 20.0 ], + "style" : "", + "text" : "Test the Connection to Arduino Board" + } + + } +, { + "box" : { + "id" : "obj-28", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 415.0, 285.0, 30.0, 22.0 ], + "style" : "", + "text" : "test" + } + + } +, { + "box" : { + "id" : "obj-26", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 440.0, 257.0, 218.0, 20.0 ], + "style" : "", + "text" : "Close the Connection to Arduino Board" + } + + } +, { + "box" : { + "id" : "obj-25", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 410.5, 224.0, 208.5, 20.0 ], + "style" : "", + "text" : "Open a Connection to Arduino Board" + } + + } +, { + "box" : { + "id" : "obj-24", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 40.0, 292.0, 83.0, 33.0 ], + "style" : "", + "text" : "Print Current Config Modes" + } + + } +, { + "box" : { + "id" : "obj-23", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 25.0, 252.0, 121.0, 20.0 ], + "style" : "", + "text" : "Print Possible Modes" + } + + } +, { + "box" : { + "id" : "obj-22", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 152.0, 252.0, 33.0, 22.0 ], + "style" : "", + "text" : "pins" + } + + } +, { + "box" : { + "id" : "obj-19", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 124.0, 292.0, 43.0, 22.0 ], + "style" : "", + "text" : "config" + } + + } +, { + "box" : { + "id" : "obj-16", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 389.5, 256.0, 39.0, 22.0 ], + "style" : "", + "text" : "close" + } + + } +, { + "box" : { + "id" : "obj-14", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 365.0, 223.0, 37.0, 22.0 ], + "style" : "", + "text" : "open" + } + + } +, { + "box" : { + "id" : "obj-2", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 89.5, 150.0, 150.0, 20.0 ], + "style" : "", + "text" : "Get Current Values (Once)" + } + + } +, { + "box" : { + "id" : "obj-9", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 246.5, 149.0, 37.0, 22.0 ], + "style" : "", + "text" : "bang" + } + + } +, { + "box" : { + "id" : "obj-21", + "linecount" : 3, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 301.0, 508.5, 95.0, 47.0 ], + "style" : "", + "text" : "Reads Analog Values from the Potentiometer" + } + + } +, { + "box" : { + "id" : "obj-10", + "linecount" : 4, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 542.0, 327.0, 180.0, 60.0 ], + "style" : "", + "text" : "Reads from Pins: \nAnalog 0 (A0 - temperature)\nAnalog 4 (A4 - potentiometer)\nDigital 11 (D11 - light)" + } + + } +, { + "box" : { + "fontface" : 1, + "fontsize" : 16.0, + "id" : "obj-20", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 83.0, 35.0, 611.0, 42.0 ], + "style" : "", + "text" : "MaxHelp: Arduino UNO BoardIn\nPotentiometer, LED Light, and a Temperature Sensor", + "textjustification" : 1 + } + + } +, { + "box" : { + "id" : "obj-18", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 147.0, 451.5, 153.0, 33.0 ], + "style" : "", + "text" : "Reads Analog Values from the Temperature Sensor" + } + + } +, { + "box" : { + "id" : "obj-17", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 553.0, 434.0, 133.0, 33.0 ], + "style" : "", + "text" : "Reads Digital Values (On/Off) from the LED" + } + + } +, { + "box" : { + "id" : "obj-15", + "linecount" : 4, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 132.5, 342.0, 172.0, 60.0 ], + "style" : "", + "text" : "Arduino Uno Reader\nRequires port index and the list of pins to read from (set to either Analog or Digital reads)" + } + + } +, { + "box" : { + "id" : "obj-13", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 75.0, 218.0, 117.0, 20.0 ], + "style" : "", + "text" : "Print Available Ports" + } + + } +, { + "box" : { + "id" : "obj-12", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 387.0, 171.0, 198.0, 20.0 ], + "style" : "", + "text" : "Determine Speed of Pins Updates" + } + + } +, { + "box" : { + "id" : "obj-11", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 353.5, 122.0, 163.0, 20.0 ], + "style" : "", + "text" : "Turn Analog Reader On/Off" + } + + } +, { + "box" : { + "id" : "obj-8", + "maxclass" : "toggle", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "int" ], + "parameter_enable" : 0, + "patching_rect" : [ 513.0, 438.5, 24.0, 24.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-7", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 411.5, 521.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-6", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 310.0, 457.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-5", + "maxclass" : "toggle", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "int" ], + "parameter_enable" : 0, + "patching_rect" : [ 310.0, 120.0, 24.0, 24.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-4", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "bang" ], + "patching_rect" : [ 310.0, 171.0, 58.0, 22.0 ], + "style" : "", + "text" : "metro 80" + } + + } +, { + "box" : { + "id" : "obj-3", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 199.0, 218.0, 37.0, 22.0 ], + "style" : "", + "text" : "ports" + } + + } +, { + "box" : { + "id" : "obj-1", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 3, + "outlettype" : [ "int", "int", "int" ], + "patching_rect" : [ 310.0, 346.0, 222.0, 22.0 ], + "style" : "", + "text" : "cr.boardin a @analog A0 A4 @digital 11" + } + + } + ], + "lines" : [ { + "patchline" : { + "destination" : [ "obj-6", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-1", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-7", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-1", 1 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-8", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-1", 2 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-14", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-16", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-19", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-22", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-28", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-3", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-4", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-4", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-5", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-9", 0 ] + } + + } + ], + "dependency_cache" : [ { + "name" : "cr.boardin.mxo", + "type" : "iLaX" + } + ], + "autosave" : 0 + } + +} diff --git a/cr/help/cr.robotout.maxhelp b/cr/help/cr.robotout.maxhelp new file mode 100644 index 0000000000000000000000000000000000000000..1d78992c55149beb0ad0dac01ef324e361137435 --- /dev/null +++ b/cr/help/cr.robotout.maxhelp @@ -0,0 +1,412 @@ +{ + "patcher" : { + "fileversion" : 1, + "appversion" : { + "major" : 7, + "minor" : 3, + "revision" : 1, + "architecture" : "x86", + "modernui" : 1 + } +, + "rect" : [ 117.0, 100.0, 754.0, 499.0 ], + "bglocked" : 0, + "openinpresentation" : 0, + "default_fontsize" : 12.0, + "default_fontface" : 0, + "default_fontname" : "Arial", + "gridonopen" : 1, + "gridsize" : [ 15.0, 15.0 ], + "gridsnaponopen" : 1, + "objectsnaponopen" : 1, + "statusbarvisible" : 2, + "toolbarvisible" : 1, + "lefttoolbarpinned" : 0, + "toptoolbarpinned" : 0, + "righttoolbarpinned" : 0, + "bottomtoolbarpinned" : 0, + "toolbars_unpinned_last_save" : 0, + "tallnewobj" : 0, + "boxanimatetime" : 200, + "enablehscroll" : 1, + "enablevscroll" : 1, + "devicewidth" : 0.0, + "description" : "", + "digest" : "", + "tags" : "", + "style" : "", + "subpatcher_template" : "", + "boxes" : [ { + "box" : { + "id" : "obj-27", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 103.5, 206.0, 208.5, 20.0 ], + "style" : "", + "text" : "Test the Connection to Arduino Board" + } + + } +, { + "box" : { + "id" : "obj-28", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 324.0, 205.0, 30.0, 22.0 ], + "style" : "", + "text" : "test" + } + + } +, { + "box" : { + "id" : "obj-26", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 123.0, 170.0, 218.0, 20.0 ], + "style" : "", + "text" : "Close the Connection to Arduino Board" + } + + } +, { + "box" : { + "id" : "obj-25", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 175.5, 139.0, 208.5, 20.0 ], + "style" : "", + "text" : "Open a Connection to Arduino Board" + } + + } +, { + "box" : { + "id" : "obj-11", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 352.0, 169.0, 39.0, 22.0 ], + "style" : "", + "text" : "close" + } + + } +, { + "box" : { + "id" : "obj-14", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 394.5, 138.0, 37.0, 22.0 ], + "style" : "", + "text" : "open" + } + + } +, { + "box" : { + "id" : "obj-24", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 56.0, 329.0, 99.0, 33.0 ], + "style" : "", + "text" : "Print Current Config Modes" + } + + } +, { + "box" : { + "id" : "obj-23", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 62.0, 297.0, 121.0, 20.0 ], + "style" : "", + "text" : "Print Possible Modes" + } + + } +, { + "box" : { + "id" : "obj-22", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 189.0, 297.0, 33.0, 22.0 ], + "style" : "", + "text" : "pins" + } + + } +, { + "box" : { + "id" : "obj-5", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 161.0, 329.0, 43.0, 22.0 ], + "style" : "", + "text" : "config" + } + + } +, { + "box" : { + "id" : "obj-13", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 112.0, 268.0, 117.0, 20.0 ], + "style" : "", + "text" : "Print Available Ports" + } + + } +, { + "box" : { + "id" : "obj-10", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 236.0, 268.0, 37.0, 22.0 ], + "style" : "", + "text" : "ports" + } + + } +, { + "box" : { + "id" : "obj-15", + "linecount" : 4, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 102.0, 373.5, 183.0, 60.0 ], + "style" : "", + "text" : "Arduino Uno Writer\nRequires port index and the list of pins to write to (set to either Digital, PWM or Servo integers)" + } + + } +, { + "box" : { + "id" : "obj-3", + "linecount" : 3, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 509.0, 174.5, 134.0, 47.0 ], + "style" : "", + "text" : "Set PWM value for the LED to determine light intensity (dimmer)" + } + + } +, { + "box" : { + "id" : "obj-1", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 449.833344, 187.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "fontface" : 1, + "fontsize" : 16.0, + "id" : "obj-20", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 96.0, 56.0, 561.0, 42.0 ], + "style" : "", + "text" : "MaxHelp: Arduino UNO BoardOut \nDigital, Servo, and PWM", + "textjustification" : 1 + } + + } +, { + "box" : { + "id" : "obj-19", + "linecount" : 2, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 383.0, 317.0, 60.0, 33.0 ], + "style" : "", + "text" : "Write to Servo pin" + } + + } +, { + "box" : { + "id" : "obj-17", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 561.0, 299.0, 102.0, 20.0 ], + "style" : "", + "text" : "Turn LED On/Off" + } + + } +, { + "box" : { + "id" : "obj-16", + "linecount" : 4, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 557.0, 367.0, 99.0, 60.0 ], + "style" : "", + "text" : "Writes to Pins:\nServo 9 (Servo)\nPWM 5 (LED)\nDigital 11 (LED)" + } + + } +, { + "box" : { + "id" : "obj-8", + "maxclass" : "toggle", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "int" ], + "parameter_enable" : 0, + "patching_rect" : [ 526.5, 297.0, 24.0, 24.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-7", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 373.166656, 285.0, 50.0, 22.0 ], + "style" : "" + } + + } +, { + "box" : { + "id" : "obj-2", + "maxclass" : "newobj", + "numinlets" : 4, + "numoutlets" : 0, + "patching_rect" : [ 296.5, 386.0, 249.0, 22.0 ], + "style" : "", + "text" : "cr.boardout a @servo 9 @pwm 5 @digital 11" + } + + } + ], + "lines" : [ { + "patchline" : { + "destination" : [ "obj-2", 2 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-1", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-2", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-10", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-2", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-11", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-2", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-14", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-2", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-22", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-2", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-28", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-2", 0 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-5", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-2", 1 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-7", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-2", 3 ], + "disabled" : 0, + "hidden" : 0, + "source" : [ "obj-8", 0 ] + } + + } + ], + "dependency_cache" : [ { + "name" : "cr.boardout.mxo", + "type" : "iLaX" + } + ], + "autosave" : 0 + } + +} diff --git a/cr/readme.md b/cr/readme.md index a601430dbe91ef122c0dd9e262e6224da597f0e0..8df046e65a3cbd2b99a93beb245045d9d773fd99 100644 --- a/cr/readme.md +++ b/cr/readme.md @@ -31,9 +31,9 @@ B. Manual installation -Board Preparations: +Arduino UNO - Board Preparations: ------------------- -1. Open Arduino. +1. Open the Arduino IDE Software. Link for download: https://www.arduino.cc/en/Main/Software. 2. Open Sketch File -> Examples -> Firmata -> StandardFirmata. 3. Upload the Sketch to Your UNO Board*. Make sure no errors in the console (Arduino window). @@ -43,6 +43,19 @@ Tools -> Port -> (choose the correct port that is connected to your Arduino boar Done. +TurtleBot3 - Robot Preparations: +------------------- +1. Install the following ROS packages: + http://wiki.ros.org/rosserial + http://wiki.ros.org/rosserial_embeddedlinux +2. Note the robot IP address (must be static IP), and add export command to bashrc file. +3. Copy the auto-start script to the robot. Link to download: http://robolab.cse.unsw.edu.au:4443/interaction-interface/max-arduino-interface/tree/master. +4. Follow to instructions on how to get the robot to automatically run the script on startup. +5. Restart the robot. + +* Further details in the Turtlebot3 Burger eManual: http://emanual.robotis.com/docs/en/platform/turtlebot3/bringup/. + +Done. Usage Instructions: @@ -52,4 +65,3 @@ Usage Instructions: 3. Try the demo patchers under /extras/cr. They demonstrate how to use some of the actuators and sensors, and include circuite images to help you get started. 4. Help pages, Reference pages and Example Patchers are available in the cr package to help you getting started. - diff --git a/cr/release_notes.txt b/cr/release_notes.txt index 4a655e5e88770b12cf4d2e077fde5c4db8321d32..95972599e17eb3a8c08500d319a30625a765177e 100644 --- a/cr/release_notes.txt +++ b/cr/release_notes.txt @@ -4,6 +4,13 @@ http://www.crl.unsw.edu.au/projects/interaction-interface-for-creative-robotics CR Package Release Notes File. +—————— +v.2.0 +—————— + +Added external objects cr.robotin and cr.robotout to handle ROS messages for communicating with TurtleBot3 robot. + + —————— v.1.0 —————— diff --git a/cr/version.md b/cr/version.md index ef1c2721b80548a3013ad780bde05d5957f30198..a7f691e54c4b81615fb5d5d89d10d0e994dc9a2e 100644 --- a/cr/version.md +++ b/cr/version.md @@ -1,4 +1,4 @@ -v1.0 +v2.0 Version explained: Major - public releases diff --git a/source/FirmataClient/serial.c b/source/FirmataClient/serial.c index 8745c90555a81f2e22beb2437898aa0f390dafbb..9163218944388f71dc5239200a05946686bc57cc 100755 --- a/source/FirmataClient/serial.c +++ b/source/FirmataClient/serial.c @@ -25,17 +25,31 @@ #include "serial.h" +#if defined(MACOSX) #include // required for: ioctl function #include // required for: select function #include // required for: kIOCalloutDeviceKey, kCFAllocatorDefault consts +#elif defined(WINDOWS) +#include +#define win32_err(s) FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, \ +GetLastError(), 0, (s), sizeof(s), NULL) +#define QUERYDOSDEVICE_BUFFER_SIZE 262144 + +#else +#error "This platform is unsupported, sorry" + +#endif + + // Internals void serial_inputdiscard(serial_t *port); void serial_outputflush(serial_t *port); int serial_setcontrol(serial_t *port, int dtr, int rts); -int macos_ports(io_iterator_t *PortIterator, char **list, int max_ports, int index); +// int macos_ports(io_iterator_t *PortIterator, char **list, int max_ports, int index); +#if defined(MACOSX) int macos_ports(io_iterator_t *PortIterator, char **list, int max_ports, int index) { io_object_t modemService; @@ -62,12 +76,16 @@ int macos_ports(io_iterator_t *PortIterator, char **list, int max_ports, int ind } return numPorts; } +#endif /* MACOSX */ // Return a list of all serial ports int serial_portlist(char **list, int max_ports) { + int numPorts = 0; +#if defined(MACOSX) + // adapted from SerialPortSample.c, by Apple // http://developer.apple.com/samplecode/SerialPortSample/listing2.html // and also testserial.c, by Keyspan @@ -105,6 +123,57 @@ int serial_portlist(char **list, int max_ports) numPorts += macos_ports(&serialPortIterator, list, max_ports, numPorts); IOObjectRelease(serialPortIterator); +#elif defined(WINDOWS) + // http://msdn.microsoft.com/en-us/library/aa365461(VS.85).aspx + // page with 7 ways - not all of them work! + // http://www.naughter.com/enumser.html + // may be possible to just query the windows registary + // http://it.gps678.com/2/ca9c8631868fdd65.html + // search in HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM + // Vista has some special new way, vista-only + // http://msdn2.microsoft.com/en-us/library/aa814070(VS.85).aspx + char *buffer, *p; + //DWORD size = QUERYDOSDEVICE_BUFFER_SIZE; + DWORD ret; + + buffer = (char *)malloc(QUERYDOSDEVICE_BUFFER_SIZE); + if (buffer == NULL) return 0; + + + + memset(buffer, 0, QUERYDOSDEVICE_BUFFER_SIZE); + ret = QueryDosDeviceA(NULL, buffer, QUERYDOSDEVICE_BUFFER_SIZE); + if (ret) { + printf("Detect Serial using QueryDosDeviceA: "); + for (p = buffer; *p; p += strlen(p) + 1) { + printf(": %s", p); + if (strncmp(p, "COM", 3)) continue; + numPorts++; + //list.Add(wxString(p) + ":"); // TODO fix the list orly + } + } else { + char buf[1024]; + win32_err(buf); + printf("QueryDosDeviceA failed, error \"%s\"\n", buf); + printf("Detect Serial using brute force GetDefaultCommConfig probing: "); + for (int i=1; i<=32; i++) { + printf("try %s", buf); + COMMCONFIG cfg; + DWORD len; + snprintf(buf, sizeof(buf), "COM%d", i); + if (GetDefaultCommConfig(buf, &cfg, &len)) { + wxString name; + name.Printf("COM%d:", i); + //list.Add(name); // TODO fix the list orly + numPorts++; + printf(": %s", buf); + } + } + } + free(buffer); + +#endif /* MACOSX or WINDOWS */ + printf("serial_portlist: %d\n", numPorts); return numPorts; } @@ -127,6 +196,8 @@ int serial_open(serial_t *port, char *name) serial_close(port); +#if defined(MACOSX) + int bits = 0; int port_fd = open(name, O_RDWR | O_NOCTTY | O_NONBLOCK); if (port_fd < 0) { @@ -167,7 +238,100 @@ int serial_open(serial_t *port, char *name) port->settings.c_cflag = CS8 | CLOCAL | CREAD | HUPCL; port->settings.c_iflag = IGNBRK | IGNPAR; serial_setbaud(port, port->baud_rate); - tcflush(port->port_fd, TCIFLUSH); + tcflush(port->port_fd, TCIFLUSH); + +#elif defined(WINDOWS) + COMMCONFIG cfg; + COMMTIMEOUTS timeouts; + int got_default_cfg=0, port_num; + char buf[1024], name_createfile[64], name_commconfig[64], *p; + DWORD len; + + snprintf(buf, sizeof(buf), "%s", name.c_str()); + p = strstr(buf, "COM"); + if (p && sscanf(p + 3, "%d", &port_num) == 1) { + printf("port_num = %d\n", port_num); + snprintf(name_createfile, sizeof(name_createfile), "\\\\.\\COM%d", port_num); + snprintf(name_commconfig, sizeof(name_commconfig), "COM%d", port_num); + } else { + snprintf(name_createfile, sizeof(name_createfile), "%s", name.c_str()); + snprintf(name_commconfig, sizeof(name_commconfig), "%s", name.c_str()); + } + len = sizeof(COMMCONFIG); + if (GetDefaultCommConfig(name_commconfig, &cfg, &len)) { + // this prevents unintentionally raising DTR when opening + // might only work on COM1 to COM9 + got_default_cfg = 1; + memcpy(&(port->port_cfg_orig), &cfg, sizeof(COMMCONFIG)); + cfg.dcb.fDtrControl = DTR_CONTROL_DISABLE; + cfg.dcb.fRtsControl = RTS_CONTROL_DISABLE; + SetDefaultCommConfig(name_commconfig, &cfg, sizeof(COMMCONFIG)); + } else { + printf("error with GetDefaultCommConfig\n"); + } + port->port_handle = CreateFile(name_createfile, GENERIC_READ | GENERIC_WRITE, + 0, 0, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); + if (port->port_handle == INVALID_HANDLE_VALUE) { + win32_err(buf); + sprintf(port->error_msg, "Unable to open %s, %s", name, buf); //error_msg = "Unable to open " + name + ", " + buf; + return -1; + } + len = sizeof(COMMCONFIG); + if (!GetCommConfig(port->port_handle, &(port->port_cfg), &len)) { + CloseHandle(port->port_handle); + win32_err(buf); + sprintf(port->error_msg,"Unable to read communication config on %s, %s", name, buf); // error_msg = "Unable to read communication config on " + name + ", " + buf; + return -1; + } + if (!got_default_cfg) { + memcpy(&(port->port_cfg_orig), &(port->port_cfg), sizeof(COMMCONFIG)); + } + // http://msdn2.microsoft.com/en-us/library/aa363188(VS.85).aspx + port->port_cfg.dcb.BaudRate = baud_rate; + port->port_cfg.dcb.fBinary = TRUE; + port->port_cfg.dcb.fParity = FALSE; + port->port_cfg.dcb.fOutxCtsFlow = FALSE; + port->port_cfg.dcb.fOutxDsrFlow = FALSE; + port->port_cfg.dcb.fDtrControl = DTR_CONTROL_DISABLE; + port->port_cfg.dcb.fDsrSensitivity = FALSE; + port->port_cfg.dcb.fTXContinueOnXoff = TRUE; + port->port_cfg.dcb.fOutX = FALSE; + port->port_cfg.dcb.fInX = FALSE; + port->port_cfg.dcb.fErrorChar = FALSE; + port->port_cfg.dcb.fNull = FALSE; + port->port_cfg.dcb.fRtsControl = RTS_CONTROL_DISABLE; + port->port_cfg.dcb.fAbortOnError = FALSE; + port->port_cfg.dcb.ByteSize = 8; + port->port_cfg.dcb.Parity = NOPARITY; + port->port_cfg.dcb.StopBits = ONESTOPBIT; + if (!SetCommConfig(port->port_handle, &(port->port_cfg), sizeof(COMMCONFIG))) { + CloseHandle(port->port_handle); + win32_err(buf); + sprintf(port->error_msg,"Unable to write communication config to %s, %s", name, buf);// error_msg = "Unable to write communication config to " + name + ", " + buf; + return -1; + } + if (!EscapeCommFunction(port->port_handle, CLRDTR | CLRRTS)) { + CloseHandle(port->port_handle); + win32_err(buf); + sprintf(port->error_msg, "Unable to control serial port signals on %s, %s", name, buf); // error_msg = "Unable to control serial port signals on " + name + ", " + buf; + return -1; + } + // http://msdn2.microsoft.com/en-us/library/aa363190(VS.85).aspx + // setting to all zeros means timeouts are not used + //timeouts.ReadIntervalTimeout = 0; + timeouts.ReadIntervalTimeout = MAXDWORD; + timeouts.ReadTotalTimeoutMultiplier = 0; + timeouts.ReadTotalTimeoutConstant = 0; + timeouts.WriteTotalTimeoutMultiplier = 0; + timeouts.WriteTotalTimeoutConstant = 0; + if (!SetCommTimeouts(port->port_handle, &timeouts)) { + CloseHandle(port->port_handle); + win32_err(buf); + sprintf(port->error_msg, "Unable to write timeout settings to %s, %s", name, buf); // error_msg = "Unable to write timeout settings to " + name + ", " + buf; + return -1; + } +#endif /* MACOSX or WINDOWS */ + strncpy(port->port_name, name, MAXPATHLEN); port->port_is_open = 1; @@ -187,7 +351,8 @@ int serial_setbaud(serial_t *port, int baud) { if (port == NULL || baud <= 0) return -1; if (!port->port_is_open) return -1; - + +#if defined(MACOSX) if (-1 == cfsetospeed(&(port->settings), (speed_t)baud)) { sprintf(port->error_msg, "serial_setbaud: Couldn't set BAUD rate"); return -1; @@ -201,7 +366,14 @@ int serial_setbaud(serial_t *port, int baud) sprintf(port->error_msg, "serial_setbaud: Couldn't set BAUD rate"); return -1; } - + +#elif defined(WINDOWS) + DWORD len = sizeof(COMMCONFIG); + port->port_cfg.dcb.BaudRate = baud; + SetCommConfig(port->port_handle, &(port->port_cfg), len); + +#endif /* MACOSX or WINDOWS */ + port->baud_rate = baud; sprintf(port->error_msg, ""); return 0; @@ -215,11 +387,63 @@ long serial_read(serial_t *port, void *ptr, int count) if (port == NULL || !port->port_is_open) return -1; if (count <= 0 || ptr == NULL) return 0; +#if defined(MACOSX) long n; n = read(port->port_fd, ptr, count); //printf("serial_read %ld bytes\n", n); if (n < 0 && (errno == EAGAIN || errno == EINTR)) return 0; return n; + +#elif defined(WINDOWS) + // first, we'll find out how many bytes have been received + // and are currently waiting for us in the receive buffer. + // http://msdn.microsoft.com/en-us/library/ms885167.aspx + // http://msdn.microsoft.com/en-us/library/ms885173.aspx + // http://source.winehq.org/WineAPI/ClearCommError.html + COMSTAT st; + DWORD errmask=0, num_read, num_request; + OVERLAPPED ov; + int r; + if (!ClearCommError(port->port_handle, &errmask, &st)) return -1; + //printf("Read, %d requested, %lu buffered\n", count, st.cbInQue); + if (st.cbInQue <= 0) return 0; + // now do a ReadFile, now that we know how much we can read + // a blocking (non-overlapped) read would be simple, but win32 + // is all-or-nothing on async I/O and we must have it enabled + // because it's the only way to get a timeout for WaitCommEvent + num_request = ((DWORD)count < st.cbInQue) ? (DWORD)count : st.cbInQue; + ov.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); + if (ov.hEvent == NULL) return -1; + ov.Internal = ov.InternalHigh = 0; + ov.Offset = ov.OffsetHigh = 0; + if (ReadFile(port->port_handle, ptr, num_request, &num_read, &ov)) { + // this should usually be the result, since we asked for + // data we knew was already buffered + //printf("Read, immediate complete, num_read=%lu\n", num_read); + r = num_read; + } else { + if (GetLastError() == ERROR_IO_PENDING) { + if (GetOverlappedResult(port->port_handle, &ov, &num_read, TRUE)) { + //printf("Read, delayed, num_read=%lu\n", num_read); + r = num_read; + } else { + //printf("Read, delayed error\n"); + r = -1; + } + } else { + //printf("Read, error\n"); + r = -1; + } + } + CloseHandle(ov.hEvent); + // TODO: how much overhead does creating new event objects on + // every I/O request really cost? Would it be better to create + // just 3 when we open the port, and reset/reuse them every time? + // Would mutexes or critical sections be needed to protect them? + return r; + +#endif /* MACOSX or WINDOWS */ + } // Write to the serial port. This blocks until the data is @@ -231,6 +455,7 @@ long serial_write(serial_t *port, const void *ptr, int len) if (port == NULL || !port->port_is_open) return -1; if (len == 0 || ptr == NULL) return 0; +#if defined(MACOSX) long n, written=0; fd_set wfds; struct timeval tv; @@ -252,6 +477,37 @@ long serial_write(serial_t *port, const void *ptr, int len) } } return written; + +#elif defined(WINDOWS) + DWORD num_written; + OVERLAPPED ov; + int r; + ov.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); + if (ov.hEvent == NULL) return -1; + ov.Internal = ov.InternalHigh = 0; + ov.Offset = ov.OffsetHigh = 0; + if (WriteFile(port->port_handle, ptr, len, &num_written, &ov)) { + //printf("Write, immediate complete, num_written=%lu\n", num_written); + r = num_written; + } else { + if (GetLastError() == ERROR_IO_PENDING) { + if (GetOverlappedResult(port->port_handle, &ov, &num_written, TRUE)) { + //printf("Write, delayed, num_written=%lu\n", num_written); + r = num_written; + } else { + //printf("Write, delayed error\n"); + r = -1; + } + } else { + //printf("Write, error\n"); + r = -1; + } + }; + CloseHandle(ov.hEvent); + return r; + +#endif /* MACOSX or WINDOWS */ + } // Wait up to msec for data to become available for reading. @@ -260,7 +516,8 @@ long serial_write(serial_t *port, const void *ptr, int len) int serial_inputwait(serial_t *port, int msec) { if (port == NULL || !port->port_is_open) return -1; - + +#if defined(MACOSX) fd_set rfds; struct timeval tv; tv.tv_sec = msec / 1000; @@ -268,20 +525,81 @@ int serial_inputwait(serial_t *port, int msec) FD_ZERO(&rfds); FD_SET(port->port_fd, &rfds); return select(port->port_fd+1, &rfds, NULL, NULL, &tv); + +#elif defined(WINDOWS) + // http://msdn2.microsoft.com/en-us/library/aa363479(VS.85).aspx + // http://msdn2.microsoft.com/en-us/library/aa363424(VS.85).aspx + // http://source.winehq.org/WineAPI/WaitCommEvent.html + COMSTAT st; + DWORD errmask=0, eventmask=EV_RXCHAR, ret; + OVERLAPPED ov; + int r; + // first, request comm event when characters arrive + if (!SetCommMask(port->port_handle, EV_RXCHAR)) return -1; + // look if there are characters in the buffer already + if (!ClearCommError(port->port_handle, &errmask, &st)) return -1; + //printf("Input_wait, %lu buffered, timeout = %d ms\n", st.cbInQue, msec); + if (st.cbInQue > 0) return 1; + + ov.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); + if (ov.hEvent == NULL) return -1; + ov.Internal = ov.InternalHigh = 0; + ov.Offset = ov.OffsetHigh = 0; + if (WaitCommEvent(port->port_handle, &eventmask, &ov)) { + //printf("Input_wait, WaitCommEvent, immediate success\n"); + r = 1; + } else { + if (GetLastError() == ERROR_IO_PENDING) { + ret = WaitForSingleObject(ov.hEvent, msec); + if (ret == WAIT_OBJECT_0) { + //printf("Input_wait, WaitCommEvent, delayed success\n"); + r = 1; + } else if (ret == WAIT_TIMEOUT) { + //printf("Input_wait, WaitCommEvent, timeout\n"); + GetCommMask(port->port_handle, &eventmask); + r = 0; + } else { // WAIT_FAILED or WAIT_ABANDONED + //printf("Input_wait, WaitCommEvent, delayed error\n"); + r = -1; + } + } else { + //printf("Input_wait, WaitCommEvent, immediate error\n"); + r = -1; + } + } + SetCommMask(port->port_handle, 0); + CloseHandle(ov.hEvent); + return r; + +#endif /* MACOSX or WINDOWS */ } // Discard all received data that hasn't been read void serial_inputdiscard(serial_t *port) { if (port == NULL || !port->port_is_open) return; + +#if defined(MACOSX) tcflush(port->port_fd, TCIFLUSH); + +#elif defined(WINDOWS) + PurgeComm(port->port_handle, PURGE_RXCLEAR); + +#endif /* MACOSX or WINDOWS */ } // Wait for all transmitted data with Write to actually leave the serial port void serial_outputflush(serial_t *port) { if (port == NULL || !port->port_is_open) return; + +#if defined(MACOSX) tcdrain(port->port_fd); + +#elif defined(WINDOWS) + FlushFileBuffers(port->port_handle); + +#endif /* MACOSX or WINDOWS */ } // set DTR and RTS, 0 = low, 1=high, -1=unchanged @@ -289,6 +607,7 @@ int serial_setcontrol(serial_t *port, int dtr, int rts) { if (port == NULL || !port->port_is_open) return -1; +#if defined(MACOSX) // on Mac OS X, "man 4 tty" int bits; if (ioctl(port->port_fd, TIOCMGET, &bits) < 0) return -1; @@ -303,6 +622,21 @@ int serial_setcontrol(serial_t *port, int dtr, int rts) bits &= ~TIOCM_RTS; } if (ioctl(port->port_fd, TIOCMSET, &bits) < 0) return -1;; + +#elif defined(WINDOWS) + // http://msdn.microsoft.com/en-us/library/aa363254(VS.85).aspx + if (dtr == 1) { + if (!EscapeCommFunction(port->port_handle, SETDTR)) return -1; + } else if (dtr == 0) { + if (!EscapeCommFunction(port->port_handle, CLRDTR)) return -1; + } + if (rts == 1) { + if (!EscapeCommFunction(port->port_handle, SETRTS)) return -1; + } else if (rts == 0) { + if (!EscapeCommFunction(port->port_handle, CLRRTS)) return -1; + } + +#endif /* MACOSX or WINDOWS */ return 0; } @@ -314,12 +648,20 @@ void serial_close(serial_t *port) serial_outputflush(port); serial_inputdiscard(port); - tcsetattr(port->port_fd, TCSANOW, &(port->settings_orig)); - close(port->port_fd); - port->port_is_open = 0; port->baud_rate = 0; sprintf(port->port_name, ""); + +#if defined(MACOSX) + tcsetattr(port->port_fd, TCSANOW, &(port->settings_orig)); + close(port->port_fd); + +#elif defined(WINDOWS) + //SetCommConfig(port->port_handle, &port_cfg_orig, sizeof(COMMCONFIG)); + CloseHandle(port->port_handle); + +#endif /* MAXOSX or WINDOWS */ + sprintf(port->error_msg, ""); port->port_fd = 0; } diff --git a/source/FirmataClient/serial.h b/source/FirmataClient/serial.h index 8986839755ba28bec7429e9dabd2592278e716aa..1c4fdb4d8b35a23445ef3261809024965961573d 100755 --- a/source/FirmataClient/serial.h +++ b/source/FirmataClient/serial.h @@ -1,20 +1,45 @@ #ifndef serial_h #define serial_h +#define MACOSX +//#define WINDOWS + +#if defined(MACOSX) #include // required for: termios struct -#include // required for: MAXPATHLEN const #include // required for: io_iterator_t +#elif defined(WINDOWS) +#include + +#endif /* MACOSX or WINDOWS */ + + +//#include // required for: termios struct +//#include // required for: MAXPATHLEN const +//#include // required for: io_iterator_t + #define DEBUG 0 +#define MAXPATHLEN 256 + typedef struct { int port_is_open; int baud_rate; - int port_fd; char port_name[MAXPATHLEN]; char error_msg[MAXPATHLEN]; + +#if defined(MACOSX) + int port_fd; struct termios settings_orig; struct termios settings; + +#elif defined(WINDOWS) + HANDLE port_handle; + COMMCONFIG port_cfg_orig; + COMMCONFIG port_cfg; + +#endif /* MACOSX or WINDOWS */ + } serial_t; // Returns 1 if port is open, 0 otherwise. diff --git a/source/cr.boardin/cr.boardin.xcodeproj/project.xcworkspace/xcuserdata/orly.xcuserdatad/UserInterfaceState.xcuserstate b/source/cr.boardin/cr.boardin.xcodeproj/project.xcworkspace/xcuserdata/orly.xcuserdatad/UserInterfaceState.xcuserstate index d6e3079adfc5f8ccd3a5e0151597bc03ce92e6a5..2118b0207d21dae74d3fdacdd3b2985a6c6fd61a 100644 Binary files a/source/cr.boardin/cr.boardin.xcodeproj/project.xcworkspace/xcuserdata/orly.xcuserdatad/UserInterfaceState.xcuserstate and b/source/cr.boardin/cr.boardin.xcodeproj/project.xcworkspace/xcuserdata/orly.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/source/cr.boardin/cr.boardin.xcodeproj/xcuserdata/orly.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/source/cr.boardin/cr.boardin.xcodeproj/xcuserdata/orly.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index e9cc5e8d62a9c1cc563a44560c5ca7a96ad0c3ce..1013956be6faee237fc801d7598c30e924cffd88 100644 --- a/source/cr.boardin/cr.boardin.xcodeproj/xcuserdata/orly.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/source/cr.boardin/cr.boardin.xcodeproj/xcuserdata/orly.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -91,22 +91,6 @@ endingLineNumber = "39"> - - - - msg_type[a]->s_name); +} + +void robotin_free(t_robotin *x) { + // kill the thread, if running + robotin_close(x); + // release any dynamically allocated memory + /* + for(int i=0; inum_subscribers; ++i) { + outlet_delete(x); //x->outlets[i]); + free(x->data[i]); + } + free(x->outlets); + free(x->data); + */ +} + +void *robotin_new(t_symbol *s, long argc, t_atom *argv) +{ + t_robotin *x = (t_robotin *)object_alloc(robotin_class); + // verify memory allocated successfully + if (x == NULL ) { + post( "Max is out of memory, could not create new robotin object."); + return NULL; + } + + // ip address attribute + if(argv->a_type == A_SYM) { + x->ip_addr = atom_getsym(argv); + if(! isValidIpAddress(x->ip_addr->s_name) ) post("ip address is not valid: %s", x->ip_addr->s_name); + } else + x->ip_addr = NULL; + + x->num_subscribers = 0; + x->is_connected = false; + x->listener.is_active = 0; + + if (robotin_parseArgs(x, argc, argv) == 0 ) { + x->outlets = (void**)malloc(x->num_subscribers * sizeof(void*)); + //x->data = (t_atom**)malloc(x->num_subscribers * sizeof(t_atom*)); + if (x->outlets == NULL) { // || x->data == NULL) { + post( "Max is out of memory, could not create new robotin object."); + return NULL; + } + for(int i=x->num_subscribers; i>0; ) { + --i; + x->outlets[i] = outlet_new((t_object *)x, NULL); // NULL indicates the outlet can send any message. + } + } + + x->twist_s = gensym("twist"); + x->imu_s = gensym("imu"); + x->laser_s = gensym("laser"); + x->odom_s = gensym("odometry"); + x->sensors_s = gensym("sensors"); + x->joints_s = gensym("joints"); + x->tf_s = gensym("tf"); + + x->joint_names_sym = (t_symbol**)malloc(2 * sizeof(t_symbol*)); + x->joint_names_sym[0] = gensym("wheel_left_joint"); + x->joint_names_sym[1] = gensym("wheel_right_joint"); + + return (x); +} + +void robotin_toggle(t_robotin *x, long key){ + if(key==0) + robotin_close(x); + else + robotin_open(x); +} + +void robotin_open(t_robotin *x) { + + if(x->ip_addr == NULL) { + object_error((t_object *)x, "no ip specified"); + return; + } + + if(x->listener.is_active == 1) { + object_post((t_object *)x, "already open on %s", x->ip_addr->s_name); + return; + } + + if(x->num_subscribers == 0) { + object_error((t_object *)x, "no subscribers requested for %s", x->ip_addr->s_name); + return; + } + + // if didn't establish a connection yet, connect + if(x->is_connected == false) { + if (robotin_connect(x) != 0) return; + } + + // start listening to incoming messages from the robot + int returned_val = robin_start_listening(&x->listener, x->err_msg); + if(returned_val != 0) { + object_error((t_object *)x, "Error in robot_start: %d", returned_val); + object_error((t_object *)x, x->err_msg); + } + + else { + x->listener.is_active = 1; + object_post((t_object *)x, "listening to robot on %s ...", x->ip_addr->s_name); + } + +} + +void robotin_close(t_robotin *x) { + + // if the thread is not running, return + if( x->listener.is_active == 0) return; + + // if the thread is running, kill the thread + if(robin_stop_listening(&x->listener, x->err_msg) != 0) { + // object_error((t_object *)x, "Error in rin_close:"); + // object_error((t_object *)x, x->err_msg); + } + x->listener.is_active = 0; + object_post((t_object *)x, "stopped listenning to robot on %s", x->ip_addr->s_name); +} + +int robotin_parseArgs(t_robotin *x, long argc, t_atom *argv) { + + // the first argument is the ip + // check the second argument + + int num_chatter = 0, num_twist = 0, num_odometry = 0, num_laser = 0, num_imu = 0; + int num_joints = 0, num_sensors = 0, num_tf = 0; + + for (int i=1; i < argc && x->num_subscribersa_type == A_SYM) { + + t_symbol *s = atom_getsym(tolower(argv+i)); + + // if the symbol is chatter + if (! strcmp(s->s_name, "@chatter")) { + if(num_chatter) { + // already exist + object_error((t_object *)x, "error duplicate %s", s->s_name); + return -1; + } + num_chatter++; + } + else if (! strcmp(s->s_name, "@twist")) { + if(num_twist) { + // already exist + object_error((t_object *)x, "error duplicate %s", s->s_name); + return -1; + } + num_twist++; + } + else if (! strcmp(s->s_name, "@odometry")) { + if(num_odometry) { + // already exist + object_error((t_object *)x, "error duplicate %s", s->s_name); + return -1; + } + num_odometry++; + } + else if (! strcmp(s->s_name, "@laser")) { + if(num_laser) { + // already exist + object_error((t_object *)x, "error duplicate %s", s->s_name); + return -1; + } + num_laser++; + } + else if (! strcmp(s->s_name, "@imu")) { + if(num_imu) { + // already exist + object_error((t_object *)x, "error duplicate %s", s->s_name); + return -1; + } + num_imu++; + } + else if (! strcmp(s->s_name, "@sensors")) { + if(num_sensors) { + // already exist + object_error((t_object *)x, "error duplicate %s", s->s_name); + return -1; + } + num_sensors++; + } + else if (! strcmp(s->s_name, "@joints")) { + if(num_joints) { + // already exist + object_error((t_object *)x, "error duplicate %s", s->s_name); + return -1; + } + num_joints++; + } + else if (! strcmp(s->s_name, "@tf")) { + if(num_tf) { + // already exist + object_error((t_object *)x, "error duplicate %s", s->s_name); + return -1; + } + num_tf++; + } + else { + // otherwise, unknown attribute symbol + object_error((t_object *)x, "forbidden argument %s", s->s_name); + return -1; + } + + x->msg_type[x->num_subscribers++] = s; + } + if(x->num_subscribers == MAX_SUBSCRIBERS) { + // otherwise, max subscibers reached + object_error((t_object *)x, "too many subscribers, limited to %d", MAX_SUBSCRIBERS); + return -1; + } + } + + return 0; +} + +int robotin_connect(t_robotin *x) { + + if(x->is_connected) return 0; + + // init ros nodes + ros_init(x->ip_addr->s_name); + // subscribe to requested topics + for(int i=0; inum_subscribers; ++i) { + if(x->msg_type[i] == gensym("@twist")) { + ros_subscribe_twist(x, robotin_twistfunc, i); + object_post((t_object *)x, "Subscribed to /cmd_vel_rc100"); + } + else if(x->msg_type[i] == gensym("@laser")) { + ros_subscribe_laser(x, robotin_laserfunc, i); + object_post((t_object *)x, "Subscribed to /scan"); + } + else if(x->msg_type[i] == gensym("@odometry")) { + ros_subscribe_odometry(x, robotin_odometryfunc, i); + object_post((t_object *)x, "Subscribed to /odom"); + } + else if(x->msg_type[i] == gensym("@imu")) { + ros_subscribe_imu(x, robotin_imufunc, i); + object_post((t_object *)x, "Subscribed to /imu"); + } + else if(x->msg_type[i] == gensym("@joints")) { + ros_subscribe_joints(x, robotin_jointsfunc, i); + object_post((t_object *)x, "Subscribed to /joint_states"); + } + else if(x->msg_type[i] == gensym("@sensors")) { + ros_subscribe_sensors(x, robotin_sensorsfunc, i); + object_post((t_object *)x, "Subscribed to /sensor_state"); + } + else if(x->msg_type[i] == gensym("@tf")) { + ros_subscribe_tf(x, robotin_tffunc, i); + object_post((t_object *)x, "Subscribed to /tf"); + } + + //post("subscribed to: %s", x->msg_type[i]->s_name); + } + + x->is_connected = true; + return 0; +} + +void robotin_twistfunc(void *x_, const void *msg, int index) { + //post("recieved twist message"); + t_robotin *x = (t_robotin *)x_; + int argc = 6; + double *d = twistMsg_floats(msg); + atom_setdouble_array(argc, x->twist_msg, argc, d); + outlet_anything(x->outlets[index], x->twist_s, argc, x->twist_msg); + free(d); +} + +void robotin_odometryfunc(void *x_, const void *msg, int index) { + //post("recieved odometry message"); + t_robotin *x = (t_robotin *)x_; + //t_atom argv[90]; + int argc = 90; + int i=0; + unsigned *header_ints = odometryMsg_header_ints(msg); + atom_setlong(x->odometry_msg+i, header_ints[0]); ++i; + atom_setlong(x->odometry_msg+i, header_ints[1]); ++i; + atom_setlong(x->odometry_msg+i, header_ints[2]); ++i; + const char *frame = odometryMsg_header_frame(msg); + atom_setsym(x->odometry_msg+i, gensym(frame)); ++i; + const char *child = odometryMsg_childframe(msg); + atom_setsym(x->odometry_msg+i, gensym(child)); ++i; + double *d = odometryMsg_floats(msg); + atom_setdouble_array(85, x->odometry_msg+i, 85, d); + outlet_anything(x->outlets[index], x->odom_s, argc, x->odometry_msg); + free(header_ints); + free(d); +} + +void robotin_laserfunc(void *x_, const void *msg, int index) { + //post("recieved laser message"); + t_robotin *x = (t_robotin *)x_; + int n = 7 + laser_intensities_length(msg) + laser_ranges_length(msg); // 7+2*360 = 727 + //object_post((t_object*)x, "laser: ranges-length=%d, intensities-length=%d", laser_ranges_length(msg), laser_intensities_length(msg));//=360, 360 + int total = 4 + n; //=4+727=731 + //t_atom *argv = (t_atom*)malloc(total*sizeof(t_atom)); + int i=0; + unsigned *header_ints = laserMsg_header_ints(msg); + atom_setlong(x->imu_msg+i, header_ints[0]); ++i; + atom_setlong(x->imu_msg+i, header_ints[1]); ++i; + atom_setlong(x->imu_msg+i, header_ints[2]); ++i; + char *frameid = laserMsg_header_frame(msg); + atom_setsym(x->imu_msg+i, gensym(frameid)); ++i; + //post("laser frame id=%s", laserMsg_header_frame(msg)); + atom_setdouble_array(n, x->laser_msg+i, n, laserMsg_floats(msg)); + outlet_anything(x->outlets[index], x->laser_s, total, x->laser_msg); + free(header_ints); +} + +void robotin_imufunc(void *x_, const void *msg, int index) { + //post("recieved imu message"); + t_robotin *x = (t_robotin *)x_; + int argc = 3+1+37; + //t_atom argv[41]; + int i=0; + unsigned *header_ints = imuMsg_header_ints(msg); + atom_setlong(x->imu_msg+i, header_ints[0]); ++i; + atom_setlong(x->imu_msg+i, header_ints[1]); ++i; + atom_setlong(x->imu_msg+i, header_ints[2]); ++i; + atom_setsym(x->imu_msg+i, gensym(imuMsg_header_frame(msg))); ++i; + atom_setdouble_array(37, x->imu_msg+i, 37, imuMsg_floats(msg)); + outlet_anything(x->outlets[index], x->imu_s, argc, x->imu_msg); + free(header_ints); +} + +void robotin_jointsfunc(void *x_, const void *msg, int index) { + //post("recieved joints state message"); + t_robotin *x = (t_robotin *)x_; + int num_joints = 2; + int total = 12; //3 + 1 + 4 * num_joints; + int i = 0; + // set header + unsigned *header_ints = jointsMsg_header_ints(msg); + atom_setlong(x->joints_msg+i, header_ints[0]); ++i; + atom_setlong(x->joints_msg+i, header_ints[1]); ++i; + atom_setlong(x->joints_msg+i, header_ints[2]); ++i; + //post("jointsMsg_header_frame = %s", jointsMsg_header_frame(msg)); + //post("joint_names_sym_0 = %s", *(x->joint_names_sym[0])); + //post("joint_names_sym_1 = %s", *(x->joint_names_sym[1])); + atom_setsym(x->joints_msg+i, gensym(jointsMsg_header_frame(msg))); ++i; + atom_setsym_array(num_joints, x->joints_msg+i, num_joints, x->joint_names_sym); i += num_joints; + // set position, velocity, effort arrays (length num_joints) = 3*num_joints + atom_setdouble_array(3*num_joints, x->joints_msg+i, 3*num_joints, jointsMsg_floats(msg)); + outlet_anything(x->outlets[index], x->joints_s, total, x->joints_msg); + free(header_ints); +} + +void robotin_sensorsfunc(void *x_, const void *msg, int index) { + //post("recieved sensors state message"); + t_robotin *x = (t_robotin *)x_; + int argc = 8; + unsigned *ints = sensorsMsg_ints(msg); + for(int i=0; i<7; ++i) + atom_setlong(x->sensors_msg+i, ints[i]); + // set all the doubles + atom_setfloat(x->sensors_msg+7, sensorsMsg_float(msg)); + outlet_anything(x->outlets[index], x->sensors_s, argc, x->sensors_msg); + free(ints); + + /* ROSSERIAL MESSAGE IMPLEMENTATION: + ros::Time stamp; // sec, nsec + uint8_t bumper; + uint8_t cliff; + uint8_t button; + uint8_t left_encoder; + uint8_t right_encoder; + float battery; + */ +} + +void robotin_tffunc(void *x_, const void *msg, int index) { + //post("recieved tf message"); + t_robotin *x = (t_robotin *)x_; + int argc = 12; //3+1+1+3+4; + //t_atom argv[12]; + int i=0; + unsigned *header_ints = tfMsg_header_ints(msg); + atom_setlong(x->tf_msg+i, header_ints[0]); ++i; + atom_setlong(x->tf_msg+i, header_ints[1]); ++i; + atom_setlong(x->tf_msg+i, header_ints[2]); ++i; + atom_setsym(x->tf_msg+i, gensym(tfMsg_header_frame(msg))); ++i; + atom_setsym(x->tf_msg+i, gensym(tfMsg_childframe(msg))); ++i; + atom_setdouble_array(7, x->tf_msg+i, 7, tfMsg_floats(msg)); + outlet_anything(x->outlets[index], x->tf_s, argc, x->tf_msg); + +} diff --git a/source/cr.robotin/cr.robotin.xcodeproj/project.pbxproj b/source/cr.robotin/cr.robotin.xcodeproj/project.pbxproj new file mode 100755 index 0000000000000000000000000000000000000000..6d9dfe00770f6701c72b05db8f5915b2b4559edf --- /dev/null +++ b/source/cr.robotin/cr.robotin.xcodeproj/project.pbxproj @@ -0,0 +1,221 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 0C4FCB9520A57EB9002126CE /* max.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C4FCB9420A57EB9002126CE /* max.h */; }; + 0C4FCB9D20A5813E002126CE /* wrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0C4FCB9620A5813E002126CE /* wrapper.cpp */; }; + 0C4FCB9E20A5813E002126CE /* ros_lib in Resources */ = {isa = PBXBuildFile; fileRef = 0C4FCB9720A5813E002126CE /* ros_lib */; }; + 0C4FCBA020A5813E002126CE /* wrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C4FCB9C20A5813E002126CE /* wrapper.h */; }; + 0C4FCBA720A5822A002126CE /* max.c in Sources */ = {isa = PBXBuildFile; fileRef = 0C4FCBA620A5822A002126CE /* max.c */; }; + 22CF11AE0EE9A8840054F513 /* cr.robotin.c in Sources */ = {isa = PBXBuildFile; fileRef = 22CF11AD0EE9A8840054F513 /* cr.robotin.c */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 0C4FCB9420A57EB9002126CE /* max.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = max.h; path = "../ros-max-lib/max.h"; sourceTree = ""; }; + 0C4FCB9620A5813E002126CE /* wrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = wrapper.cpp; path = "../ros-max-lib/wrapper.cpp"; sourceTree = ""; }; + 0C4FCB9720A5813E002126CE /* ros_lib */ = {isa = PBXFileReference; lastKnownFileType = folder; name = ros_lib; path = "../ros-max-lib/ros_lib"; sourceTree = ""; }; + 0C4FCB9C20A5813E002126CE /* wrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wrapper.h; path = "../ros-max-lib/wrapper.h"; sourceTree = ""; }; + 0C4FCBA620A5822A002126CE /* max.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = max.c; path = "../ros-max-lib/max.c"; sourceTree = ""; }; + 22CF10220EE984600054F513 /* maxmspsdk.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = maxmspsdk.xcconfig; path = ../maxmspsdk.xcconfig; sourceTree = SOURCE_ROOT; }; + 22CF11AD0EE9A8840054F513 /* cr.robotin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cr.robotin.c; sourceTree = ""; }; + 2FBBEAE508F335360078DB84 /* cr.robotin.mxo */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = cr.robotin.mxo; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2FBBEADC08F335360078DB84 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* iterator */ = { + isa = PBXGroup; + children = ( + 0C4FCB9720A5813E002126CE /* ros_lib */, + 0C4FCB9420A57EB9002126CE /* max.h */, + 0C4FCBA620A5822A002126CE /* max.c */, + 0C4FCB9C20A5813E002126CE /* wrapper.h */, + 0C4FCB9620A5813E002126CE /* wrapper.cpp */, + 22CF11AD0EE9A8840054F513 /* cr.robotin.c */, + 22CF10220EE984600054F513 /* maxmspsdk.xcconfig */, + 19C28FB4FE9D528D11CA2CBB /* Products */, + 0C3533D81F87027000671127 /* Frameworks */, + ); + name = iterator; + sourceTree = ""; + }; + 0C3533D81F87027000671127 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; + 19C28FB4FE9D528D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 2FBBEAE508F335360078DB84 /* cr.robotin.mxo */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 2FBBEAD708F335360078DB84 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C4FCBA020A5813E002126CE /* wrapper.h in Headers */, + 0C4FCB9520A57EB9002126CE /* max.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 2FBBEAD608F335360078DB84 /* max-external */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2FBBEAE008F335360078DB84 /* Build configuration list for PBXNativeTarget "max-external" */; + buildPhases = ( + 2FBBEAD708F335360078DB84 /* Headers */, + 2FBBEAD808F335360078DB84 /* Resources */, + 2FBBEADA08F335360078DB84 /* Sources */, + 2FBBEADC08F335360078DB84 /* Frameworks */, + 2FBBEADF08F335360078DB84 /* Rez */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "max-external"; + productName = iterator; + productReference = 2FBBEAE508F335360078DB84 /* cr.robotin.mxo */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0830; + }; + buildConfigurationList = 2FBBEACF08F335010078DB84 /* Build configuration list for PBXProject "cr.robotin" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + en, + ); + mainGroup = 089C166AFE841209C02AAC07 /* iterator */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2FBBEAD608F335360078DB84 /* max-external */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2FBBEAD808F335360078DB84 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C4FCB9E20A5813E002126CE /* ros_lib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXRezBuildPhase section */ + 2FBBEADF08F335360078DB84 /* Rez */ = { + isa = PBXRezBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXRezBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2FBBEADA08F335360078DB84 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C4FCBA720A5822A002126CE /* max.c in Sources */, + 22CF11AE0EE9A8840054F513 /* cr.robotin.c in Sources */, + 0C4FCB9D20A5813E002126CE /* wrapper.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2FBBEAD008F335010078DB84 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Development; + }; + 2FBBEAD108F335010078DB84 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Deployment; + }; + 2FBBEAE108F335360078DB84 /* Development */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 22CF10220EE984600054F513 /* maxmspsdk.xcconfig */; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_OPTIMIZATION_LEVEL = 0; + OTHER_LDFLAGS = "$(C74_SYM_LINKER_FLAGS)"; + PRODUCT_NAME = cr.robotin; + }; + name = Development; + }; + 2FBBEAE208F335360078DB84 /* Deployment */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 22CF10220EE984600054F513 /* maxmspsdk.xcconfig */; + buildSettings = { + COPY_PHASE_STRIP = YES; + OTHER_LDFLAGS = "$(C74_SYM_LINKER_FLAGS)"; + PRODUCT_NAME = cr.robotin; + }; + name = Deployment; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2FBBEACF08F335010078DB84 /* Build configuration list for PBXProject "cr.robotin" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2FBBEAD008F335010078DB84 /* Development */, + 2FBBEAD108F335010078DB84 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Development; + }; + 2FBBEAE008F335360078DB84 /* Build configuration list for PBXNativeTarget "max-external" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2FBBEAE108F335360078DB84 /* Development */, + 2FBBEAE208F335360078DB84 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Development; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/source/cr.robotin/cr.robotin.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/source/cr.robotin/cr.robotin.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000000000000000000000000000000000..6c1f4b245a403fe70ff77bb91e12cb61beebb1ab --- /dev/null +++ b/source/cr.robotin/cr.robotin.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/source/cr.robotin/cr.robotin.xcodeproj/project.xcworkspace/xcuserdata/orly.xcuserdatad/UserInterfaceState.xcuserstate b/source/cr.robotin/cr.robotin.xcodeproj/project.xcworkspace/xcuserdata/orly.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..d7a7aefad6c6c79792bd292a2f9ee33118298077 Binary files /dev/null and b/source/cr.robotin/cr.robotin.xcodeproj/project.xcworkspace/xcuserdata/orly.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/source/cr.robotin/cr.robotin.xcodeproj/xcuserdata/orly.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/source/cr.robotin/cr.robotin.xcodeproj/xcuserdata/orly.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000000000000000000000000000000000000..e9cc5e8d62a9c1cc563a44560c5ca7a96ad0c3ce --- /dev/null +++ b/source/cr.robotin/cr.robotin.xcodeproj/xcuserdata/orly.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/cr.robotin/cr.robotin.xcodeproj/xcuserdata/orly.xcuserdatad/xcschemes/max-external.xcscheme b/source/cr.robotin/cr.robotin.xcodeproj/xcuserdata/orly.xcuserdatad/xcschemes/max-external.xcscheme new file mode 100644 index 0000000000000000000000000000000000000000..b51afc89c27bd32b8522a1da7687c0ab0a286f2d --- /dev/null +++ b/source/cr.robotin/cr.robotin.xcodeproj/xcuserdata/orly.xcuserdatad/xcschemes/max-external.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/cr.robotin/cr.robotin.xcodeproj/xcuserdata/orly.xcuserdatad/xcschemes/xcschememanagement.plist b/source/cr.robotin/cr.robotin.xcodeproj/xcuserdata/orly.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000000000000000000000000000000000000..858be9e656792446b7768c572d07b59603ac475c --- /dev/null +++ b/source/cr.robotin/cr.robotin.xcodeproj/xcuserdata/orly.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + max-external.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 2FBBEAD608F335360078DB84 + + primary + + + + + diff --git a/source/cr.robotout/cr.robotout.c b/source/cr.robotout/cr.robotout.c new file mode 100755 index 0000000000000000000000000000000000000000..045652bc77fe721884ecdb54e51cd2b04325c750 --- /dev/null +++ b/source/cr.robotout/cr.robotout.c @@ -0,0 +1,205 @@ +// +// @file +// robotout - a max object (Arduino UNO board writer) +// +// written by Orly Natan, Creative Robotics Lab +// University Of New South Wales (UNSW). */ + + +// required Max core headers +#include "ext.h" // standard Max include, always required +#include "ext_obex.h" // required for new style Max object + +#include "wrapper.h" + +////////////////////////// object struct +typedef struct robotout +{ + // the Max object itself (must be first) + t_object ob; + + // robotout attributes: + t_symbol *ip_addr; + Float64 inlets[6]; + + // robotout state + bool is_ready; + +} t_robotout; + +///////////////////////// function prototypes +//// standard set +void *robotout_new(t_symbol *s, long argc, t_atom *argv); +void robotout_free(t_robotout *x); +void robotout_assist(t_robotout *x, void *b, long m, long a, char *s); +void robotout_bang(t_robotout *x); +int robotout_open(t_robotout *x); +int robotout_close(t_robotout *x); +void robotout_break(t_robotout *x); +void robotout_ft1(t_robotout *x, Float64 f); +void robotout_ft2(t_robotout *x, Float64 f); +void robotout_ft3(t_robotout *x, Float64 f); +void robotout_ft4(t_robotout *x, Float64 f); +void robotout_ft5(t_robotout *x, Float64 f); +void robotout_ft6(t_robotout *x, Float64 f); + +int robotout_parseArgs(t_robotout *x, long argc, t_atom *argv); + +//////////////////////// global class pointer variable +void *robotout_class; + + +void ext_main(void *r) +{ + t_class *c; + + c = class_new("cr.robotout", (method)robotout_new, (method)robotout_free, + (long)sizeof(t_robotout), + 0L /* leave NULL!! */, A_GIMME, 0); + + class_addmethod(c, (method)robotout_assist, "assist", A_CANT, 0); + class_addmethod(c, (method)robotout_open, "open", 0); + class_addmethod(c, (method)robotout_close, "close", 0); + class_addmethod(c, (method)robotout_bang, "bang", 0); + class_addmethod(c, (method)robotout_break, "break", 0); + class_addmethod(c, (method)robotout_ft1, "ft1", A_FLOAT, 0); + class_addmethod(c, (method)robotout_ft2, "ft2", A_FLOAT, 0); + class_addmethod(c, (method)robotout_ft3, "ft3", A_FLOAT, 0); + class_addmethod(c, (method)robotout_ft4, "ft4", A_FLOAT, 0); + class_addmethod(c, (method)robotout_ft5, "ft5", A_FLOAT, 0); + class_addmethod(c, (method)robotout_ft6, "ft6", A_FLOAT, 0); + + + /* you CAN'T call this from the patcher */ + class_register(CLASS_BOX, c); /* CLASS_NOBOX */ + robotout_class = c; + + post("Robotout object created (Writer)."); +} + +void robotout_assist(t_robotout *x, void *b, long m, long a, char *s) +{ + if (m == ASSIST_INLET) { // inlet + + switch(a) { + case 0: sprintf(s, "Messages"); break; + case 1: sprintf(s, "Linear X"); break; + case 2: sprintf(s, "Linear Y"); break; + case 3: sprintf(s, "Linear Z"); break; + case 4: sprintf(s, "Angular X"); break; + case 5: sprintf(s, "Angular Y"); break; + case 6: sprintf(s, "Angular Z"); break; + } + } +} + +void robotout_free(t_robotout *x) +{ +} + +void *robotout_new(t_symbol *s, long argc, t_atom *argv) +{ + t_robotout *x = (t_robotout *)object_alloc(robotout_class); + // verify memory allocated successfully + if (x == NULL ) { + post( "Max is out of memory, could not create new robotout object."); + return NULL; + } + + // ip address attribute + if(argv->a_type == A_SYM) { + x->ip_addr = atom_getsym(argv); + } + + else + x->ip_addr = NULL; + + x->is_ready = false; + + // create pin integer inlets + for (int i = 6; i > 0; --i) { + // create float inlets from right to left (highest-right to 1-left): + floatin(x, i); + x->inlets[i-1] = 0; + } + + return (x); +} + +void robotout_bang(t_robotout *x) { + + // if connection to robot not established + // (publisher did not advertise topic yet) + // then establish it now + if( x->is_ready == false) { + if (robotout_open(x) != 0) + return; + } + + // send (publish) the new values + ros_publish_twist(x->inlets); + + // object_post((t_object *)x, "published to robot %s the message: [%f, %f, %f],[%f, %f, %f]", x->ip_addr->s_name, x->inlets[0], x->inlets[1], x->inlets[2], x->inlets[3], x->inlets[4], x->inlets[5]); +} + +// Send break (all 0 velocities) to robot +void robotout_break(t_robotout *x) { + + // if connection to robot not established + // (publisher did not advertise topic yet) + // then return + if( x->is_ready == false) + return; + + for(int i=0; i<6; ++i) + x->inlets[i] = 0; + + // send (publish) the new values + ros_publish_twist(x->inlets); + + object_post((t_object *)x, "break"); +} + +int robotout_open(t_robotout *x) { + + if(x->ip_addr == NULL) { + object_error((t_object *)x, "Please enter the robot's IP address"); + return -1; + } + + if(x->is_ready) { + object_post((t_object *)x, "already openned a connection to robot %s", x->ip_addr->s_name); + return 0; + } + + if( ros_init(x->ip_addr->s_name) != 0) { + object_error((t_object *)x, "Error establishing a connection to the robot. Check your IP address."); + return -1; + } + + if( ros_advertise_twist() != 0) { + object_error((t_object *)x, "Error communicating with the robot."); + return -1; + } + + object_post((t_object *)x, "ready to publish to robot on %s", x->ip_addr->s_name); + post("Publishing to /cmd_vel"); + + x->is_ready = true; + return 0; + +} + +int robotout_close(t_robotout *x) { + x->is_ready = false; + return 0; +} + +void robotout_ft1(t_robotout *x, Float64 f) { x->inlets[0] = f; } +void robotout_ft2(t_robotout *x, Float64 f) { x->inlets[1] = f; } +void robotout_ft3(t_robotout *x, Float64 f) { x->inlets[2] = f; } +void robotout_ft4(t_robotout *x, Float64 f) { x->inlets[3] = f; } +void robotout_ft5(t_robotout *x, Float64 f) { x->inlets[4] = f; } +void robotout_ft6(t_robotout *x, Float64 f) { x->inlets[5] = f; } + + diff --git a/source/cr.robotout/cr.robotout.xcodeproj/project.pbxproj b/source/cr.robotout/cr.robotout.xcodeproj/project.pbxproj new file mode 100755 index 0000000000000000000000000000000000000000..6a84ad7f85f6a3b170dcb4c5c0d13b1248fbe63c --- /dev/null +++ b/source/cr.robotout/cr.robotout.xcodeproj/project.pbxproj @@ -0,0 +1,216 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 0C4FCBAD20A5831E002126CE /* wrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0C4FCBA820A5831E002126CE /* wrapper.cpp */; }; + 0C4FCBAE20A5831E002126CE /* ros_lib in Resources */ = {isa = PBXBuildFile; fileRef = 0C4FCBA920A5831E002126CE /* ros_lib */; }; + 0C4FCBB020A5831E002126CE /* wrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C4FCBAB20A5831E002126CE /* wrapper.h */; }; + 22CF11AE0EE9A8840054F513 /* cr.robotout.c in Sources */ = {isa = PBXBuildFile; fileRef = 22CF11AD0EE9A8840054F513 /* cr.robotout.c */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 0C4FCBA820A5831E002126CE /* wrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = wrapper.cpp; path = "../ros-max-lib/wrapper.cpp"; sourceTree = ""; }; + 0C4FCBA920A5831E002126CE /* ros_lib */ = {isa = PBXFileReference; lastKnownFileType = folder; name = ros_lib; path = "../ros-max-lib/ros_lib"; sourceTree = ""; }; + 0C4FCBAB20A5831E002126CE /* wrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wrapper.h; path = "../ros-max-lib/wrapper.h"; sourceTree = ""; }; + 22CF10220EE984600054F513 /* maxmspsdk.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = maxmspsdk.xcconfig; path = ../maxmspsdk.xcconfig; sourceTree = SOURCE_ROOT; }; + 22CF11AD0EE9A8840054F513 /* cr.robotout.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cr.robotout.c; sourceTree = ""; }; + 2FBBEAE508F335360078DB84 /* cr.robotout.mxo */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = cr.robotout.mxo; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2FBBEADC08F335360078DB84 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* iterator */ = { + isa = PBXGroup; + children = ( + 0C4FCBA920A5831E002126CE /* ros_lib */, + 0C4FCBAB20A5831E002126CE /* wrapper.h */, + 0C4FCBA820A5831E002126CE /* wrapper.cpp */, + 22CF11AD0EE9A8840054F513 /* cr.robotout.c */, + 22CF10220EE984600054F513 /* maxmspsdk.xcconfig */, + 19C28FB4FE9D528D11CA2CBB /* Products */, + 0C91F5A71F73957200EF94C5 /* Frameworks */, + ); + name = iterator; + sourceTree = ""; + }; + 0C91F5A71F73957200EF94C5 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; + 19C28FB4FE9D528D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 2FBBEAE508F335360078DB84 /* cr.robotout.mxo */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 2FBBEAD708F335360078DB84 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C4FCBB020A5831E002126CE /* wrapper.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 2FBBEAD608F335360078DB84 /* max-external */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2FBBEAE008F335360078DB84 /* Build configuration list for PBXNativeTarget "max-external" */; + buildPhases = ( + 2FBBEAD708F335360078DB84 /* Headers */, + 2FBBEAD808F335360078DB84 /* Resources */, + 2FBBEADA08F335360078DB84 /* Sources */, + 2FBBEADC08F335360078DB84 /* Frameworks */, + 2FBBEADF08F335360078DB84 /* Rez */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "max-external"; + productName = iterator; + productReference = 2FBBEAE508F335360078DB84 /* cr.robotout.mxo */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0830; + }; + buildConfigurationList = 2FBBEACF08F335010078DB84 /* Build configuration list for PBXProject "cr.robotout" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + en, + ); + mainGroup = 089C166AFE841209C02AAC07 /* iterator */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2FBBEAD608F335360078DB84 /* max-external */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2FBBEAD808F335360078DB84 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C4FCBAE20A5831E002126CE /* ros_lib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXRezBuildPhase section */ + 2FBBEADF08F335360078DB84 /* Rez */ = { + isa = PBXRezBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXRezBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2FBBEADA08F335360078DB84 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 22CF11AE0EE9A8840054F513 /* cr.robotout.c in Sources */, + 0C4FCBAD20A5831E002126CE /* wrapper.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2FBBEAD008F335010078DB84 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Development; + }; + 2FBBEAD108F335010078DB84 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Deployment; + }; + 2FBBEAE108F335360078DB84 /* Development */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 22CF10220EE984600054F513 /* maxmspsdk.xcconfig */; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_OPTIMIZATION_LEVEL = 0; + OTHER_LDFLAGS = "$(C74_SYM_LINKER_FLAGS)"; + PRODUCT_BUNDLE_IDENTIFIER = boardout; + PRODUCT_NAME = cr.robotout; + }; + name = Development; + }; + 2FBBEAE208F335360078DB84 /* Deployment */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 22CF10220EE984600054F513 /* maxmspsdk.xcconfig */; + buildSettings = { + COPY_PHASE_STRIP = YES; + OTHER_LDFLAGS = "$(C74_SYM_LINKER_FLAGS)"; + "OTHER_LDFLAGS[arch=*]" = "$(C74_SYM_LINKER_FLAGS)"; + PRODUCT_BUNDLE_IDENTIFIER = boardout; + PRODUCT_NAME = cr.robotout; + }; + name = Deployment; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2FBBEACF08F335010078DB84 /* Build configuration list for PBXProject "cr.robotout" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2FBBEAD008F335010078DB84 /* Development */, + 2FBBEAD108F335010078DB84 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Development; + }; + 2FBBEAE008F335360078DB84 /* Build configuration list for PBXNativeTarget "max-external" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2FBBEAE108F335360078DB84 /* Development */, + 2FBBEAE208F335360078DB84 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Development; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/source/cr.robotout/cr.robotout.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/source/cr.robotout/cr.robotout.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000000000000000000000000000000000..4defe304537473a5bd07fdc9844079801034b8cf --- /dev/null +++ b/source/cr.robotout/cr.robotout.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/source/cr.robotout/cr.robotout.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/source/cr.robotout/cr.robotout.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000000000000000000000000000000000..54782e32fdc67a492a81269a1347cacb4a7f9f10 --- /dev/null +++ b/source/cr.robotout/cr.robotout.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded + + + diff --git a/source/cr.robotout/cr.robotout.xcodeproj/project.xcworkspace/xcuserdata/orly.xcuserdatad/UserInterfaceState.xcuserstate b/source/cr.robotout/cr.robotout.xcodeproj/project.xcworkspace/xcuserdata/orly.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..86fe78f9eb55dc929308294dd1b649e41839970a Binary files /dev/null and b/source/cr.robotout/cr.robotout.xcodeproj/project.xcworkspace/xcuserdata/orly.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/source/cr.robotout/cr.robotout.xcodeproj/project.xcworkspace/xcuserdata/orly.xcuserdatad/WorkspaceSettings.xcsettings b/source/cr.robotout/cr.robotout.xcodeproj/project.xcworkspace/xcuserdata/orly.xcuserdatad/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000000000000000000000000000000000..dd7403bf66e22a2b6c4af9325329f28060867051 --- /dev/null +++ b/source/cr.robotout/cr.robotout.xcodeproj/project.xcworkspace/xcuserdata/orly.xcuserdatad/WorkspaceSettings.xcsettings @@ -0,0 +1,16 @@ + + + + + BuildLocationStyle + UseAppPreferences + CustomBuildLocationType + RelativeToDerivedData + DerivedDataLocationStyle + Default + IssueFilterStyle + ShowActiveSchemeOnly + LiveSourceIssuesEnabled + + + diff --git a/source/cr.robotout/cr.robotout.xcodeproj/xcuserdata/orly.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/source/cr.robotout/cr.robotout.xcodeproj/xcuserdata/orly.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000000000000000000000000000000000000..fe2b45415124ec4c223006e19defd56850da95d9 --- /dev/null +++ b/source/cr.robotout/cr.robotout.xcodeproj/xcuserdata/orly.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,5 @@ + + + diff --git a/source/cr.robotout/cr.robotout.xcodeproj/xcuserdata/orly.xcuserdatad/xcschemes/max-external.xcscheme b/source/cr.robotout/cr.robotout.xcodeproj/xcuserdata/orly.xcuserdatad/xcschemes/max-external.xcscheme new file mode 100644 index 0000000000000000000000000000000000000000..0afb21e56675ae6b71ad9184f42b214dfee61e07 --- /dev/null +++ b/source/cr.robotout/cr.robotout.xcodeproj/xcuserdata/orly.xcuserdatad/xcschemes/max-external.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/cr.robotout/cr.robotout.xcodeproj/xcuserdata/orly.xcuserdatad/xcschemes/xcschememanagement.plist b/source/cr.robotout/cr.robotout.xcodeproj/xcuserdata/orly.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000000000000000000000000000000000000..d70c3e6609bb71e9ae46e8593636c0e5eb5b6bc2 --- /dev/null +++ b/source/cr.robotout/cr.robotout.xcodeproj/xcuserdata/orly.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,24 @@ + + + + + SchemeUserState + + max-external.xcscheme + + isShown + + orderHint + 0 + + + SuppressBuildableAutocreation + + 2FBBEAD608F335360078DB84 + + primary + + + + + diff --git a/source/ros-max-lib/max.c b/source/ros-max-lib/max.c new file mode 100644 index 0000000000000000000000000000000000000000..68a03ea3710d325a98e37896414caacfb9ec84f0 --- /dev/null +++ b/source/ros-max-lib/max.c @@ -0,0 +1,157 @@ +// © Copyright The University of New South Wales 2018 +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. + +#include "wrapper.h" +#include "max.h" + +#include + +// Internal functions: +//------------------------------------------------------------- +// Starts an infinite listening thread +// to recieve ROS messages. +int launchthread(pthread_t *posixThreadID, char *err_msg); +// Stops the listening thread +// (blocks until stopped) +int killthread(pthread_t *posixThreadID, char *err_msg); +//------------------------------------------------------------- + + +int robin_start_listening(t_listener *listener, char *err_msg) { + return launchthread(&(listener->posixThreadID), err_msg); +} + +int robin_stop_listening(t_listener *listener, char *err_msg) { + return killthread(&(listener->posixThreadID), err_msg); +} + +int rout_open_twist(char rosSrvrIp[], char err_msg[]) { + + if( ros_init(rosSrvrIp) != 0) { + sprintf(err_msg, "Error establishing a connection to the robot. Check your IP address."); + return -1; + } + + if( ros_advertise_twist() != 0) { + sprintf(err_msg, "Error communicating with the robot."); + return -1; + } + + return 0; +} + +int rout_open_chatter(char rosSrvrIp[], char err_msg[]) { + + ros_init(rosSrvrIp); + ros_advertise_chatter(); + + return 0; +} + +int rout_close() { + + return 0; +} + +int rout_set(char *key) { + ros_publish_chatter(key); + return 0; +} + +int rout_set_twist(double out_msg[6]) { + return ros_publish_twist(out_msg); +} + + +int isValidIpAddressCheck(char *ipAddress) { + return isValidIpAddress(ipAddress); +} + + +// Starts an infinite listening thread to recieve ROS messages. +int launchthread(pthread_t *posixThreadID, char err_msg[]) //void *thread_args) +{ + // Create the thread using POSIX routines. + pthread_attr_t attr; + int returnVal; + + /* + if(threadactive != 0) { + sprintf(err_msg, "err thread is already running"); + //printf("err thread is already running\n"); + return -1; + } + */ + returnVal = pthread_attr_init(&attr); + if(returnVal) { + sprintf(err_msg, "err in pthread_attr_init"); + //printf("err in pthread_attr_init\n"); + return returnVal; + } + returnVal = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); + if(returnVal) { + sprintf(err_msg, "err in pthread_attr_setdetachstate"); + //printf("err in pthread_attr_setdetachstate\n"); + return returnVal; + } + + int threadError = pthread_create(posixThreadID, &attr, &ros_listen, NULL); + if (threadError) + { + sprintf(err_msg, "err in pthread_create"); + //printf("err in pthread_create\n"); + return threadError; + } + + //threadactive = 1; + + // Destroy the thread attributes object, no longer needed + /* + returnVal = pthread_attr_destroy(&attr); + if (returnVal != 0) + { + sprintf(err_msg, "error in pthread_attr_destroy"); + //printf("error in pthread_attr_destroy\n"); + return -1; + }*/ + + return 0; + +} + +// Stops listening for incoming board messages (kill the listening thread). +int killthread(pthread_t *posixThreadID, char err_msg[]) +{ + /* + if(threadactive == 0) return 0; + + threadactive = 0; + */ + // stop the running thread + int returnVal = pthread_cancel(*posixThreadID); // kill the listening thread without waiting + //int returnVal = pthread_join(*posixThreadID, NULL); // BLOCK until thread finished + if (returnVal != 0) + { + sprintf(err_msg, "error in pthread_cancel: %d", returnVal); + //printf("error in killthread\n"); + return returnVal; + } + + //printf("listening thread stopped\n"); + + return 0; +} + + diff --git a/source/ros-max-lib/max.h b/source/ros-max-lib/max.h new file mode 100644 index 0000000000000000000000000000000000000000..ec54c239b9736e8344a84c9588b7e2ada603977b --- /dev/null +++ b/source/ros-max-lib/max.h @@ -0,0 +1,53 @@ +// © Copyright The University of New South Wales 2018 +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. + +#ifndef max_h +#define max_h + +#include + +typedef struct listener { + // POSIX thread - infinite listener + pthread_t posixThreadID; + int is_active;// = 0; // true if the thread is running +} t_listener; + +// robot_in (subscriber) +//int robin_close(char err_msg[]); + +//int rin_open_twist(char rosSrvrIp[], void *obj, void (*f)(void*, void**), char err[]); +//int rin_open_twist2(char rosSrvrIp[], char *msg_type, void *obj, void (*f)(void*, void**), char err[]); +//int rin_open_chatter(char rosSrvrIp[], void *obj, void (*f)(void*, void**), char err[]); + +//robot_out (publisher) +int rout_open_chatter(char rosSrvrIp[], char err_msg[]); +int rout_open_twist(char rosSrvrIp[], char err_msg[]); +int rout_close(); +int rout_set(); +int rout_set_twist(double out_msg[6]); + +// Starts an infinite listening thread to recieve ROS messages. +//int launchthread(char err_msg[]); +//int killthread(char err_msg[]); +int robin_stop_listening(t_listener *listener, char *err_msg); +int robin_start_listening(t_listener *listener, char *err_msg); + +int isValidIpAddressCheck(char *ipAddress); + + +//typedef struct geometry_msgs_Twist geometry_msgs_Twist; + + +#endif /* max_h */ diff --git a/source/ros-max-lib/ros-max-lib.xcodeproj/project.pbxproj b/source/ros-max-lib/ros-max-lib.xcodeproj/project.pbxproj new file mode 100644 index 0000000000000000000000000000000000000000..0f7f4de91c8dd5379aecd7477ffde6c244e7514b --- /dev/null +++ b/source/ros-max-lib/ros-max-lib.xcodeproj/project.pbxproj @@ -0,0 +1,263 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 0C4FCB8F20A57CC2002126CE /* test_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 0C4FCB8A20A57CC2002126CE /* test_main.c */; }; + 0C4FCB9020A57CC2002126CE /* wrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0C4FCB8B20A57CC2002126CE /* wrapper.cpp */; }; + 0C4FCB9120A57CC2002126CE /* max.c in Sources */ = {isa = PBXBuildFile; fileRef = 0C4FCB8C20A57CC2002126CE /* max.c */; }; + 0C4FCB9220A57CC2002126CE /* wrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C4FCB8D20A57CC2002126CE /* wrapper.h */; }; + 0C4FCB9320A57CC2002126CE /* max.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C4FCB8E20A57CC2002126CE /* max.h */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 0C4FCB8320A57B08002126CE /* libros-max-lib.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libros-max-lib.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 0C4FCB8A20A57CC2002126CE /* test_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test_main.c; sourceTree = ""; }; + 0C4FCB8B20A57CC2002126CE /* wrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrapper.cpp; sourceTree = ""; }; + 0C4FCB8C20A57CC2002126CE /* max.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = max.c; sourceTree = ""; }; + 0C4FCB8D20A57CC2002126CE /* wrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrapper.h; sourceTree = ""; }; + 0C4FCB8E20A57CC2002126CE /* max.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = max.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 0C4FCB8020A57B08002126CE /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0C4FCB7A20A57B08002126CE = { + isa = PBXGroup; + children = ( + 0C4FCB8A20A57CC2002126CE /* test_main.c */, + 0C4FCB8B20A57CC2002126CE /* wrapper.cpp */, + 0C4FCB8C20A57CC2002126CE /* max.c */, + 0C4FCB8D20A57CC2002126CE /* wrapper.h */, + 0C4FCB8E20A57CC2002126CE /* max.h */, + 0C4FCB8420A57B08002126CE /* Products */, + ); + sourceTree = ""; + }; + 0C4FCB8420A57B08002126CE /* Products */ = { + isa = PBXGroup; + children = ( + 0C4FCB8320A57B08002126CE /* libros-max-lib.a */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 0C4FCB8120A57B08002126CE /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C4FCB9220A57CC2002126CE /* wrapper.h in Headers */, + 0C4FCB9320A57CC2002126CE /* max.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 0C4FCB8220A57B08002126CE /* ros-max-lib */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0C4FCB8720A57B08002126CE /* Build configuration list for PBXNativeTarget "ros-max-lib" */; + buildPhases = ( + 0C4FCB7F20A57B08002126CE /* Sources */, + 0C4FCB8020A57B08002126CE /* Frameworks */, + 0C4FCB8120A57B08002126CE /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "ros-max-lib"; + productName = "ros-max-lib"; + productReference = 0C4FCB8320A57B08002126CE /* libros-max-lib.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0C4FCB7B20A57B08002126CE /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0830; + ORGANIZATIONNAME = "Orly Natan"; + TargetAttributes = { + 0C4FCB8220A57B08002126CE = { + CreatedOnToolsVersion = 8.3.3; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 0C4FCB7E20A57B08002126CE /* Build configuration list for PBXProject "ros-max-lib" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 0C4FCB7A20A57B08002126CE; + productRefGroup = 0C4FCB8420A57B08002126CE /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 0C4FCB8220A57B08002126CE /* ros-max-lib */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 0C4FCB7F20A57B08002126CE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C4FCB9120A57CC2002126CE /* max.c in Sources */, + 0C4FCB8F20A57CC2002126CE /* test_main.c in Sources */, + 0C4FCB9020A57CC2002126CE /* wrapper.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 0C4FCB8520A57B08002126CE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.12; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + 0C4FCB8620A57B08002126CE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.12; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + }; + name = Release; + }; + 0C4FCB8820A57B08002126CE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + EXECUTABLE_PREFIX = lib; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 0C4FCB8920A57B08002126CE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + EXECUTABLE_PREFIX = lib; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 0C4FCB7E20A57B08002126CE /* Build configuration list for PBXProject "ros-max-lib" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0C4FCB8520A57B08002126CE /* Debug */, + 0C4FCB8620A57B08002126CE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0C4FCB8720A57B08002126CE /* Build configuration list for PBXNativeTarget "ros-max-lib" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0C4FCB8820A57B08002126CE /* Debug */, + 0C4FCB8920A57B08002126CE /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 0C4FCB7B20A57B08002126CE /* Project object */; +} diff --git a/source/ros-max-lib/ros-max-lib.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/source/ros-max-lib/ros-max-lib.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000000000000000000000000000000000..4e08f6e7092d0d0ea05fc1e0c5402c699ef9476f --- /dev/null +++ b/source/ros-max-lib/ros-max-lib.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/source/ros-max-lib/ros-max-lib.xcodeproj/project.xcworkspace/xcuserdata/orly.xcuserdatad/UserInterfaceState.xcuserstate b/source/ros-max-lib/ros-max-lib.xcodeproj/project.xcworkspace/xcuserdata/orly.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..6f419085c2129ef04df3b30b21b91bd478387e5c Binary files /dev/null and b/source/ros-max-lib/ros-max-lib.xcodeproj/project.xcworkspace/xcuserdata/orly.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/source/ros-max-lib/ros-max-lib.xcodeproj/xcuserdata/orly.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/source/ros-max-lib/ros-max-lib.xcodeproj/xcuserdata/orly.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000000000000000000000000000000000000..fe2b45415124ec4c223006e19defd56850da95d9 --- /dev/null +++ b/source/ros-max-lib/ros-max-lib.xcodeproj/xcuserdata/orly.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,5 @@ + + + diff --git a/source/ros-max-lib/ros-max-lib.xcodeproj/xcuserdata/orly.xcuserdatad/xcschemes/ros-max-lib.xcscheme b/source/ros-max-lib/ros-max-lib.xcodeproj/xcuserdata/orly.xcuserdatad/xcschemes/ros-max-lib.xcscheme new file mode 100644 index 0000000000000000000000000000000000000000..31ed09ccdd714e7fdfe85d5eefbe450dba2111be --- /dev/null +++ b/source/ros-max-lib/ros-max-lib.xcodeproj/xcuserdata/orly.xcuserdatad/xcschemes/ros-max-lib.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/ros-max-lib/ros-max-lib.xcodeproj/xcuserdata/orly.xcuserdatad/xcschemes/xcschememanagement.plist b/source/ros-max-lib/ros-max-lib.xcodeproj/xcuserdata/orly.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000000000000000000000000000000000000..dc8ea93cd025099fa11cc35c74273cf028ccf750 --- /dev/null +++ b/source/ros-max-lib/ros-max-lib.xcodeproj/xcuserdata/orly.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + ros-max-lib.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 0C4FCB8220A57B08002126CE + + primary + + + + + diff --git a/source/ros-max-lib/ros_lib/actionlib/TestAction.h b/source/ros-max-lib/ros_lib/actionlib/TestAction.h new file mode 100644 index 0000000000000000000000000000000000000000..4a6042d1e2e4b8b518e721535c64b629753a2c2f --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib/TestAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestAction_h +#define _ROS_actionlib_TestAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "actionlib/TestActionGoal.h" +#include "actionlib/TestActionResult.h" +#include "actionlib/TestActionFeedback.h" + +namespace actionlib +{ + + class TestAction : public ros::Msg + { + public: + typedef actionlib::TestActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef actionlib::TestActionResult _action_result_type; + _action_result_type action_result; + typedef actionlib::TestActionFeedback _action_feedback_type; + _action_feedback_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib/TestActionFeedback.h b/source/ros-max-lib/ros_lib/actionlib/TestActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..aab52afa6b766d5a1914bb0b809cb19c9407c886 --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib/TestActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestActionFeedback_h +#define _ROS_actionlib_TestActionFeedback_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib::TestFeedback _feedback_type; + _feedback_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib/TestActionGoal.h b/source/ros-max-lib/ros_lib/actionlib/TestActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..6cb740255cd2206e07a30b30ddee71bfbf944194 --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib/TestActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestActionGoal_h +#define _ROS_actionlib_TestActionGoal_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef actionlib::TestGoal _goal_type; + _goal_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib/TestActionResult.h b/source/ros-max-lib/ros_lib/actionlib/TestActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..d534d0ac6bb7be28dee15ece12e847a9a893f927 --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib/TestActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestActionResult_h +#define _ROS_actionlib_TestActionResult_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib::TestResult _result_type; + _result_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib/TestFeedback.h b/source/ros-max-lib/ros_lib/actionlib/TestFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..83798cfd667f0d183001a120b00901b3996a65ea --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib/TestFeedback.h @@ -0,0 +1,62 @@ +#ifndef _ROS_actionlib_TestFeedback_h +#define _ROS_actionlib_TestFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib +{ + + class TestFeedback : public ros::Msg + { + public: + typedef int32_t _feedback_type; + _feedback_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib/TestGoal.h b/source/ros-max-lib/ros_lib/actionlib/TestGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..40d3a99bf09012210685fe356ec31479881aa6ff --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib/TestGoal.h @@ -0,0 +1,62 @@ +#ifndef _ROS_actionlib_TestGoal_h +#define _ROS_actionlib_TestGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib +{ + + class TestGoal : public ros::Msg + { + public: + typedef int32_t _goal_type; + _goal_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib/TestRequestAction.h b/source/ros-max-lib/ros_lib/actionlib/TestRequestAction.h new file mode 100644 index 0000000000000000000000000000000000000000..52a2fe9c76042a9a7b95466c4460e64497ecc5f8 --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib/TestRequestAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestRequestAction_h +#define _ROS_actionlib_TestRequestAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "actionlib/TestRequestActionGoal.h" +#include "actionlib/TestRequestActionResult.h" +#include "actionlib/TestRequestActionFeedback.h" + +namespace actionlib +{ + + class TestRequestAction : public ros::Msg + { + public: + typedef actionlib::TestRequestActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef actionlib::TestRequestActionResult _action_result_type; + _action_result_type action_result; + typedef actionlib::TestRequestActionFeedback _action_feedback_type; + _action_feedback_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib/TestRequestActionFeedback.h b/source/ros-max-lib/ros_lib/actionlib/TestRequestActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..0d585c0c2eb66a90ad6554e48a0c1fb0e9f2b2da --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib/TestRequestActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestRequestActionFeedback_h +#define _ROS_actionlib_TestRequestActionFeedback_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib::TestRequestFeedback _feedback_type; + _feedback_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib/TestRequestActionGoal.h b/source/ros-max-lib/ros_lib/actionlib/TestRequestActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..24c6c4873c56feaf9f12641443e95dd557416e3a --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib/TestRequestActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestRequestActionGoal_h +#define _ROS_actionlib_TestRequestActionGoal_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef actionlib::TestRequestGoal _goal_type; + _goal_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib/TestRequestActionResult.h b/source/ros-max-lib/ros_lib/actionlib/TestRequestActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..a71e715af33a32f9f133d83aed12f3a8c079cbaf --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib/TestRequestActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TestRequestActionResult_h +#define _ROS_actionlib_TestRequestActionResult_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib::TestRequestResult _result_type; + _result_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib/TestRequestFeedback.h b/source/ros-max-lib/ros_lib/actionlib/TestRequestFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..f1fc24796db62f1505a4b34ad733ce8530261ae1 --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib/TestRequestFeedback.h @@ -0,0 +1,38 @@ +#ifndef _ROS_actionlib_TestRequestFeedback_h +#define _ROS_actionlib_TestRequestFeedback_h + +#include +#include +#include +#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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib/TestRequestGoal.h b/source/ros-max-lib/ros_lib/actionlib/TestRequestGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..321ebd31dd50a51d5535d4768d089fd2b9cdf85a --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib/TestRequestGoal.h @@ -0,0 +1,215 @@ +#ifndef _ROS_actionlib_TestRequestGoal_h +#define _ROS_actionlib_TestRequestGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/duration.h" + +namespace actionlib +{ + + class TestRequestGoal : public ros::Msg + { + public: + typedef int32_t _terminate_status_type; + _terminate_status_type terminate_status; + typedef bool _ignore_cancel_type; + _ignore_cancel_type ignore_cancel; + typedef const char* _result_text_type; + _result_text_type result_text; + typedef int32_t _the_result_type; + _the_result_type the_result; + typedef bool _is_simple_client_type; + _is_simple_client_type is_simple_client; + typedef ros::Duration _delay_accept_type; + _delay_accept_type delay_accept; + typedef ros::Duration _delay_terminate_type; + _delay_terminate_type delay_terminate; + typedef ros::Duration _pause_status_type; + _pause_status_type 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); + varToArr(outbuffer + offset, length_result_text); + 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; + arrToVar(length_result_text, (inbuffer + offset)); + 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib/TestRequestResult.h b/source/ros-max-lib/ros_lib/actionlib/TestRequestResult.h new file mode 100644 index 0000000000000000000000000000000000000000..97887253a38fb9a4fd34781b69ec9d86371ccd4e --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib/TestRequestResult.h @@ -0,0 +1,80 @@ +#ifndef _ROS_actionlib_TestRequestResult_h +#define _ROS_actionlib_TestRequestResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib +{ + + class TestRequestResult : public ros::Msg + { + public: + typedef int32_t _the_result_type; + _the_result_type the_result; + typedef bool _is_simple_server_type; + _is_simple_server_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib/TestResult.h b/source/ros-max-lib/ros_lib/actionlib/TestResult.h new file mode 100644 index 0000000000000000000000000000000000000000..5c9718c93420a89c67c4593345a4b42a3092fb4e --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib/TestResult.h @@ -0,0 +1,62 @@ +#ifndef _ROS_actionlib_TestResult_h +#define _ROS_actionlib_TestResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib +{ + + class TestResult : public ros::Msg + { + public: + typedef int32_t _result_type; + _result_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib/TwoIntsAction.h b/source/ros-max-lib/ros_lib/actionlib/TwoIntsAction.h new file mode 100644 index 0000000000000000000000000000000000000000..30c73cc9e1baa5f049f2ddfed062d85b08b87199 --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib/TwoIntsAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TwoIntsAction_h +#define _ROS_actionlib_TwoIntsAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "actionlib/TwoIntsActionGoal.h" +#include "actionlib/TwoIntsActionResult.h" +#include "actionlib/TwoIntsActionFeedback.h" + +namespace actionlib +{ + + class TwoIntsAction : public ros::Msg + { + public: + typedef actionlib::TwoIntsActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef actionlib::TwoIntsActionResult _action_result_type; + _action_result_type action_result; + typedef actionlib::TwoIntsActionFeedback _action_feedback_type; + _action_feedback_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib/TwoIntsActionFeedback.h b/source/ros-max-lib/ros_lib/actionlib/TwoIntsActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..8cd4862fa04dc2fc63c5de31f90f8d2bb315f3bf --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib/TwoIntsActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TwoIntsActionFeedback_h +#define _ROS_actionlib_TwoIntsActionFeedback_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib::TwoIntsFeedback _feedback_type; + _feedback_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib/TwoIntsActionGoal.h b/source/ros-max-lib/ros_lib/actionlib/TwoIntsActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..7d33c178e992bd70886c1c55113a98a3c7c9fe36 --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib/TwoIntsActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TwoIntsActionGoal_h +#define _ROS_actionlib_TwoIntsActionGoal_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef actionlib::TwoIntsGoal _goal_type; + _goal_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib/TwoIntsActionResult.h b/source/ros-max-lib/ros_lib/actionlib/TwoIntsActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..e36c808fe5c1825e51eddc0e1eb51f4b6bce6e21 --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib/TwoIntsActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_TwoIntsActionResult_h +#define _ROS_actionlib_TwoIntsActionResult_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib::TwoIntsResult _result_type; + _result_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib/TwoIntsFeedback.h b/source/ros-max-lib/ros_lib/actionlib/TwoIntsFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..3789c4dcd8515d892575dfd08c4a1775a3f0a8de --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib/TwoIntsFeedback.h @@ -0,0 +1,38 @@ +#ifndef _ROS_actionlib_TwoIntsFeedback_h +#define _ROS_actionlib_TwoIntsFeedback_h + +#include +#include +#include +#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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib/TwoIntsGoal.h b/source/ros-max-lib/ros_lib/actionlib/TwoIntsGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..088c6ec3e44b437a116275e0ab4f83b0bef06c07 --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib/TwoIntsGoal.h @@ -0,0 +1,102 @@ +#ifndef _ROS_actionlib_TwoIntsGoal_h +#define _ROS_actionlib_TwoIntsGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib +{ + + class TwoIntsGoal : public ros::Msg + { + public: + typedef int64_t _a_type; + _a_type a; + typedef int64_t _b_type; + _b_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib/TwoIntsResult.h b/source/ros-max-lib/ros_lib/actionlib/TwoIntsResult.h new file mode 100644 index 0000000000000000000000000000000000000000..51d3cce117fbfdda46ca849c54c076f2c1ccd9ba --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib/TwoIntsResult.h @@ -0,0 +1,70 @@ +#ifndef _ROS_actionlib_TwoIntsResult_h +#define _ROS_actionlib_TwoIntsResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib +{ + + class TwoIntsResult : public ros::Msg + { + public: + typedef int64_t _sum_type; + _sum_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib_msgs/GoalID.h b/source/ros-max-lib/ros_lib/actionlib_msgs/GoalID.h new file mode 100644 index 0000000000000000000000000000000000000000..24391a3e87bff4310514346601667becd9c0000e --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib_msgs/GoalID.h @@ -0,0 +1,79 @@ +#ifndef _ROS_actionlib_msgs_GoalID_h +#define _ROS_actionlib_msgs_GoalID_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" + +namespace actionlib_msgs +{ + + class GoalID : public ros::Msg + { + public: + typedef ros::Time _stamp_type; + _stamp_type stamp; + typedef const char* _id_type; + _id_type id; + + GoalID(): + stamp(), + id("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->stamp.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp.sec); + *(outbuffer + offset + 0) = (this->stamp.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp.nsec); + uint32_t length_id = strlen(this->id); + varToArr(outbuffer + offset, length_id); + offset += 4; + memcpy(outbuffer + offset, this->id, length_id); + offset += length_id; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->stamp.sec = ((uint32_t) (*(inbuffer + offset))); + this->stamp.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp.sec); + this->stamp.nsec = ((uint32_t) (*(inbuffer + offset))); + this->stamp.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp.nsec); + uint32_t length_id; + arrToVar(length_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_id-1]=0; + this->id = (char *)(inbuffer + offset-1); + offset += length_id; + return offset; + } + + const char * getType(){ return "actionlib_msgs/GoalID"; }; + const char * getMD5(){ return "302881f31927c1df708a2dbab0e80ee8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib_msgs/GoalStatus.h b/source/ros-max-lib/ros_lib/actionlib_msgs/GoalStatus.h new file mode 100644 index 0000000000000000000000000000000000000000..349524c3a935d8ff0570d407373c3e7ccca353d7 --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib_msgs/GoalStatus.h @@ -0,0 +1,78 @@ +#ifndef _ROS_actionlib_msgs_GoalStatus_h +#define _ROS_actionlib_msgs_GoalStatus_h + +#include +#include +#include +#include "ros/msg.h" +#include "actionlib_msgs/GoalID.h" + +namespace actionlib_msgs +{ + + class GoalStatus : public ros::Msg + { + public: + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef uint8_t _status_type; + _status_type status; + typedef const char* _text_type; + _text_type text; + enum { PENDING = 0 }; + enum { ACTIVE = 1 }; + enum { PREEMPTED = 2 }; + enum { SUCCEEDED = 3 }; + enum { ABORTED = 4 }; + enum { REJECTED = 5 }; + enum { PREEMPTING = 6 }; + enum { RECALLING = 7 }; + enum { RECALLED = 8 }; + enum { LOST = 9 }; + + GoalStatus(): + goal_id(), + status(0), + text("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->goal_id.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->status >> (8 * 0)) & 0xFF; + offset += sizeof(this->status); + uint32_t length_text = strlen(this->text); + varToArr(outbuffer + offset, length_text); + offset += 4; + memcpy(outbuffer + offset, this->text, length_text); + offset += length_text; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->goal_id.deserialize(inbuffer + offset); + this->status = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->status); + uint32_t length_text; + arrToVar(length_text, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_text; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_text-1]=0; + this->text = (char *)(inbuffer + offset-1); + offset += length_text; + return offset; + } + + const char * getType(){ return "actionlib_msgs/GoalStatus"; }; + const char * getMD5(){ return "d388f9b87b3c471f784434d671988d4a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib_msgs/GoalStatusArray.h b/source/ros-max-lib/ros_lib/actionlib_msgs/GoalStatusArray.h new file mode 100644 index 0000000000000000000000000000000000000000..9e39b5f845a39019cd8fd58bf4ba49cd97a45854 --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib_msgs/GoalStatusArray.h @@ -0,0 +1,70 @@ +#ifndef _ROS_actionlib_msgs_GoalStatusArray_h +#define _ROS_actionlib_msgs_GoalStatusArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" + +namespace actionlib_msgs +{ + + class GoalStatusArray : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t status_list_length; + typedef actionlib_msgs::GoalStatus _status_list_type; + _status_list_type st_status_list; + _status_list_type * status_list; + + GoalStatusArray(): + header(), + status_list_length(0), status_list(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->status_list_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->status_list_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->status_list_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->status_list_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->status_list_length); + for( uint32_t i = 0; i < status_list_length; i++){ + offset += this->status_list[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t status_list_lengthT = ((uint32_t) (*(inbuffer + offset))); + status_list_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + status_list_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + status_list_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->status_list_length); + if(status_list_lengthT > status_list_length) + this->status_list = (actionlib_msgs::GoalStatus*)realloc(this->status_list, status_list_lengthT * sizeof(actionlib_msgs::GoalStatus)); + status_list_length = status_list_lengthT; + for( uint32_t i = 0; i < status_list_length; i++){ + offset += this->st_status_list.deserialize(inbuffer + offset); + memcpy( &(this->status_list[i]), &(this->st_status_list), sizeof(actionlib_msgs::GoalStatus)); + } + return offset; + } + + const char * getType(){ return "actionlib_msgs/GoalStatusArray"; }; + const char * getMD5(){ return "8b2b82f13216d0a8ea88bd3af735e619"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib_tutorials/AveragingAction.h b/source/ros-max-lib/ros_lib/actionlib_tutorials/AveragingAction.h new file mode 100644 index 0000000000000000000000000000000000000000..16eef59a9284fadd87a7b404b93b4a3e7e0fca40 --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib_tutorials/AveragingAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_AveragingAction_h +#define _ROS_actionlib_tutorials_AveragingAction_h + +#include +#include +#include +#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: + typedef actionlib_tutorials::AveragingActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef actionlib_tutorials::AveragingActionResult _action_result_type; + _action_result_type action_result; + typedef actionlib_tutorials::AveragingActionFeedback _action_feedback_type; + _action_feedback_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib_tutorials/AveragingActionFeedback.h b/source/ros-max-lib/ros_lib/actionlib_tutorials/AveragingActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..e269f39d2baac0f75e40a45550f8859e219cdc87 --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib_tutorials/AveragingActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_AveragingActionFeedback_h +#define _ROS_actionlib_tutorials_AveragingActionFeedback_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib_tutorials::AveragingFeedback _feedback_type; + _feedback_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib_tutorials/AveragingActionGoal.h b/source/ros-max-lib/ros_lib/actionlib_tutorials/AveragingActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..e9f718ff814ab411a806e8e599be705f838d350d --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib_tutorials/AveragingActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_AveragingActionGoal_h +#define _ROS_actionlib_tutorials_AveragingActionGoal_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef actionlib_tutorials::AveragingGoal _goal_type; + _goal_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib_tutorials/AveragingActionResult.h b/source/ros-max-lib/ros_lib/actionlib_tutorials/AveragingActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..db99e51744122f79d4fcff69945c38235e51343c --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib_tutorials/AveragingActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_AveragingActionResult_h +#define _ROS_actionlib_tutorials_AveragingActionResult_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib_tutorials::AveragingResult _result_type; + _result_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib_tutorials/AveragingFeedback.h b/source/ros-max-lib/ros_lib/actionlib_tutorials/AveragingFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..e71ad1f0682e9e8f92c1beed7203fba59d0a2181 --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib_tutorials/AveragingFeedback.h @@ -0,0 +1,134 @@ +#ifndef _ROS_actionlib_tutorials_AveragingFeedback_h +#define _ROS_actionlib_tutorials_AveragingFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib_tutorials +{ + + class AveragingFeedback : public ros::Msg + { + public: + typedef int32_t _sample_type; + _sample_type sample; + typedef float _data_type; + _data_type data; + typedef float _mean_type; + _mean_type mean; + typedef float _std_dev_type; + _std_dev_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib_tutorials/AveragingGoal.h b/source/ros-max-lib/ros_lib/actionlib_tutorials/AveragingGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..e1cc2ad30300c9c3ef71097facf35a02b4db9a4d --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib_tutorials/AveragingGoal.h @@ -0,0 +1,62 @@ +#ifndef _ROS_actionlib_tutorials_AveragingGoal_h +#define _ROS_actionlib_tutorials_AveragingGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib_tutorials +{ + + class AveragingGoal : public ros::Msg + { + public: + typedef int32_t _samples_type; + _samples_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib_tutorials/AveragingResult.h b/source/ros-max-lib/ros_lib/actionlib_tutorials/AveragingResult.h new file mode 100644 index 0000000000000000000000000000000000000000..e476e594205cedf0daecf247281b218ffb11c648 --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib_tutorials/AveragingResult.h @@ -0,0 +1,86 @@ +#ifndef _ROS_actionlib_tutorials_AveragingResult_h +#define _ROS_actionlib_tutorials_AveragingResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib_tutorials +{ + + class AveragingResult : public ros::Msg + { + public: + typedef float _mean_type; + _mean_type mean; + typedef float _std_dev_type; + _std_dev_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib_tutorials/FibonacciAction.h b/source/ros-max-lib/ros_lib/actionlib_tutorials/FibonacciAction.h new file mode 100644 index 0000000000000000000000000000000000000000..2fd1c636d52a49896640f93f2b3c6afe25ec6244 --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib_tutorials/FibonacciAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_FibonacciAction_h +#define _ROS_actionlib_tutorials_FibonacciAction_h + +#include +#include +#include +#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: + typedef actionlib_tutorials::FibonacciActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef actionlib_tutorials::FibonacciActionResult _action_result_type; + _action_result_type action_result; + typedef actionlib_tutorials::FibonacciActionFeedback _action_feedback_type; + _action_feedback_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib_tutorials/FibonacciActionFeedback.h b/source/ros-max-lib/ros_lib/actionlib_tutorials/FibonacciActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..241ebad304c32ead12da8eab99cd600207ab58f9 --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib_tutorials/FibonacciActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_FibonacciActionFeedback_h +#define _ROS_actionlib_tutorials_FibonacciActionFeedback_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib_tutorials::FibonacciFeedback _feedback_type; + _feedback_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib_tutorials/FibonacciActionGoal.h b/source/ros-max-lib/ros_lib/actionlib_tutorials/FibonacciActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..dd1361794f2e177c698d7be1ee764aa2f2c5f4b9 --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib_tutorials/FibonacciActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_FibonacciActionGoal_h +#define _ROS_actionlib_tutorials_FibonacciActionGoal_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef actionlib_tutorials::FibonacciGoal _goal_type; + _goal_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib_tutorials/FibonacciActionResult.h b/source/ros-max-lib/ros_lib/actionlib_tutorials/FibonacciActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..35c9d48c53e61ab072dab9f9c3a453d4a2e73bdf --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib_tutorials/FibonacciActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_actionlib_tutorials_FibonacciActionResult_h +#define _ROS_actionlib_tutorials_FibonacciActionResult_h + +#include +#include +#include +#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: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef actionlib_tutorials::FibonacciResult _result_type; + _result_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib_tutorials/FibonacciFeedback.h b/source/ros-max-lib/ros_lib/actionlib_tutorials/FibonacciFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..87eaf8fa71158f56d1e0aef1fd2792033c708e85 --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib_tutorials/FibonacciFeedback.h @@ -0,0 +1,82 @@ +#ifndef _ROS_actionlib_tutorials_FibonacciFeedback_h +#define _ROS_actionlib_tutorials_FibonacciFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib_tutorials +{ + + class FibonacciFeedback : public ros::Msg + { + public: + uint32_t sequence_length; + typedef int32_t _sequence_type; + _sequence_type st_sequence; + _sequence_type * sequence; + + FibonacciFeedback(): + sequence_length(0), sequence(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->sequence_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->sequence_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->sequence_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->sequence_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->sequence_length); + for( uint32_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; + uint32_t sequence_lengthT = ((uint32_t) (*(inbuffer + offset))); + sequence_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + sequence_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + sequence_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->sequence_length); + if(sequence_lengthT > sequence_length) + this->sequence = (int32_t*)realloc(this->sequence, sequence_lengthT * sizeof(int32_t)); + sequence_length = sequence_lengthT; + for( uint32_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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib_tutorials/FibonacciGoal.h b/source/ros-max-lib/ros_lib/actionlib_tutorials/FibonacciGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..e711de10bf8b534544eecee3a0f1946b9d345a4c --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib_tutorials/FibonacciGoal.h @@ -0,0 +1,62 @@ +#ifndef _ROS_actionlib_tutorials_FibonacciGoal_h +#define _ROS_actionlib_tutorials_FibonacciGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib_tutorials +{ + + class FibonacciGoal : public ros::Msg + { + public: + typedef int32_t _order_type; + _order_type 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/actionlib_tutorials/FibonacciResult.h b/source/ros-max-lib/ros_lib/actionlib_tutorials/FibonacciResult.h new file mode 100644 index 0000000000000000000000000000000000000000..dc710239d0f034bf6af44caeae9a25d8d45eaaeb --- /dev/null +++ b/source/ros-max-lib/ros_lib/actionlib_tutorials/FibonacciResult.h @@ -0,0 +1,82 @@ +#ifndef _ROS_actionlib_tutorials_FibonacciResult_h +#define _ROS_actionlib_tutorials_FibonacciResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace actionlib_tutorials +{ + + class FibonacciResult : public ros::Msg + { + public: + uint32_t sequence_length; + typedef int32_t _sequence_type; + _sequence_type st_sequence; + _sequence_type * sequence; + + FibonacciResult(): + sequence_length(0), sequence(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->sequence_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->sequence_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->sequence_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->sequence_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->sequence_length); + for( uint32_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; + uint32_t sequence_lengthT = ((uint32_t) (*(inbuffer + offset))); + sequence_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + sequence_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + sequence_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->sequence_length); + if(sequence_lengthT > sequence_length) + this->sequence = (int32_t*)realloc(this->sequence, sequence_lengthT * sizeof(int32_t)); + sequence_length = sequence_lengthT; + for( uint32_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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/base_local_planner/Position2DInt.h b/source/ros-max-lib/ros_lib/base_local_planner/Position2DInt.h new file mode 100644 index 0000000000000000000000000000000000000000..79beed25ad6d3686cf7eed2d0455863d05f97b5a --- /dev/null +++ b/source/ros-max-lib/ros_lib/base_local_planner/Position2DInt.h @@ -0,0 +1,102 @@ +#ifndef _ROS_base_local_planner_Position2DInt_h +#define _ROS_base_local_planner_Position2DInt_h + +#include +#include +#include +#include "ros/msg.h" + +namespace base_local_planner +{ + + class Position2DInt : public ros::Msg + { + public: + typedef int64_t _x_type; + _x_type x; + typedef int64_t _y_type; + _y_type y; + + Position2DInt(): + x(0), + y(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int64_t real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + int64_t real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int64_t real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + int64_t real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + return offset; + } + + const char * getType(){ return "base_local_planner/Position2DInt"; }; + const char * getMD5(){ return "3b834ede922a0fff22c43585c533b49f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/bond/Constants.h b/source/ros-max-lib/ros_lib/bond/Constants.h new file mode 100644 index 0000000000000000000000000000000000000000..9594342f62f1b3cda9bc743bcdf04cb6c4a69217 --- /dev/null +++ b/source/ros-max-lib/ros_lib/bond/Constants.h @@ -0,0 +1,44 @@ +#ifndef _ROS_bond_Constants_h +#define _ROS_bond_Constants_h + +#include +#include +#include +#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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/bond/Status.h b/source/ros-max-lib/ros_lib/bond/Status.h new file mode 100644 index 0000000000000000000000000000000000000000..b9fa9a5484bb6dffb37e8252605f3c769186689f --- /dev/null +++ b/source/ros-max-lib/ros_lib/bond/Status.h @@ -0,0 +1,144 @@ +#ifndef _ROS_bond_Status_h +#define _ROS_bond_Status_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace bond +{ + + class Status : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _id_type; + _id_type id; + typedef const char* _instance_id_type; + _instance_id_type instance_id; + typedef bool _active_type; + _active_type active; + typedef float _heartbeat_timeout_type; + _heartbeat_timeout_type heartbeat_timeout; + typedef float _heartbeat_period_type; + _heartbeat_period_type 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); + varToArr(outbuffer + offset, length_id); + offset += 4; + memcpy(outbuffer + offset, this->id, length_id); + offset += length_id; + uint32_t length_instance_id = strlen(this->instance_id); + varToArr(outbuffer + offset, length_instance_id); + 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; + arrToVar(length_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_id-1]=0; + this->id = (char *)(inbuffer + offset-1); + offset += length_id; + uint32_t length_instance_id; + arrToVar(length_instance_id, (inbuffer + offset)); + 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 \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/FollowJointTrajectoryAction.h b/source/ros-max-lib/ros_lib/control_msgs/FollowJointTrajectoryAction.h new file mode 100644 index 0000000000000000000000000000000000000000..ec67771ad20f89dd11949574e0529a39e35de879 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/FollowJointTrajectoryAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_FollowJointTrajectoryAction_h +#define _ROS_control_msgs_FollowJointTrajectoryAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "control_msgs/FollowJointTrajectoryActionGoal.h" +#include "control_msgs/FollowJointTrajectoryActionResult.h" +#include "control_msgs/FollowJointTrajectoryActionFeedback.h" + +namespace control_msgs +{ + + class FollowJointTrajectoryAction : public ros::Msg + { + public: + typedef control_msgs::FollowJointTrajectoryActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef control_msgs::FollowJointTrajectoryActionResult _action_result_type; + _action_result_type action_result; + typedef control_msgs::FollowJointTrajectoryActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + FollowJointTrajectoryAction(): + action_goal(), + action_result(), + action_feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->action_goal.serialize(outbuffer + offset); + offset += this->action_result.serialize(outbuffer + offset); + offset += this->action_feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->action_goal.deserialize(inbuffer + offset); + offset += this->action_result.deserialize(inbuffer + offset); + offset += this->action_feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/FollowJointTrajectoryAction"; }; + const char * getMD5(){ return "bc4f9b743838566551c0390c65f1a248"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/FollowJointTrajectoryActionFeedback.h b/source/ros-max-lib/ros_lib/control_msgs/FollowJointTrajectoryActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..d5d037a75ff917a6c3ec027e1f1fee8e40174a8e --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/FollowJointTrajectoryActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_FollowJointTrajectoryActionFeedback_h +#define _ROS_control_msgs_FollowJointTrajectoryActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/FollowJointTrajectoryFeedback.h" + +namespace control_msgs +{ + + class FollowJointTrajectoryActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::FollowJointTrajectoryFeedback _feedback_type; + _feedback_type feedback; + + FollowJointTrajectoryActionFeedback(): + header(), + status(), + feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/FollowJointTrajectoryActionFeedback"; }; + const char * getMD5(){ return "d8920dc4eae9fc107e00999cce4be641"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/FollowJointTrajectoryActionGoal.h b/source/ros-max-lib/ros_lib/control_msgs/FollowJointTrajectoryActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..4aa00c6466386c37e775dd0231b6578def6f0a39 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/FollowJointTrajectoryActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_FollowJointTrajectoryActionGoal_h +#define _ROS_control_msgs_FollowJointTrajectoryActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "control_msgs/FollowJointTrajectoryGoal.h" + +namespace control_msgs +{ + + class FollowJointTrajectoryActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef control_msgs::FollowJointTrajectoryGoal _goal_type; + _goal_type goal; + + FollowJointTrajectoryActionGoal(): + header(), + goal_id(), + goal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->goal_id.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->goal_id.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/FollowJointTrajectoryActionGoal"; }; + const char * getMD5(){ return "cff5c1d533bf2f82dd0138d57f4304bb"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/FollowJointTrajectoryActionResult.h b/source/ros-max-lib/ros_lib/control_msgs/FollowJointTrajectoryActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..aa6b2b3f9126e21ecb097bc0f2b6381e13e367ac --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/FollowJointTrajectoryActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_FollowJointTrajectoryActionResult_h +#define _ROS_control_msgs_FollowJointTrajectoryActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/FollowJointTrajectoryResult.h" + +namespace control_msgs +{ + + class FollowJointTrajectoryActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::FollowJointTrajectoryResult _result_type; + _result_type result; + + FollowJointTrajectoryActionResult(): + header(), + status(), + result() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->result.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->result.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/FollowJointTrajectoryActionResult"; }; + const char * getMD5(){ return "c4fb3b000dc9da4fd99699380efcc5d9"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/FollowJointTrajectoryFeedback.h b/source/ros-max-lib/ros_lib/control_msgs/FollowJointTrajectoryFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..6f27eccc9615209bea284219616d9d044a3b2f35 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/FollowJointTrajectoryFeedback.h @@ -0,0 +1,97 @@ +#ifndef _ROS_control_msgs_FollowJointTrajectoryFeedback_h +#define _ROS_control_msgs_FollowJointTrajectoryFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "trajectory_msgs/JointTrajectoryPoint.h" + +namespace control_msgs +{ + + class FollowJointTrajectoryFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t joint_names_length; + typedef char* _joint_names_type; + _joint_names_type st_joint_names; + _joint_names_type * joint_names; + typedef trajectory_msgs::JointTrajectoryPoint _desired_type; + _desired_type desired; + typedef trajectory_msgs::JointTrajectoryPoint _actual_type; + _actual_type actual; + typedef trajectory_msgs::JointTrajectoryPoint _error_type; + _error_type error; + + FollowJointTrajectoryFeedback(): + header(), + joint_names_length(0), joint_names(NULL), + desired(), + actual(), + error() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_names_length); + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_joint_namesi = strlen(this->joint_names[i]); + varToArr(outbuffer + offset, length_joint_namesi); + offset += 4; + memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); + offset += length_joint_namesi; + } + offset += this->desired.serialize(outbuffer + offset); + offset += this->actual.serialize(outbuffer + offset); + offset += this->error.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_names_length); + if(joint_names_lengthT > joint_names_length) + this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); + joint_names_length = joint_names_lengthT; + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_st_joint_names; + arrToVar(length_st_joint_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_joint_names-1]=0; + this->st_joint_names = (char *)(inbuffer + offset-1); + offset += length_st_joint_names; + memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); + } + offset += this->desired.deserialize(inbuffer + offset); + offset += this->actual.deserialize(inbuffer + offset); + offset += this->error.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/FollowJointTrajectoryFeedback"; }; + const char * getMD5(){ return "10817c60c2486ef6b33e97dcd87f4474"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/FollowJointTrajectoryGoal.h b/source/ros-max-lib/ros_lib/control_msgs/FollowJointTrajectoryGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..1185615ab3e4e6aa493fb04046e4180047dad372 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/FollowJointTrajectoryGoal.h @@ -0,0 +1,119 @@ +#ifndef _ROS_control_msgs_FollowJointTrajectoryGoal_h +#define _ROS_control_msgs_FollowJointTrajectoryGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "trajectory_msgs/JointTrajectory.h" +#include "control_msgs/JointTolerance.h" +#include "ros/duration.h" + +namespace control_msgs +{ + + class FollowJointTrajectoryGoal : public ros::Msg + { + public: + typedef trajectory_msgs::JointTrajectory _trajectory_type; + _trajectory_type trajectory; + uint32_t path_tolerance_length; + typedef control_msgs::JointTolerance _path_tolerance_type; + _path_tolerance_type st_path_tolerance; + _path_tolerance_type * path_tolerance; + uint32_t goal_tolerance_length; + typedef control_msgs::JointTolerance _goal_tolerance_type; + _goal_tolerance_type st_goal_tolerance; + _goal_tolerance_type * goal_tolerance; + typedef ros::Duration _goal_time_tolerance_type; + _goal_time_tolerance_type goal_time_tolerance; + + FollowJointTrajectoryGoal(): + trajectory(), + path_tolerance_length(0), path_tolerance(NULL), + goal_tolerance_length(0), goal_tolerance(NULL), + goal_time_tolerance() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->trajectory.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->path_tolerance_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->path_tolerance_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->path_tolerance_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->path_tolerance_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->path_tolerance_length); + for( uint32_t i = 0; i < path_tolerance_length; i++){ + offset += this->path_tolerance[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->goal_tolerance_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->goal_tolerance_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->goal_tolerance_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->goal_tolerance_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->goal_tolerance_length); + for( uint32_t i = 0; i < goal_tolerance_length; i++){ + offset += this->goal_tolerance[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->goal_time_tolerance.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->goal_time_tolerance.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->goal_time_tolerance.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->goal_time_tolerance.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->goal_time_tolerance.sec); + *(outbuffer + offset + 0) = (this->goal_time_tolerance.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->goal_time_tolerance.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->goal_time_tolerance.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->goal_time_tolerance.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->goal_time_tolerance.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->trajectory.deserialize(inbuffer + offset); + uint32_t path_tolerance_lengthT = ((uint32_t) (*(inbuffer + offset))); + path_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + path_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + path_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->path_tolerance_length); + if(path_tolerance_lengthT > path_tolerance_length) + this->path_tolerance = (control_msgs::JointTolerance*)realloc(this->path_tolerance, path_tolerance_lengthT * sizeof(control_msgs::JointTolerance)); + path_tolerance_length = path_tolerance_lengthT; + for( uint32_t i = 0; i < path_tolerance_length; i++){ + offset += this->st_path_tolerance.deserialize(inbuffer + offset); + memcpy( &(this->path_tolerance[i]), &(this->st_path_tolerance), sizeof(control_msgs::JointTolerance)); + } + uint32_t goal_tolerance_lengthT = ((uint32_t) (*(inbuffer + offset))); + goal_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + goal_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + goal_tolerance_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->goal_tolerance_length); + if(goal_tolerance_lengthT > goal_tolerance_length) + this->goal_tolerance = (control_msgs::JointTolerance*)realloc(this->goal_tolerance, goal_tolerance_lengthT * sizeof(control_msgs::JointTolerance)); + goal_tolerance_length = goal_tolerance_lengthT; + for( uint32_t i = 0; i < goal_tolerance_length; i++){ + offset += this->st_goal_tolerance.deserialize(inbuffer + offset); + memcpy( &(this->goal_tolerance[i]), &(this->st_goal_tolerance), sizeof(control_msgs::JointTolerance)); + } + this->goal_time_tolerance.sec = ((uint32_t) (*(inbuffer + offset))); + this->goal_time_tolerance.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->goal_time_tolerance.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->goal_time_tolerance.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->goal_time_tolerance.sec); + this->goal_time_tolerance.nsec = ((uint32_t) (*(inbuffer + offset))); + this->goal_time_tolerance.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->goal_time_tolerance.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->goal_time_tolerance.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->goal_time_tolerance.nsec); + return offset; + } + + const char * getType(){ return "control_msgs/FollowJointTrajectoryGoal"; }; + const char * getMD5(){ return "69636787b6ecbde4d61d711979bc7ecb"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/FollowJointTrajectoryResult.h b/source/ros-max-lib/ros_lib/control_msgs/FollowJointTrajectoryResult.h new file mode 100644 index 0000000000000000000000000000000000000000..819f27265783893ac4844ee7bc36dbaaea7d3299 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/FollowJointTrajectoryResult.h @@ -0,0 +1,85 @@ +#ifndef _ROS_control_msgs_FollowJointTrajectoryResult_h +#define _ROS_control_msgs_FollowJointTrajectoryResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class FollowJointTrajectoryResult : public ros::Msg + { + public: + typedef int32_t _error_code_type; + _error_code_type error_code; + typedef const char* _error_string_type; + _error_string_type error_string; + enum { SUCCESSFUL = 0 }; + enum { INVALID_GOAL = -1 }; + enum { INVALID_JOINTS = -2 }; + enum { OLD_HEADER_TIMESTAMP = -3 }; + enum { PATH_TOLERANCE_VIOLATED = -4 }; + enum { GOAL_TOLERANCE_VIOLATED = -5 }; + + FollowJointTrajectoryResult(): + error_code(0), + error_string("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int32_t real; + uint32_t base; + } u_error_code; + u_error_code.real = this->error_code; + *(outbuffer + offset + 0) = (u_error_code.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_error_code.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_error_code.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_error_code.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->error_code); + uint32_t length_error_string = strlen(this->error_string); + varToArr(outbuffer + offset, length_error_string); + offset += 4; + memcpy(outbuffer + offset, this->error_string, length_error_string); + offset += length_error_string; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int32_t real; + uint32_t base; + } u_error_code; + u_error_code.base = 0; + u_error_code.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_error_code.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_error_code.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_error_code.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->error_code = u_error_code.real; + offset += sizeof(this->error_code); + uint32_t length_error_string; + arrToVar(length_error_string, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_error_string; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_error_string-1]=0; + this->error_string = (char *)(inbuffer + offset-1); + offset += length_error_string; + return offset; + } + + const char * getType(){ return "control_msgs/FollowJointTrajectoryResult"; }; + const char * getMD5(){ return "493383b18409bfb604b4e26c676401d2"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/GripperCommand.h b/source/ros-max-lib/ros_lib/control_msgs/GripperCommand.h new file mode 100644 index 0000000000000000000000000000000000000000..0b37e5c4f007962922ffff9cdc2c1fcad4c2d9ad --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/GripperCommand.h @@ -0,0 +1,102 @@ +#ifndef _ROS_control_msgs_GripperCommand_h +#define _ROS_control_msgs_GripperCommand_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class GripperCommand : public ros::Msg + { + public: + typedef double _position_type; + _position_type position; + typedef double _max_effort_type; + _max_effort_type max_effort; + + GripperCommand(): + position(0), + max_effort(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_position; + u_position.real = this->position; + *(outbuffer + offset + 0) = (u_position.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_position.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_position.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_position.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_position.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_position.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_position.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_position.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_max_effort; + u_max_effort.real = this->max_effort; + *(outbuffer + offset + 0) = (u_max_effort.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_effort.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_effort.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_effort.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max_effort.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max_effort.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max_effort.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max_effort.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max_effort); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_position; + u_position.base = 0; + u_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->position = u_position.real; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_max_effort; + u_max_effort.base = 0; + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max_effort.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max_effort = u_max_effort.real; + offset += sizeof(this->max_effort); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommand"; }; + const char * getMD5(){ return "680acaff79486f017132a7f198d40f08"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/GripperCommandAction.h b/source/ros-max-lib/ros_lib/control_msgs/GripperCommandAction.h new file mode 100644 index 0000000000000000000000000000000000000000..68d8356e00af1a7200f6bbbd101a6fdfd34ecf0d --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/GripperCommandAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_GripperCommandAction_h +#define _ROS_control_msgs_GripperCommandAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "control_msgs/GripperCommandActionGoal.h" +#include "control_msgs/GripperCommandActionResult.h" +#include "control_msgs/GripperCommandActionFeedback.h" + +namespace control_msgs +{ + + class GripperCommandAction : public ros::Msg + { + public: + typedef control_msgs::GripperCommandActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef control_msgs::GripperCommandActionResult _action_result_type; + _action_result_type action_result; + typedef control_msgs::GripperCommandActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + GripperCommandAction(): + action_goal(), + action_result(), + action_feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->action_goal.serialize(outbuffer + offset); + offset += this->action_result.serialize(outbuffer + offset); + offset += this->action_feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->action_goal.deserialize(inbuffer + offset); + offset += this->action_result.deserialize(inbuffer + offset); + offset += this->action_feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommandAction"; }; + const char * getMD5(){ return "950b2a6ebe831f5d4f4ceaba3d8be01e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/GripperCommandActionFeedback.h b/source/ros-max-lib/ros_lib/control_msgs/GripperCommandActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..67f99c9c1b0d3e4d62a7e0d069e85fb2d1191de4 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/GripperCommandActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_GripperCommandActionFeedback_h +#define _ROS_control_msgs_GripperCommandActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/GripperCommandFeedback.h" + +namespace control_msgs +{ + + class GripperCommandActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::GripperCommandFeedback _feedback_type; + _feedback_type feedback; + + GripperCommandActionFeedback(): + header(), + status(), + feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommandActionFeedback"; }; + const char * getMD5(){ return "653dff30c045f5e6ff3feb3409f4558d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/GripperCommandActionGoal.h b/source/ros-max-lib/ros_lib/control_msgs/GripperCommandActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..efb19d1d8e90ee1c35e1bf46cacad720cef176c0 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/GripperCommandActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_GripperCommandActionGoal_h +#define _ROS_control_msgs_GripperCommandActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "control_msgs/GripperCommandGoal.h" + +namespace control_msgs +{ + + class GripperCommandActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef control_msgs::GripperCommandGoal _goal_type; + _goal_type goal; + + GripperCommandActionGoal(): + header(), + goal_id(), + goal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->goal_id.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->goal_id.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommandActionGoal"; }; + const char * getMD5(){ return "aa581f648a35ed681db2ec0bf7a82bea"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/GripperCommandActionResult.h b/source/ros-max-lib/ros_lib/control_msgs/GripperCommandActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..704f18db86b87b781cb3042736f81c9b9fc9e424 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/GripperCommandActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_GripperCommandActionResult_h +#define _ROS_control_msgs_GripperCommandActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/GripperCommandResult.h" + +namespace control_msgs +{ + + class GripperCommandActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::GripperCommandResult _result_type; + _result_type result; + + GripperCommandActionResult(): + header(), + status(), + result() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->result.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->result.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommandActionResult"; }; + const char * getMD5(){ return "143702cb2df0f163c5283cedc5efc6b6"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/GripperCommandFeedback.h b/source/ros-max-lib/ros_lib/control_msgs/GripperCommandFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..15d0397b4f6a94a6b3b4b114f98faf6bcaccf700 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/GripperCommandFeedback.h @@ -0,0 +1,138 @@ +#ifndef _ROS_control_msgs_GripperCommandFeedback_h +#define _ROS_control_msgs_GripperCommandFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class GripperCommandFeedback : public ros::Msg + { + public: + typedef double _position_type; + _position_type position; + typedef double _effort_type; + _effort_type effort; + typedef bool _stalled_type; + _stalled_type stalled; + typedef bool _reached_goal_type; + _reached_goal_type reached_goal; + + GripperCommandFeedback(): + position(0), + effort(0), + stalled(0), + reached_goal(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_position; + u_position.real = this->position; + *(outbuffer + offset + 0) = (u_position.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_position.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_position.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_position.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_position.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_position.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_position.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_position.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_effort; + u_effort.real = this->effort; + *(outbuffer + offset + 0) = (u_effort.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_effort.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_effort.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_effort.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_effort.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_effort.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_effort.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_effort.base >> (8 * 7)) & 0xFF; + offset += sizeof(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; + union { + double real; + uint64_t base; + } u_position; + u_position.base = 0; + u_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->position = u_position.real; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_effort; + u_effort.base = 0; + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->effort = u_effort.real; + offset += sizeof(this->effort); + union { + bool real; + uint8_t base; + } u_stalled; + u_stalled.base = 0; + u_stalled.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->stalled = u_stalled.real; + offset += sizeof(this->stalled); + union { + bool real; + uint8_t base; + } u_reached_goal; + u_reached_goal.base = 0; + u_reached_goal.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->reached_goal = u_reached_goal.real; + offset += sizeof(this->reached_goal); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommandFeedback"; }; + const char * getMD5(){ return "e4cbff56d3562bcf113da5a5adeef91f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/GripperCommandGoal.h b/source/ros-max-lib/ros_lib/control_msgs/GripperCommandGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..544a864749da9aba26022127edc6a835f4866a34 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/GripperCommandGoal.h @@ -0,0 +1,44 @@ +#ifndef _ROS_control_msgs_GripperCommandGoal_h +#define _ROS_control_msgs_GripperCommandGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "control_msgs/GripperCommand.h" + +namespace control_msgs +{ + + class GripperCommandGoal : public ros::Msg + { + public: + typedef control_msgs::GripperCommand _command_type; + _command_type command; + + GripperCommandGoal(): + command() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->command.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->command.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommandGoal"; }; + const char * getMD5(){ return "86fd82f4ddc48a4cb6856cfa69217e43"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/GripperCommandResult.h b/source/ros-max-lib/ros_lib/control_msgs/GripperCommandResult.h new file mode 100644 index 0000000000000000000000000000000000000000..e28b26016feaf8649a9558ae6110e38e8f3dfaa0 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/GripperCommandResult.h @@ -0,0 +1,138 @@ +#ifndef _ROS_control_msgs_GripperCommandResult_h +#define _ROS_control_msgs_GripperCommandResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class GripperCommandResult : public ros::Msg + { + public: + typedef double _position_type; + _position_type position; + typedef double _effort_type; + _effort_type effort; + typedef bool _stalled_type; + _stalled_type stalled; + typedef bool _reached_goal_type; + _reached_goal_type reached_goal; + + GripperCommandResult(): + position(0), + effort(0), + stalled(0), + reached_goal(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_position; + u_position.real = this->position; + *(outbuffer + offset + 0) = (u_position.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_position.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_position.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_position.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_position.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_position.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_position.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_position.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_effort; + u_effort.real = this->effort; + *(outbuffer + offset + 0) = (u_effort.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_effort.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_effort.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_effort.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_effort.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_effort.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_effort.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_effort.base >> (8 * 7)) & 0xFF; + offset += sizeof(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; + union { + double real; + uint64_t base; + } u_position; + u_position.base = 0; + u_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->position = u_position.real; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_effort; + u_effort.base = 0; + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->effort = u_effort.real; + offset += sizeof(this->effort); + union { + bool real; + uint8_t base; + } u_stalled; + u_stalled.base = 0; + u_stalled.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->stalled = u_stalled.real; + offset += sizeof(this->stalled); + union { + bool real; + uint8_t base; + } u_reached_goal; + u_reached_goal.base = 0; + u_reached_goal.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->reached_goal = u_reached_goal.real; + offset += sizeof(this->reached_goal); + return offset; + } + + const char * getType(){ return "control_msgs/GripperCommandResult"; }; + const char * getMD5(){ return "e4cbff56d3562bcf113da5a5adeef91f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/JointControllerState.h b/source/ros-max-lib/ros_lib/control_msgs/JointControllerState.h new file mode 100644 index 0000000000000000000000000000000000000000..b70ef6d2fb228acdcc90c2ca713f7da0f085509d --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/JointControllerState.h @@ -0,0 +1,382 @@ +#ifndef _ROS_control_msgs_JointControllerState_h +#define _ROS_control_msgs_JointControllerState_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace control_msgs +{ + + class JointControllerState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef double _set_point_type; + _set_point_type set_point; + typedef double _process_value_type; + _process_value_type process_value; + typedef double _process_value_dot_type; + _process_value_dot_type process_value_dot; + typedef double _error_type; + _error_type error; + typedef double _time_step_type; + _time_step_type time_step; + typedef double _command_type; + _command_type command; + typedef double _p_type; + _p_type p; + typedef double _i_type; + _i_type i; + typedef double _d_type; + _d_type d; + typedef double _i_clamp_type; + _i_clamp_type i_clamp; + typedef bool _antiwindup_type; + _antiwindup_type antiwindup; + + JointControllerState(): + header(), + set_point(0), + process_value(0), + process_value_dot(0), + error(0), + time_step(0), + command(0), + p(0), + i(0), + d(0), + i_clamp(0), + antiwindup(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_set_point; + u_set_point.real = this->set_point; + *(outbuffer + offset + 0) = (u_set_point.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_set_point.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_set_point.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_set_point.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_set_point.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_set_point.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_set_point.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_set_point.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->set_point); + union { + double real; + uint64_t base; + } u_process_value; + u_process_value.real = this->process_value; + *(outbuffer + offset + 0) = (u_process_value.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_process_value.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_process_value.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_process_value.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_process_value.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_process_value.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_process_value.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_process_value.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->process_value); + union { + double real; + uint64_t base; + } u_process_value_dot; + u_process_value_dot.real = this->process_value_dot; + *(outbuffer + offset + 0) = (u_process_value_dot.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_process_value_dot.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_process_value_dot.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_process_value_dot.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_process_value_dot.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_process_value_dot.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_process_value_dot.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_process_value_dot.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->process_value_dot); + union { + double real; + uint64_t base; + } u_error; + u_error.real = this->error; + *(outbuffer + offset + 0) = (u_error.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_error.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_error.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_error.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_error.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_error.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_error.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_error.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->error); + union { + double real; + uint64_t base; + } u_time_step; + u_time_step.real = this->time_step; + *(outbuffer + offset + 0) = (u_time_step.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_time_step.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_time_step.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_time_step.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_time_step.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_time_step.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_time_step.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_time_step.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->time_step); + union { + double real; + uint64_t base; + } u_command; + u_command.real = this->command; + *(outbuffer + offset + 0) = (u_command.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_command.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_command.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_command.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_command.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_command.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_command.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_command.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->command); + union { + double real; + uint64_t base; + } u_p; + u_p.real = this->p; + *(outbuffer + offset + 0) = (u_p.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_p.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_p.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_p.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_p.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_p.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_p.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_p.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->p); + union { + double real; + uint64_t base; + } u_i; + u_i.real = this->i; + *(outbuffer + offset + 0) = (u_i.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i); + union { + double real; + uint64_t base; + } u_d; + u_d.real = this->d; + *(outbuffer + offset + 0) = (u_d.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_d.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_d.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_d.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_d.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_d.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_d.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_d.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->d); + union { + double real; + uint64_t base; + } u_i_clamp; + u_i_clamp.real = this->i_clamp; + *(outbuffer + offset + 0) = (u_i_clamp.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i_clamp.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i_clamp.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i_clamp.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i_clamp.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i_clamp.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i_clamp.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i_clamp.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i_clamp); + union { + bool real; + uint8_t base; + } u_antiwindup; + u_antiwindup.real = this->antiwindup; + *(outbuffer + offset + 0) = (u_antiwindup.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->antiwindup); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_set_point; + u_set_point.base = 0; + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_set_point.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->set_point = u_set_point.real; + offset += sizeof(this->set_point); + union { + double real; + uint64_t base; + } u_process_value; + u_process_value.base = 0; + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_process_value.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->process_value = u_process_value.real; + offset += sizeof(this->process_value); + union { + double real; + uint64_t base; + } u_process_value_dot; + u_process_value_dot.base = 0; + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_process_value_dot.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->process_value_dot = u_process_value_dot.real; + offset += sizeof(this->process_value_dot); + union { + double real; + uint64_t base; + } u_error; + u_error.base = 0; + u_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->error = u_error.real; + offset += sizeof(this->error); + union { + double real; + uint64_t base; + } u_time_step; + u_time_step.base = 0; + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->time_step = u_time_step.real; + offset += sizeof(this->time_step); + union { + double real; + uint64_t base; + } u_command; + u_command.base = 0; + u_command.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_command.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_command.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_command.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_command.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_command.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_command.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_command.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->command = u_command.real; + offset += sizeof(this->command); + union { + double real; + uint64_t base; + } u_p; + u_p.base = 0; + u_p.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->p = u_p.real; + offset += sizeof(this->p); + union { + double real; + uint64_t base; + } u_i; + u_i.base = 0; + u_i.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i = u_i.real; + offset += sizeof(this->i); + union { + double real; + uint64_t base; + } u_d; + u_d.base = 0; + u_d.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->d = u_d.real; + offset += sizeof(this->d); + union { + double real; + uint64_t base; + } u_i_clamp; + u_i_clamp.base = 0; + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i_clamp = u_i_clamp.real; + offset += sizeof(this->i_clamp); + union { + bool real; + uint8_t base; + } u_antiwindup; + u_antiwindup.base = 0; + u_antiwindup.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->antiwindup = u_antiwindup.real; + offset += sizeof(this->antiwindup); + return offset; + } + + const char * getType(){ return "control_msgs/JointControllerState"; }; + const char * getMD5(){ return "987ad85e4756f3aef7f1e5e7fe0595d1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/JointTolerance.h b/source/ros-max-lib/ros_lib/control_msgs/JointTolerance.h new file mode 100644 index 0000000000000000000000000000000000000000..051971eea27ac02358bfb543a622dd635f337038 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/JointTolerance.h @@ -0,0 +1,151 @@ +#ifndef _ROS_control_msgs_JointTolerance_h +#define _ROS_control_msgs_JointTolerance_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class JointTolerance : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef double _position_type; + _position_type position; + typedef double _velocity_type; + _velocity_type velocity; + typedef double _acceleration_type; + _acceleration_type acceleration; + + JointTolerance(): + name(""), + position(0), + velocity(0), + acceleration(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + union { + double real; + uint64_t base; + } u_position; + u_position.real = this->position; + *(outbuffer + offset + 0) = (u_position.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_position.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_position.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_position.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_position.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_position.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_position.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_position.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_velocity; + u_velocity.real = this->velocity; + *(outbuffer + offset + 0) = (u_velocity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_velocity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_velocity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_velocity.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_velocity.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_velocity.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_velocity.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_velocity.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->velocity); + union { + double real; + uint64_t base; + } u_acceleration; + u_acceleration.real = this->acceleration; + *(outbuffer + offset + 0) = (u_acceleration.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_acceleration.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_acceleration.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_acceleration.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_acceleration.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_acceleration.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_acceleration.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_acceleration.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->acceleration); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + union { + double real; + uint64_t base; + } u_position; + u_position.base = 0; + u_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->position = u_position.real; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_velocity; + u_velocity.base = 0; + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->velocity = u_velocity.real; + offset += sizeof(this->velocity); + union { + double real; + uint64_t base; + } u_acceleration; + u_acceleration.base = 0; + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->acceleration = u_acceleration.real; + offset += sizeof(this->acceleration); + return offset; + } + + const char * getType(){ return "control_msgs/JointTolerance"; }; + const char * getMD5(){ return "f544fe9c16cf04547e135dd6063ff5be"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryAction.h b/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryAction.h new file mode 100644 index 0000000000000000000000000000000000000000..96bbaa488b1686516ebea2e894139b651943b3ac --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_JointTrajectoryAction_h +#define _ROS_control_msgs_JointTrajectoryAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "control_msgs/JointTrajectoryActionGoal.h" +#include "control_msgs/JointTrajectoryActionResult.h" +#include "control_msgs/JointTrajectoryActionFeedback.h" + +namespace control_msgs +{ + + class JointTrajectoryAction : public ros::Msg + { + public: + typedef control_msgs::JointTrajectoryActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef control_msgs::JointTrajectoryActionResult _action_result_type; + _action_result_type action_result; + typedef control_msgs::JointTrajectoryActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + JointTrajectoryAction(): + action_goal(), + action_result(), + action_feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->action_goal.serialize(outbuffer + offset); + offset += this->action_result.serialize(outbuffer + offset); + offset += this->action_feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->action_goal.deserialize(inbuffer + offset); + offset += this->action_result.deserialize(inbuffer + offset); + offset += this->action_feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryAction"; }; + const char * getMD5(){ return "a04ba3ee8f6a2d0985a6aeaf23d9d7ad"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryActionFeedback.h b/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..8df7fee09150195e67aab627eded53ee440df4ec --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_JointTrajectoryActionFeedback_h +#define _ROS_control_msgs_JointTrajectoryActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/JointTrajectoryFeedback.h" + +namespace control_msgs +{ + + class JointTrajectoryActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::JointTrajectoryFeedback _feedback_type; + _feedback_type feedback; + + JointTrajectoryActionFeedback(): + header(), + status(), + feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryActionFeedback"; }; + const char * getMD5(){ return "aae20e09065c3809e8a8e87c4c8953fd"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryActionGoal.h b/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..8c432bb5ae7458cfc6490faad9c4d3915495af9f --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_JointTrajectoryActionGoal_h +#define _ROS_control_msgs_JointTrajectoryActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "control_msgs/JointTrajectoryGoal.h" + +namespace control_msgs +{ + + class JointTrajectoryActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef control_msgs::JointTrajectoryGoal _goal_type; + _goal_type goal; + + JointTrajectoryActionGoal(): + header(), + goal_id(), + goal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->goal_id.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->goal_id.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryActionGoal"; }; + const char * getMD5(){ return "a99e83ef6185f9fdd7693efe99623a86"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryActionResult.h b/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..2a11d224d36cd8b5341c79a371ceeecf97ee824d --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_JointTrajectoryActionResult_h +#define _ROS_control_msgs_JointTrajectoryActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/JointTrajectoryResult.h" + +namespace control_msgs +{ + + class JointTrajectoryActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::JointTrajectoryResult _result_type; + _result_type result; + + JointTrajectoryActionResult(): + header(), + status(), + result() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->result.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->result.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryActionResult"; }; + const char * getMD5(){ return "1eb06eeff08fa7ea874431638cb52332"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryControllerState.h b/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryControllerState.h new file mode 100644 index 0000000000000000000000000000000000000000..148db3a7900e5c1d65bbd9047d6ab3d4e9fa1363 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryControllerState.h @@ -0,0 +1,97 @@ +#ifndef _ROS_control_msgs_JointTrajectoryControllerState_h +#define _ROS_control_msgs_JointTrajectoryControllerState_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "trajectory_msgs/JointTrajectoryPoint.h" + +namespace control_msgs +{ + + class JointTrajectoryControllerState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t joint_names_length; + typedef char* _joint_names_type; + _joint_names_type st_joint_names; + _joint_names_type * joint_names; + typedef trajectory_msgs::JointTrajectoryPoint _desired_type; + _desired_type desired; + typedef trajectory_msgs::JointTrajectoryPoint _actual_type; + _actual_type actual; + typedef trajectory_msgs::JointTrajectoryPoint _error_type; + _error_type error; + + JointTrajectoryControllerState(): + header(), + joint_names_length(0), joint_names(NULL), + desired(), + actual(), + error() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_names_length); + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_joint_namesi = strlen(this->joint_names[i]); + varToArr(outbuffer + offset, length_joint_namesi); + offset += 4; + memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); + offset += length_joint_namesi; + } + offset += this->desired.serialize(outbuffer + offset); + offset += this->actual.serialize(outbuffer + offset); + offset += this->error.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_names_length); + if(joint_names_lengthT > joint_names_length) + this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); + joint_names_length = joint_names_lengthT; + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_st_joint_names; + arrToVar(length_st_joint_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_joint_names-1]=0; + this->st_joint_names = (char *)(inbuffer + offset-1); + offset += length_st_joint_names; + memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); + } + offset += this->desired.deserialize(inbuffer + offset); + offset += this->actual.deserialize(inbuffer + offset); + offset += this->error.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryControllerState"; }; + const char * getMD5(){ return "10817c60c2486ef6b33e97dcd87f4474"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryFeedback.h b/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..9dfe808d1ad01bfeb70ddfcf3902fa36fad650f5 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryFeedback.h @@ -0,0 +1,38 @@ +#ifndef _ROS_control_msgs_JointTrajectoryFeedback_h +#define _ROS_control_msgs_JointTrajectoryFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class JointTrajectoryFeedback : public ros::Msg + { + public: + + JointTrajectoryFeedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryFeedback"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryGoal.h b/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..b699132e456fedba7acef0d08063bfe885fe772e --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryGoal.h @@ -0,0 +1,44 @@ +#ifndef _ROS_control_msgs_JointTrajectoryGoal_h +#define _ROS_control_msgs_JointTrajectoryGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "trajectory_msgs/JointTrajectory.h" + +namespace control_msgs +{ + + class JointTrajectoryGoal : public ros::Msg + { + public: + typedef trajectory_msgs::JointTrajectory _trajectory_type; + _trajectory_type trajectory; + + JointTrajectoryGoal(): + trajectory() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->trajectory.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->trajectory.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryGoal"; }; + const char * getMD5(){ return "2a0eff76c870e8595636c2a562ca298e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryResult.h b/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryResult.h new file mode 100644 index 0000000000000000000000000000000000000000..623ed9cd099c212a6be65d4d93450b096de4d6d4 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/JointTrajectoryResult.h @@ -0,0 +1,38 @@ +#ifndef _ROS_control_msgs_JointTrajectoryResult_h +#define _ROS_control_msgs_JointTrajectoryResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class JointTrajectoryResult : public ros::Msg + { + public: + + JointTrajectoryResult() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return "control_msgs/JointTrajectoryResult"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/PidState.h b/source/ros-max-lib/ros_lib/control_msgs/PidState.h new file mode 100644 index 0000000000000000000000000000000000000000..a19ddf9739a643532eb894b8e544eafef46f8ed9 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/PidState.h @@ -0,0 +1,420 @@ +#ifndef _ROS_control_msgs_PidState_h +#define _ROS_control_msgs_PidState_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "ros/duration.h" + +namespace control_msgs +{ + + class PidState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef ros::Duration _timestep_type; + _timestep_type timestep; + typedef double _error_type; + _error_type error; + typedef double _error_dot_type; + _error_dot_type error_dot; + typedef double _p_error_type; + _p_error_type p_error; + typedef double _i_error_type; + _i_error_type i_error; + typedef double _d_error_type; + _d_error_type d_error; + typedef double _p_term_type; + _p_term_type p_term; + typedef double _i_term_type; + _i_term_type i_term; + typedef double _d_term_type; + _d_term_type d_term; + typedef double _i_max_type; + _i_max_type i_max; + typedef double _i_min_type; + _i_min_type i_min; + typedef double _output_type; + _output_type output; + + PidState(): + header(), + timestep(), + error(0), + error_dot(0), + p_error(0), + i_error(0), + d_error(0), + p_term(0), + i_term(0), + d_term(0), + i_max(0), + i_min(0), + output(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->timestep.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timestep.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timestep.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timestep.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timestep.sec); + *(outbuffer + offset + 0) = (this->timestep.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timestep.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timestep.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timestep.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timestep.nsec); + union { + double real; + uint64_t base; + } u_error; + u_error.real = this->error; + *(outbuffer + offset + 0) = (u_error.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_error.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_error.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_error.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_error.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_error.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_error.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_error.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->error); + union { + double real; + uint64_t base; + } u_error_dot; + u_error_dot.real = this->error_dot; + *(outbuffer + offset + 0) = (u_error_dot.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_error_dot.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_error_dot.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_error_dot.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_error_dot.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_error_dot.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_error_dot.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_error_dot.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->error_dot); + union { + double real; + uint64_t base; + } u_p_error; + u_p_error.real = this->p_error; + *(outbuffer + offset + 0) = (u_p_error.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_p_error.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_p_error.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_p_error.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_p_error.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_p_error.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_p_error.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_p_error.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->p_error); + union { + double real; + uint64_t base; + } u_i_error; + u_i_error.real = this->i_error; + *(outbuffer + offset + 0) = (u_i_error.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i_error.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i_error.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i_error.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i_error.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i_error.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i_error.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i_error.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i_error); + union { + double real; + uint64_t base; + } u_d_error; + u_d_error.real = this->d_error; + *(outbuffer + offset + 0) = (u_d_error.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_d_error.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_d_error.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_d_error.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_d_error.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_d_error.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_d_error.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_d_error.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->d_error); + union { + double real; + uint64_t base; + } u_p_term; + u_p_term.real = this->p_term; + *(outbuffer + offset + 0) = (u_p_term.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_p_term.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_p_term.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_p_term.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_p_term.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_p_term.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_p_term.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_p_term.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->p_term); + union { + double real; + uint64_t base; + } u_i_term; + u_i_term.real = this->i_term; + *(outbuffer + offset + 0) = (u_i_term.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i_term.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i_term.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i_term.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i_term.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i_term.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i_term.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i_term.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i_term); + union { + double real; + uint64_t base; + } u_d_term; + u_d_term.real = this->d_term; + *(outbuffer + offset + 0) = (u_d_term.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_d_term.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_d_term.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_d_term.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_d_term.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_d_term.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_d_term.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_d_term.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->d_term); + union { + double real; + uint64_t base; + } u_i_max; + u_i_max.real = this->i_max; + *(outbuffer + offset + 0) = (u_i_max.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i_max.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i_max.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i_max.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i_max.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i_max.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i_max.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i_max.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i_max); + union { + double real; + uint64_t base; + } u_i_min; + u_i_min.real = this->i_min; + *(outbuffer + offset + 0) = (u_i_min.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i_min.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i_min.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i_min.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i_min.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i_min.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i_min.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i_min.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i_min); + union { + double real; + uint64_t base; + } u_output; + u_output.real = this->output; + *(outbuffer + offset + 0) = (u_output.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_output.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_output.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_output.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_output.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_output.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_output.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_output.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->output); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->timestep.sec = ((uint32_t) (*(inbuffer + offset))); + this->timestep.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timestep.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timestep.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timestep.sec); + this->timestep.nsec = ((uint32_t) (*(inbuffer + offset))); + this->timestep.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timestep.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timestep.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timestep.nsec); + union { + double real; + uint64_t base; + } u_error; + u_error.base = 0; + u_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->error = u_error.real; + offset += sizeof(this->error); + union { + double real; + uint64_t base; + } u_error_dot; + u_error_dot.base = 0; + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->error_dot = u_error_dot.real; + offset += sizeof(this->error_dot); + union { + double real; + uint64_t base; + } u_p_error; + u_p_error.base = 0; + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->p_error = u_p_error.real; + offset += sizeof(this->p_error); + union { + double real; + uint64_t base; + } u_i_error; + u_i_error.base = 0; + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i_error = u_i_error.real; + offset += sizeof(this->i_error); + union { + double real; + uint64_t base; + } u_d_error; + u_d_error.base = 0; + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->d_error = u_d_error.real; + offset += sizeof(this->d_error); + union { + double real; + uint64_t base; + } u_p_term; + u_p_term.base = 0; + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->p_term = u_p_term.real; + offset += sizeof(this->p_term); + union { + double real; + uint64_t base; + } u_i_term; + u_i_term.base = 0; + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i_term = u_i_term.real; + offset += sizeof(this->i_term); + union { + double real; + uint64_t base; + } u_d_term; + u_d_term.base = 0; + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->d_term = u_d_term.real; + offset += sizeof(this->d_term); + union { + double real; + uint64_t base; + } u_i_max; + u_i_max.base = 0; + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i_max = u_i_max.real; + offset += sizeof(this->i_max); + union { + double real; + uint64_t base; + } u_i_min; + u_i_min.base = 0; + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i_min = u_i_min.real; + offset += sizeof(this->i_min); + union { + double real; + uint64_t base; + } u_output; + u_output.base = 0; + u_output.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_output.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_output.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_output.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_output.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_output.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_output.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_output.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->output = u_output.real; + offset += sizeof(this->output); + return offset; + } + + const char * getType(){ return "control_msgs/PidState"; }; + const char * getMD5(){ return "b138ec00e886c10e73f27e8712252ea6"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/PointHeadAction.h b/source/ros-max-lib/ros_lib/control_msgs/PointHeadAction.h new file mode 100644 index 0000000000000000000000000000000000000000..82ee446909a212585ae198b9842d4e8dcc6fc6e8 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/PointHeadAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_PointHeadAction_h +#define _ROS_control_msgs_PointHeadAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "control_msgs/PointHeadActionGoal.h" +#include "control_msgs/PointHeadActionResult.h" +#include "control_msgs/PointHeadActionFeedback.h" + +namespace control_msgs +{ + + class PointHeadAction : public ros::Msg + { + public: + typedef control_msgs::PointHeadActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef control_msgs::PointHeadActionResult _action_result_type; + _action_result_type action_result; + typedef control_msgs::PointHeadActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + PointHeadAction(): + action_goal(), + action_result(), + action_feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->action_goal.serialize(outbuffer + offset); + offset += this->action_result.serialize(outbuffer + offset); + offset += this->action_feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->action_goal.deserialize(inbuffer + offset); + offset += this->action_result.deserialize(inbuffer + offset); + offset += this->action_feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/PointHeadAction"; }; + const char * getMD5(){ return "7252920f1243de1b741f14f214125371"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/PointHeadActionFeedback.h b/source/ros-max-lib/ros_lib/control_msgs/PointHeadActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..780656b1de51f13a0114903f138582a487aec0c3 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/PointHeadActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_PointHeadActionFeedback_h +#define _ROS_control_msgs_PointHeadActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/PointHeadFeedback.h" + +namespace control_msgs +{ + + class PointHeadActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::PointHeadFeedback _feedback_type; + _feedback_type feedback; + + PointHeadActionFeedback(): + header(), + status(), + feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/PointHeadActionFeedback"; }; + const char * getMD5(){ return "33c9244957176bbba97dd641119e8460"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/PointHeadActionGoal.h b/source/ros-max-lib/ros_lib/control_msgs/PointHeadActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..12ae7911bedd1f3cd4c6e032e5e37c68f7b31997 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/PointHeadActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_PointHeadActionGoal_h +#define _ROS_control_msgs_PointHeadActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "control_msgs/PointHeadGoal.h" + +namespace control_msgs +{ + + class PointHeadActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef control_msgs::PointHeadGoal _goal_type; + _goal_type goal; + + PointHeadActionGoal(): + header(), + goal_id(), + goal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->goal_id.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->goal_id.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/PointHeadActionGoal"; }; + const char * getMD5(){ return "b53a8323d0ba7b310ba17a2d3a82a6b8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/PointHeadActionResult.h b/source/ros-max-lib/ros_lib/control_msgs/PointHeadActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..7708fe60379fb43a4a3002871dfcf7ac01689c9d --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/PointHeadActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_PointHeadActionResult_h +#define _ROS_control_msgs_PointHeadActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/PointHeadResult.h" + +namespace control_msgs +{ + + class PointHeadActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::PointHeadResult _result_type; + _result_type result; + + PointHeadActionResult(): + header(), + status(), + result() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->result.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->result.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/PointHeadActionResult"; }; + const char * getMD5(){ return "1eb06eeff08fa7ea874431638cb52332"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/PointHeadFeedback.h b/source/ros-max-lib/ros_lib/control_msgs/PointHeadFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..beafd3ef52939c8a44e8323d1e2284c8b52d8857 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/PointHeadFeedback.h @@ -0,0 +1,70 @@ +#ifndef _ROS_control_msgs_PointHeadFeedback_h +#define _ROS_control_msgs_PointHeadFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class PointHeadFeedback : public ros::Msg + { + public: + typedef double _pointing_angle_error_type; + _pointing_angle_error_type pointing_angle_error; + + PointHeadFeedback(): + pointing_angle_error(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_pointing_angle_error; + u_pointing_angle_error.real = this->pointing_angle_error; + *(outbuffer + offset + 0) = (u_pointing_angle_error.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_pointing_angle_error.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_pointing_angle_error.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_pointing_angle_error.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_pointing_angle_error.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_pointing_angle_error.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_pointing_angle_error.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_pointing_angle_error.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->pointing_angle_error); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_pointing_angle_error; + u_pointing_angle_error.base = 0; + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_pointing_angle_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->pointing_angle_error = u_pointing_angle_error.real; + offset += sizeof(this->pointing_angle_error); + return offset; + } + + const char * getType(){ return "control_msgs/PointHeadFeedback"; }; + const char * getMD5(){ return "cce80d27fd763682da8805a73316cab4"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/PointHeadGoal.h b/source/ros-max-lib/ros_lib/control_msgs/PointHeadGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..4d7355cbdea878a4b77632d5ec9e169ab7320747 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/PointHeadGoal.h @@ -0,0 +1,123 @@ +#ifndef _ROS_control_msgs_PointHeadGoal_h +#define _ROS_control_msgs_PointHeadGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/PointStamped.h" +#include "geometry_msgs/Vector3.h" +#include "ros/duration.h" + +namespace control_msgs +{ + + class PointHeadGoal : public ros::Msg + { + public: + typedef geometry_msgs::PointStamped _target_type; + _target_type target; + typedef geometry_msgs::Vector3 _pointing_axis_type; + _pointing_axis_type pointing_axis; + typedef const char* _pointing_frame_type; + _pointing_frame_type pointing_frame; + typedef ros::Duration _min_duration_type; + _min_duration_type min_duration; + typedef double _max_velocity_type; + _max_velocity_type max_velocity; + + PointHeadGoal(): + target(), + pointing_axis(), + pointing_frame(""), + min_duration(), + max_velocity(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->target.serialize(outbuffer + offset); + offset += this->pointing_axis.serialize(outbuffer + offset); + uint32_t length_pointing_frame = strlen(this->pointing_frame); + varToArr(outbuffer + offset, length_pointing_frame); + offset += 4; + memcpy(outbuffer + offset, this->pointing_frame, length_pointing_frame); + offset += length_pointing_frame; + *(outbuffer + offset + 0) = (this->min_duration.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->min_duration.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->min_duration.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->min_duration.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->min_duration.sec); + *(outbuffer + offset + 0) = (this->min_duration.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->min_duration.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->min_duration.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->min_duration.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->min_duration.nsec); + union { + double real; + uint64_t base; + } u_max_velocity; + u_max_velocity.real = this->max_velocity; + *(outbuffer + offset + 0) = (u_max_velocity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_velocity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_velocity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_velocity.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max_velocity.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max_velocity.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max_velocity.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max_velocity.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max_velocity); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->target.deserialize(inbuffer + offset); + offset += this->pointing_axis.deserialize(inbuffer + offset); + uint32_t length_pointing_frame; + arrToVar(length_pointing_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_pointing_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_pointing_frame-1]=0; + this->pointing_frame = (char *)(inbuffer + offset-1); + offset += length_pointing_frame; + this->min_duration.sec = ((uint32_t) (*(inbuffer + offset))); + this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->min_duration.sec); + this->min_duration.nsec = ((uint32_t) (*(inbuffer + offset))); + this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->min_duration.nsec); + union { + double real; + uint64_t base; + } u_max_velocity; + u_max_velocity.base = 0; + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max_velocity = u_max_velocity.real; + offset += sizeof(this->max_velocity); + return offset; + } + + const char * getType(){ return "control_msgs/PointHeadGoal"; }; + const char * getMD5(){ return "8b92b1cd5e06c8a94c917dc3209a4c1d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/PointHeadResult.h b/source/ros-max-lib/ros_lib/control_msgs/PointHeadResult.h new file mode 100644 index 0000000000000000000000000000000000000000..53f789e92946eeba57f8825f09422dd6fc4d5b83 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/PointHeadResult.h @@ -0,0 +1,38 @@ +#ifndef _ROS_control_msgs_PointHeadResult_h +#define _ROS_control_msgs_PointHeadResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class PointHeadResult : public ros::Msg + { + public: + + PointHeadResult() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return "control_msgs/PointHeadResult"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/QueryCalibrationState.h b/source/ros-max-lib/ros_lib/control_msgs/QueryCalibrationState.h new file mode 100644 index 0000000000000000000000000000000000000000..0fd1a66a0be9f04857c28b0ab83f4147ba73788e --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/QueryCalibrationState.h @@ -0,0 +1,88 @@ +#ifndef _ROS_SERVICE_QueryCalibrationState_h +#define _ROS_SERVICE_QueryCalibrationState_h +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + +static const char QUERYCALIBRATIONSTATE[] = "control_msgs/QueryCalibrationState"; + + class QueryCalibrationStateRequest : public ros::Msg + { + public: + + QueryCalibrationStateRequest() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return QUERYCALIBRATIONSTATE; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class QueryCalibrationStateResponse : public ros::Msg + { + public: + typedef bool _is_calibrated_type; + _is_calibrated_type is_calibrated; + + QueryCalibrationStateResponse(): + is_calibrated(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_is_calibrated; + u_is_calibrated.real = this->is_calibrated; + *(outbuffer + offset + 0) = (u_is_calibrated.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->is_calibrated); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_is_calibrated; + u_is_calibrated.base = 0; + u_is_calibrated.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->is_calibrated = u_is_calibrated.real; + offset += sizeof(this->is_calibrated); + return offset; + } + + const char * getType(){ return QUERYCALIBRATIONSTATE; }; + const char * getMD5(){ return "28af3beedcb84986b8e470dc5470507d"; }; + + }; + + class QueryCalibrationState { + public: + typedef QueryCalibrationStateRequest Request; + typedef QueryCalibrationStateResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/control_msgs/QueryTrajectoryState.h b/source/ros-max-lib/ros_lib/control_msgs/QueryTrajectoryState.h new file mode 100644 index 0000000000000000000000000000000000000000..aef19a80e64436c1c8851f3d5344b841ece4a8ab --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/QueryTrajectoryState.h @@ -0,0 +1,287 @@ +#ifndef _ROS_SERVICE_QueryTrajectoryState_h +#define _ROS_SERVICE_QueryTrajectoryState_h +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" + +namespace control_msgs +{ + +static const char QUERYTRAJECTORYSTATE[] = "control_msgs/QueryTrajectoryState"; + + class QueryTrajectoryStateRequest : public ros::Msg + { + public: + typedef ros::Time _time_type; + _time_type time; + + QueryTrajectoryStateRequest(): + time() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time.sec); + *(outbuffer + offset + 0) = (this->time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->time.sec = ((uint32_t) (*(inbuffer + offset))); + this->time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time.sec); + this->time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time.nsec); + return offset; + } + + const char * getType(){ return QUERYTRAJECTORYSTATE; }; + const char * getMD5(){ return "556a4fb76023a469987922359d08a844"; }; + + }; + + class QueryTrajectoryStateResponse : public ros::Msg + { + public: + uint32_t name_length; + typedef char* _name_type; + _name_type st_name; + _name_type * name; + uint32_t position_length; + typedef double _position_type; + _position_type st_position; + _position_type * position; + uint32_t velocity_length; + typedef double _velocity_type; + _velocity_type st_velocity; + _velocity_type * velocity; + uint32_t acceleration_length; + typedef double _acceleration_type; + _acceleration_type st_acceleration; + _acceleration_type * acceleration; + + QueryTrajectoryStateResponse(): + name_length(0), name(NULL), + position_length(0), position(NULL), + velocity_length(0), velocity(NULL), + acceleration_length(0), acceleration(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->name_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->name_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->name_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->name_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->name_length); + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_namei = strlen(this->name[i]); + varToArr(outbuffer + offset, length_namei); + offset += 4; + memcpy(outbuffer + offset, this->name[i], length_namei); + offset += length_namei; + } + *(outbuffer + offset + 0) = (this->position_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->position_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->position_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->position_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->position_length); + for( uint32_t i = 0; i < position_length; i++){ + union { + double real; + uint64_t base; + } u_positioni; + u_positioni.real = this->position[i]; + *(outbuffer + offset + 0) = (u_positioni.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_positioni.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_positioni.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_positioni.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_positioni.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_positioni.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_positioni.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_positioni.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position[i]); + } + *(outbuffer + offset + 0) = (this->velocity_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->velocity_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->velocity_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->velocity_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->velocity_length); + for( uint32_t i = 0; i < velocity_length; i++){ + union { + double real; + uint64_t base; + } u_velocityi; + u_velocityi.real = this->velocity[i]; + *(outbuffer + offset + 0) = (u_velocityi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_velocityi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_velocityi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_velocityi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_velocityi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_velocityi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_velocityi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_velocityi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->velocity[i]); + } + *(outbuffer + offset + 0) = (this->acceleration_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->acceleration_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->acceleration_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->acceleration_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->acceleration_length); + for( uint32_t i = 0; i < acceleration_length; i++){ + union { + double real; + uint64_t base; + } u_accelerationi; + u_accelerationi.real = this->acceleration[i]; + *(outbuffer + offset + 0) = (u_accelerationi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_accelerationi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_accelerationi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_accelerationi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_accelerationi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_accelerationi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_accelerationi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_accelerationi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->acceleration[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t name_lengthT = ((uint32_t) (*(inbuffer + offset))); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->name_length); + if(name_lengthT > name_length) + this->name = (char**)realloc(this->name, name_lengthT * sizeof(char*)); + name_length = name_lengthT; + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_st_name; + arrToVar(length_st_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_name-1]=0; + this->st_name = (char *)(inbuffer + offset-1); + offset += length_st_name; + memcpy( &(this->name[i]), &(this->st_name), sizeof(char*)); + } + uint32_t position_lengthT = ((uint32_t) (*(inbuffer + offset))); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->position_length); + if(position_lengthT > position_length) + this->position = (double*)realloc(this->position, position_lengthT * sizeof(double)); + position_length = position_lengthT; + for( uint32_t i = 0; i < position_length; i++){ + union { + double real; + uint64_t base; + } u_st_position; + u_st_position.base = 0; + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_position = u_st_position.real; + offset += sizeof(this->st_position); + memcpy( &(this->position[i]), &(this->st_position), sizeof(double)); + } + uint32_t velocity_lengthT = ((uint32_t) (*(inbuffer + offset))); + velocity_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + velocity_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + velocity_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->velocity_length); + if(velocity_lengthT > velocity_length) + this->velocity = (double*)realloc(this->velocity, velocity_lengthT * sizeof(double)); + velocity_length = velocity_lengthT; + for( uint32_t i = 0; i < velocity_length; i++){ + union { + double real; + uint64_t base; + } u_st_velocity; + u_st_velocity.base = 0; + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_velocity = u_st_velocity.real; + offset += sizeof(this->st_velocity); + memcpy( &(this->velocity[i]), &(this->st_velocity), sizeof(double)); + } + uint32_t acceleration_lengthT = ((uint32_t) (*(inbuffer + offset))); + acceleration_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + acceleration_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + acceleration_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->acceleration_length); + if(acceleration_lengthT > acceleration_length) + this->acceleration = (double*)realloc(this->acceleration, acceleration_lengthT * sizeof(double)); + acceleration_length = acceleration_lengthT; + for( uint32_t i = 0; i < acceleration_length; i++){ + union { + double real; + uint64_t base; + } u_st_acceleration; + u_st_acceleration.base = 0; + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_acceleration.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_acceleration = u_st_acceleration.real; + offset += sizeof(this->st_acceleration); + memcpy( &(this->acceleration[i]), &(this->st_acceleration), sizeof(double)); + } + return offset; + } + + const char * getType(){ return QUERYTRAJECTORYSTATE; }; + const char * getMD5(){ return "1f1a6554ad060f44d013e71868403c1a"; }; + + }; + + class QueryTrajectoryState { + public: + typedef QueryTrajectoryStateRequest Request; + typedef QueryTrajectoryStateResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/control_msgs/SingleJointPositionAction.h b/source/ros-max-lib/ros_lib/control_msgs/SingleJointPositionAction.h new file mode 100644 index 0000000000000000000000000000000000000000..3117ee131ddcb6691577837cf716e9570c7e4742 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/SingleJointPositionAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_SingleJointPositionAction_h +#define _ROS_control_msgs_SingleJointPositionAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "control_msgs/SingleJointPositionActionGoal.h" +#include "control_msgs/SingleJointPositionActionResult.h" +#include "control_msgs/SingleJointPositionActionFeedback.h" + +namespace control_msgs +{ + + class SingleJointPositionAction : public ros::Msg + { + public: + typedef control_msgs::SingleJointPositionActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef control_msgs::SingleJointPositionActionResult _action_result_type; + _action_result_type action_result; + typedef control_msgs::SingleJointPositionActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + SingleJointPositionAction(): + action_goal(), + action_result(), + action_feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->action_goal.serialize(outbuffer + offset); + offset += this->action_result.serialize(outbuffer + offset); + offset += this->action_feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->action_goal.deserialize(inbuffer + offset); + offset += this->action_result.deserialize(inbuffer + offset); + offset += this->action_feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/SingleJointPositionAction"; }; + const char * getMD5(){ return "c4a786b7d53e5d0983decf967a5a779e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/SingleJointPositionActionFeedback.h b/source/ros-max-lib/ros_lib/control_msgs/SingleJointPositionActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..82cba63dd233a10c8b46d9727a2ba46d226c038e --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/SingleJointPositionActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_SingleJointPositionActionFeedback_h +#define _ROS_control_msgs_SingleJointPositionActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/SingleJointPositionFeedback.h" + +namespace control_msgs +{ + + class SingleJointPositionActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::SingleJointPositionFeedback _feedback_type; + _feedback_type feedback; + + SingleJointPositionActionFeedback(): + header(), + status(), + feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/SingleJointPositionActionFeedback"; }; + const char * getMD5(){ return "3503b7cf8972f90d245850a5d8796cfa"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/SingleJointPositionActionGoal.h b/source/ros-max-lib/ros_lib/control_msgs/SingleJointPositionActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..75c789880add2c65d89920a2b69f97df1cbb2c89 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/SingleJointPositionActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_SingleJointPositionActionGoal_h +#define _ROS_control_msgs_SingleJointPositionActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "control_msgs/SingleJointPositionGoal.h" + +namespace control_msgs +{ + + class SingleJointPositionActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef control_msgs::SingleJointPositionGoal _goal_type; + _goal_type goal; + + SingleJointPositionActionGoal(): + header(), + goal_id(), + goal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->goal_id.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->goal_id.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/SingleJointPositionActionGoal"; }; + const char * getMD5(){ return "4b0d3d091471663e17749c1d0db90f61"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/SingleJointPositionActionResult.h b/source/ros-max-lib/ros_lib/control_msgs/SingleJointPositionActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..ef99cd8ff3a1db8c3648312f9c13b9255bb0dd3e --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/SingleJointPositionActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_control_msgs_SingleJointPositionActionResult_h +#define _ROS_control_msgs_SingleJointPositionActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "control_msgs/SingleJointPositionResult.h" + +namespace control_msgs +{ + + class SingleJointPositionActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef control_msgs::SingleJointPositionResult _result_type; + _result_type result; + + SingleJointPositionActionResult(): + header(), + status(), + result() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->result.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->result.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "control_msgs/SingleJointPositionActionResult"; }; + const char * getMD5(){ return "1eb06eeff08fa7ea874431638cb52332"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/SingleJointPositionFeedback.h b/source/ros-max-lib/ros_lib/control_msgs/SingleJointPositionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..cbf8fa4dc0b4ff3a630157bbf11bcfd6f92bca06 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/SingleJointPositionFeedback.h @@ -0,0 +1,140 @@ +#ifndef _ROS_control_msgs_SingleJointPositionFeedback_h +#define _ROS_control_msgs_SingleJointPositionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace control_msgs +{ + + class SingleJointPositionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef double _position_type; + _position_type position; + typedef double _velocity_type; + _velocity_type velocity; + typedef double _error_type; + _error_type error; + + SingleJointPositionFeedback(): + header(), + position(0), + velocity(0), + error(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_position; + u_position.real = this->position; + *(outbuffer + offset + 0) = (u_position.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_position.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_position.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_position.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_position.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_position.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_position.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_position.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_velocity; + u_velocity.real = this->velocity; + *(outbuffer + offset + 0) = (u_velocity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_velocity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_velocity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_velocity.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_velocity.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_velocity.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_velocity.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_velocity.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->velocity); + union { + double real; + uint64_t base; + } u_error; + u_error.real = this->error; + *(outbuffer + offset + 0) = (u_error.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_error.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_error.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_error.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_error.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_error.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_error.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_error.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->error); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_position; + u_position.base = 0; + u_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->position = u_position.real; + offset += sizeof(this->position); + union { + double real; + uint64_t base; + } u_velocity; + u_velocity.base = 0; + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->velocity = u_velocity.real; + offset += sizeof(this->velocity); + union { + double real; + uint64_t base; + } u_error; + u_error.base = 0; + u_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->error = u_error.real; + offset += sizeof(this->error); + return offset; + } + + const char * getType(){ return "control_msgs/SingleJointPositionFeedback"; }; + const char * getMD5(){ return "8cee65610a3d08e0a1bded82f146f1fd"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/SingleJointPositionGoal.h b/source/ros-max-lib/ros_lib/control_msgs/SingleJointPositionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..7261176297aea0181e9c8e4eb3178d0555b7cbc0 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/SingleJointPositionGoal.h @@ -0,0 +1,126 @@ +#ifndef _ROS_control_msgs_SingleJointPositionGoal_h +#define _ROS_control_msgs_SingleJointPositionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/duration.h" + +namespace control_msgs +{ + + class SingleJointPositionGoal : public ros::Msg + { + public: + typedef double _position_type; + _position_type position; + typedef ros::Duration _min_duration_type; + _min_duration_type min_duration; + typedef double _max_velocity_type; + _max_velocity_type max_velocity; + + SingleJointPositionGoal(): + position(0), + min_duration(), + max_velocity(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_position; + u_position.real = this->position; + *(outbuffer + offset + 0) = (u_position.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_position.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_position.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_position.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_position.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_position.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_position.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_position.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position); + *(outbuffer + offset + 0) = (this->min_duration.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->min_duration.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->min_duration.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->min_duration.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->min_duration.sec); + *(outbuffer + offset + 0) = (this->min_duration.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->min_duration.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->min_duration.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->min_duration.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->min_duration.nsec); + union { + double real; + uint64_t base; + } u_max_velocity; + u_max_velocity.real = this->max_velocity; + *(outbuffer + offset + 0) = (u_max_velocity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_velocity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_velocity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_velocity.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max_velocity.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max_velocity.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max_velocity.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max_velocity.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max_velocity); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_position; + u_position.base = 0; + u_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->position = u_position.real; + offset += sizeof(this->position); + this->min_duration.sec = ((uint32_t) (*(inbuffer + offset))); + this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->min_duration.sec); + this->min_duration.nsec = ((uint32_t) (*(inbuffer + offset))); + this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->min_duration.nsec); + union { + double real; + uint64_t base; + } u_max_velocity; + u_max_velocity.base = 0; + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max_velocity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max_velocity = u_max_velocity.real; + offset += sizeof(this->max_velocity); + return offset; + } + + const char * getType(){ return "control_msgs/SingleJointPositionGoal"; }; + const char * getMD5(){ return "fbaaa562a23a013fd5053e5f72cbb35c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_msgs/SingleJointPositionResult.h b/source/ros-max-lib/ros_lib/control_msgs/SingleJointPositionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..7593425910d62bd10c7958e2eb57e86705111ef9 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_msgs/SingleJointPositionResult.h @@ -0,0 +1,38 @@ +#ifndef _ROS_control_msgs_SingleJointPositionResult_h +#define _ROS_control_msgs_SingleJointPositionResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace control_msgs +{ + + class SingleJointPositionResult : public ros::Msg + { + public: + + SingleJointPositionResult() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return "control_msgs/SingleJointPositionResult"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/control_toolbox/SetPidGains.h b/source/ros-max-lib/ros_lib/control_toolbox/SetPidGains.h new file mode 100644 index 0000000000000000000000000000000000000000..709d825d139dc7e2147243584c72469d780eb502 --- /dev/null +++ b/source/ros-max-lib/ros_lib/control_toolbox/SetPidGains.h @@ -0,0 +1,216 @@ +#ifndef _ROS_SERVICE_SetPidGains_h +#define _ROS_SERVICE_SetPidGains_h +#include +#include +#include +#include "ros/msg.h" + +namespace control_toolbox +{ + +static const char SETPIDGAINS[] = "control_toolbox/SetPidGains"; + + class SetPidGainsRequest : public ros::Msg + { + public: + typedef double _p_type; + _p_type p; + typedef double _i_type; + _i_type i; + typedef double _d_type; + _d_type d; + typedef double _i_clamp_type; + _i_clamp_type i_clamp; + typedef bool _antiwindup_type; + _antiwindup_type antiwindup; + + SetPidGainsRequest(): + p(0), + i(0), + d(0), + i_clamp(0), + antiwindup(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_p; + u_p.real = this->p; + *(outbuffer + offset + 0) = (u_p.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_p.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_p.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_p.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_p.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_p.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_p.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_p.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->p); + union { + double real; + uint64_t base; + } u_i; + u_i.real = this->i; + *(outbuffer + offset + 0) = (u_i.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i); + union { + double real; + uint64_t base; + } u_d; + u_d.real = this->d; + *(outbuffer + offset + 0) = (u_d.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_d.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_d.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_d.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_d.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_d.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_d.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_d.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->d); + union { + double real; + uint64_t base; + } u_i_clamp; + u_i_clamp.real = this->i_clamp; + *(outbuffer + offset + 0) = (u_i_clamp.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_i_clamp.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_i_clamp.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_i_clamp.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_i_clamp.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_i_clamp.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_i_clamp.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_i_clamp.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->i_clamp); + union { + bool real; + uint8_t base; + } u_antiwindup; + u_antiwindup.real = this->antiwindup; + *(outbuffer + offset + 0) = (u_antiwindup.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->antiwindup); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_p; + u_p.base = 0; + u_p.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_p.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->p = u_p.real; + offset += sizeof(this->p); + union { + double real; + uint64_t base; + } u_i; + u_i.base = 0; + u_i.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i = u_i.real; + offset += sizeof(this->i); + union { + double real; + uint64_t base; + } u_d; + u_d.base = 0; + u_d.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_d.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->d = u_d.real; + offset += sizeof(this->d); + union { + double real; + uint64_t base; + } u_i_clamp; + u_i_clamp.base = 0; + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_i_clamp.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->i_clamp = u_i_clamp.real; + offset += sizeof(this->i_clamp); + union { + bool real; + uint8_t base; + } u_antiwindup; + u_antiwindup.base = 0; + u_antiwindup.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->antiwindup = u_antiwindup.real; + offset += sizeof(this->antiwindup); + return offset; + } + + const char * getType(){ return SETPIDGAINS; }; + const char * getMD5(){ return "4a43159879643e60937bf2893b633607"; }; + + }; + + class SetPidGainsResponse : public ros::Msg + { + public: + + SetPidGainsResponse() + { + } + + 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 SETPIDGAINS; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class SetPidGains { + public: + typedef SetPidGainsRequest Request; + typedef SetPidGainsResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/controller_manager_msgs/ControllerState.h b/source/ros-max-lib/ros_lib/controller_manager_msgs/ControllerState.h new file mode 100644 index 0000000000000000000000000000000000000000..ea728c4ee7e7cd9b12c7db0f82a13ca9a2653434 --- /dev/null +++ b/source/ros-max-lib/ros_lib/controller_manager_msgs/ControllerState.h @@ -0,0 +1,115 @@ +#ifndef _ROS_controller_manager_msgs_ControllerState_h +#define _ROS_controller_manager_msgs_ControllerState_h + +#include +#include +#include +#include "ros/msg.h" +#include "controller_manager_msgs/HardwareInterfaceResources.h" + +namespace controller_manager_msgs +{ + + class ControllerState : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _state_type; + _state_type state; + typedef const char* _type_type; + _type_type type; + uint32_t claimed_resources_length; + typedef controller_manager_msgs::HardwareInterfaceResources _claimed_resources_type; + _claimed_resources_type st_claimed_resources; + _claimed_resources_type * claimed_resources; + + ControllerState(): + name(""), + state(""), + type(""), + claimed_resources_length(0), claimed_resources(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_state = strlen(this->state); + varToArr(outbuffer + offset, length_state); + offset += 4; + memcpy(outbuffer + offset, this->state, length_state); + offset += length_state; + uint32_t length_type = strlen(this->type); + varToArr(outbuffer + offset, length_type); + offset += 4; + memcpy(outbuffer + offset, this->type, length_type); + offset += length_type; + *(outbuffer + offset + 0) = (this->claimed_resources_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->claimed_resources_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->claimed_resources_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->claimed_resources_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->claimed_resources_length); + for( uint32_t i = 0; i < claimed_resources_length; i++){ + offset += this->claimed_resources[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_state; + arrToVar(length_state, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_state; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_state-1]=0; + this->state = (char *)(inbuffer + offset-1); + offset += length_state; + uint32_t length_type; + arrToVar(length_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type-1]=0; + this->type = (char *)(inbuffer + offset-1); + offset += length_type; + uint32_t claimed_resources_lengthT = ((uint32_t) (*(inbuffer + offset))); + claimed_resources_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + claimed_resources_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + claimed_resources_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->claimed_resources_length); + if(claimed_resources_lengthT > claimed_resources_length) + this->claimed_resources = (controller_manager_msgs::HardwareInterfaceResources*)realloc(this->claimed_resources, claimed_resources_lengthT * sizeof(controller_manager_msgs::HardwareInterfaceResources)); + claimed_resources_length = claimed_resources_lengthT; + for( uint32_t i = 0; i < claimed_resources_length; i++){ + offset += this->st_claimed_resources.deserialize(inbuffer + offset); + memcpy( &(this->claimed_resources[i]), &(this->st_claimed_resources), sizeof(controller_manager_msgs::HardwareInterfaceResources)); + } + return offset; + } + + const char * getType(){ return "controller_manager_msgs/ControllerState"; }; + const char * getMD5(){ return "aeb6b261d97793ab74099a3740245272"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/controller_manager_msgs/ControllerStatistics.h b/source/ros-max-lib/ros_lib/controller_manager_msgs/ControllerStatistics.h new file mode 100644 index 0000000000000000000000000000000000000000..c62773c538e5afba7c15e362278f6f861c9c27c8 --- /dev/null +++ b/source/ros-max-lib/ros_lib/controller_manager_msgs/ControllerStatistics.h @@ -0,0 +1,231 @@ +#ifndef _ROS_controller_manager_msgs_ControllerStatistics_h +#define _ROS_controller_manager_msgs_ControllerStatistics_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" +#include "ros/duration.h" + +namespace controller_manager_msgs +{ + + class ControllerStatistics : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _type_type; + _type_type type; + typedef ros::Time _timestamp_type; + _timestamp_type timestamp; + typedef bool _running_type; + _running_type running; + typedef ros::Duration _max_time_type; + _max_time_type max_time; + typedef ros::Duration _mean_time_type; + _mean_time_type mean_time; + typedef ros::Duration _variance_time_type; + _variance_time_type variance_time; + typedef int32_t _num_control_loop_overruns_type; + _num_control_loop_overruns_type num_control_loop_overruns; + typedef ros::Time _time_last_control_loop_overrun_type; + _time_last_control_loop_overrun_type time_last_control_loop_overrun; + + ControllerStatistics(): + name(""), + type(""), + timestamp(), + running(0), + max_time(), + mean_time(), + variance_time(), + num_control_loop_overruns(0), + time_last_control_loop_overrun() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_type = strlen(this->type); + varToArr(outbuffer + offset, length_type); + offset += 4; + memcpy(outbuffer + offset, this->type, length_type); + offset += length_type; + *(outbuffer + offset + 0) = (this->timestamp.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timestamp.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timestamp.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timestamp.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timestamp.sec); + *(outbuffer + offset + 0) = (this->timestamp.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timestamp.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timestamp.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timestamp.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timestamp.nsec); + union { + bool real; + uint8_t base; + } u_running; + u_running.real = this->running; + *(outbuffer + offset + 0) = (u_running.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->running); + *(outbuffer + offset + 0) = (this->max_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->max_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->max_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->max_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->max_time.sec); + *(outbuffer + offset + 0) = (this->max_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->max_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->max_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->max_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->max_time.nsec); + *(outbuffer + offset + 0) = (this->mean_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->mean_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->mean_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->mean_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->mean_time.sec); + *(outbuffer + offset + 0) = (this->mean_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->mean_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->mean_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->mean_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->mean_time.nsec); + *(outbuffer + offset + 0) = (this->variance_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->variance_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->variance_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->variance_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->variance_time.sec); + *(outbuffer + offset + 0) = (this->variance_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->variance_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->variance_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->variance_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->variance_time.nsec); + union { + int32_t real; + uint32_t base; + } u_num_control_loop_overruns; + u_num_control_loop_overruns.real = this->num_control_loop_overruns; + *(outbuffer + offset + 0) = (u_num_control_loop_overruns.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_num_control_loop_overruns.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_num_control_loop_overruns.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_num_control_loop_overruns.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->num_control_loop_overruns); + *(outbuffer + offset + 0) = (this->time_last_control_loop_overrun.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_last_control_loop_overrun.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_last_control_loop_overrun.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_last_control_loop_overrun.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_last_control_loop_overrun.sec); + *(outbuffer + offset + 0) = (this->time_last_control_loop_overrun.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_last_control_loop_overrun.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_last_control_loop_overrun.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_last_control_loop_overrun.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_last_control_loop_overrun.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_type; + arrToVar(length_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type-1]=0; + this->type = (char *)(inbuffer + offset-1); + offset += length_type; + this->timestamp.sec = ((uint32_t) (*(inbuffer + offset))); + this->timestamp.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timestamp.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timestamp.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timestamp.sec); + this->timestamp.nsec = ((uint32_t) (*(inbuffer + offset))); + this->timestamp.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timestamp.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timestamp.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timestamp.nsec); + union { + bool real; + uint8_t base; + } u_running; + u_running.base = 0; + u_running.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->running = u_running.real; + offset += sizeof(this->running); + this->max_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->max_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->max_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->max_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->max_time.sec); + this->max_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->max_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->max_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->max_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->max_time.nsec); + this->mean_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->mean_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->mean_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->mean_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->mean_time.sec); + this->mean_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->mean_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->mean_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->mean_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->mean_time.nsec); + this->variance_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->variance_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->variance_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->variance_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->variance_time.sec); + this->variance_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->variance_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->variance_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->variance_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->variance_time.nsec); + union { + int32_t real; + uint32_t base; + } u_num_control_loop_overruns; + u_num_control_loop_overruns.base = 0; + u_num_control_loop_overruns.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_num_control_loop_overruns.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_num_control_loop_overruns.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_num_control_loop_overruns.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->num_control_loop_overruns = u_num_control_loop_overruns.real; + offset += sizeof(this->num_control_loop_overruns); + this->time_last_control_loop_overrun.sec = ((uint32_t) (*(inbuffer + offset))); + this->time_last_control_loop_overrun.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_last_control_loop_overrun.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_last_control_loop_overrun.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_last_control_loop_overrun.sec); + this->time_last_control_loop_overrun.nsec = ((uint32_t) (*(inbuffer + offset))); + this->time_last_control_loop_overrun.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_last_control_loop_overrun.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_last_control_loop_overrun.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_last_control_loop_overrun.nsec); + return offset; + } + + const char * getType(){ return "controller_manager_msgs/ControllerStatistics"; }; + const char * getMD5(){ return "697780c372c8d8597a1436d0e2ad3ba8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/controller_manager_msgs/ControllersStatistics.h b/source/ros-max-lib/ros_lib/controller_manager_msgs/ControllersStatistics.h new file mode 100644 index 0000000000000000000000000000000000000000..a3c0503787ce679540031b05df59893781be1ed1 --- /dev/null +++ b/source/ros-max-lib/ros_lib/controller_manager_msgs/ControllersStatistics.h @@ -0,0 +1,70 @@ +#ifndef _ROS_controller_manager_msgs_ControllersStatistics_h +#define _ROS_controller_manager_msgs_ControllersStatistics_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "controller_manager_msgs/ControllerStatistics.h" + +namespace controller_manager_msgs +{ + + class ControllersStatistics : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t controller_length; + typedef controller_manager_msgs::ControllerStatistics _controller_type; + _controller_type st_controller; + _controller_type * controller; + + ControllersStatistics(): + header(), + controller_length(0), controller(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->controller_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->controller_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->controller_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->controller_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->controller_length); + for( uint32_t i = 0; i < controller_length; i++){ + offset += this->controller[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t controller_lengthT = ((uint32_t) (*(inbuffer + offset))); + controller_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + controller_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + controller_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->controller_length); + if(controller_lengthT > controller_length) + this->controller = (controller_manager_msgs::ControllerStatistics*)realloc(this->controller, controller_lengthT * sizeof(controller_manager_msgs::ControllerStatistics)); + controller_length = controller_lengthT; + for( uint32_t i = 0; i < controller_length; i++){ + offset += this->st_controller.deserialize(inbuffer + offset); + memcpy( &(this->controller[i]), &(this->st_controller), sizeof(controller_manager_msgs::ControllerStatistics)); + } + return offset; + } + + const char * getType(){ return "controller_manager_msgs/ControllersStatistics"; }; + const char * getMD5(){ return "a154c347736773e3700d1719105df29d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/controller_manager_msgs/HardwareInterfaceResources.h b/source/ros-max-lib/ros_lib/controller_manager_msgs/HardwareInterfaceResources.h new file mode 100644 index 0000000000000000000000000000000000000000..5b574c1da509a5681fd58c280565062562012911 --- /dev/null +++ b/source/ros-max-lib/ros_lib/controller_manager_msgs/HardwareInterfaceResources.h @@ -0,0 +1,92 @@ +#ifndef _ROS_controller_manager_msgs_HardwareInterfaceResources_h +#define _ROS_controller_manager_msgs_HardwareInterfaceResources_h + +#include +#include +#include +#include "ros/msg.h" + +namespace controller_manager_msgs +{ + + class HardwareInterfaceResources : public ros::Msg + { + public: + typedef const char* _hardware_interface_type; + _hardware_interface_type hardware_interface; + uint32_t resources_length; + typedef char* _resources_type; + _resources_type st_resources; + _resources_type * resources; + + HardwareInterfaceResources(): + hardware_interface(""), + resources_length(0), resources(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_hardware_interface = strlen(this->hardware_interface); + varToArr(outbuffer + offset, length_hardware_interface); + offset += 4; + memcpy(outbuffer + offset, this->hardware_interface, length_hardware_interface); + offset += length_hardware_interface; + *(outbuffer + offset + 0) = (this->resources_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->resources_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->resources_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->resources_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->resources_length); + for( uint32_t i = 0; i < resources_length; i++){ + uint32_t length_resourcesi = strlen(this->resources[i]); + varToArr(outbuffer + offset, length_resourcesi); + offset += 4; + memcpy(outbuffer + offset, this->resources[i], length_resourcesi); + offset += length_resourcesi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_hardware_interface; + arrToVar(length_hardware_interface, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_hardware_interface; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_hardware_interface-1]=0; + this->hardware_interface = (char *)(inbuffer + offset-1); + offset += length_hardware_interface; + uint32_t resources_lengthT = ((uint32_t) (*(inbuffer + offset))); + resources_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + resources_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + resources_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->resources_length); + if(resources_lengthT > resources_length) + this->resources = (char**)realloc(this->resources, resources_lengthT * sizeof(char*)); + resources_length = resources_lengthT; + for( uint32_t i = 0; i < resources_length; i++){ + uint32_t length_st_resources; + arrToVar(length_st_resources, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_resources; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_resources-1]=0; + this->st_resources = (char *)(inbuffer + offset-1); + offset += length_st_resources; + memcpy( &(this->resources[i]), &(this->st_resources), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return "controller_manager_msgs/HardwareInterfaceResources"; }; + const char * getMD5(){ return "f25b55cbf1d1f76e82e5ec9e83f76258"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/controller_manager_msgs/ListControllerTypes.h b/source/ros-max-lib/ros_lib/controller_manager_msgs/ListControllerTypes.h new file mode 100644 index 0000000000000000000000000000000000000000..45097f8fb0edb45459f200dde5f30a8953574cbc --- /dev/null +++ b/source/ros-max-lib/ros_lib/controller_manager_msgs/ListControllerTypes.h @@ -0,0 +1,144 @@ +#ifndef _ROS_SERVICE_ListControllerTypes_h +#define _ROS_SERVICE_ListControllerTypes_h +#include +#include +#include +#include "ros/msg.h" + +namespace controller_manager_msgs +{ + +static const char LISTCONTROLLERTYPES[] = "controller_manager_msgs/ListControllerTypes"; + + class ListControllerTypesRequest : public ros::Msg + { + public: + + ListControllerTypesRequest() + { + } + + 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 LISTCONTROLLERTYPES; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class ListControllerTypesResponse : public ros::Msg + { + public: + uint32_t types_length; + typedef char* _types_type; + _types_type st_types; + _types_type * types; + uint32_t base_classes_length; + typedef char* _base_classes_type; + _base_classes_type st_base_classes; + _base_classes_type * base_classes; + + ListControllerTypesResponse(): + types_length(0), types(NULL), + base_classes_length(0), base_classes(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->types_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->types_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->types_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->types_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->types_length); + for( uint32_t i = 0; i < types_length; i++){ + uint32_t length_typesi = strlen(this->types[i]); + varToArr(outbuffer + offset, length_typesi); + offset += 4; + memcpy(outbuffer + offset, this->types[i], length_typesi); + offset += length_typesi; + } + *(outbuffer + offset + 0) = (this->base_classes_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->base_classes_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->base_classes_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->base_classes_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->base_classes_length); + for( uint32_t i = 0; i < base_classes_length; i++){ + uint32_t length_base_classesi = strlen(this->base_classes[i]); + varToArr(outbuffer + offset, length_base_classesi); + offset += 4; + memcpy(outbuffer + offset, this->base_classes[i], length_base_classesi); + offset += length_base_classesi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t types_lengthT = ((uint32_t) (*(inbuffer + offset))); + types_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + types_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + types_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->types_length); + if(types_lengthT > types_length) + this->types = (char**)realloc(this->types, types_lengthT * sizeof(char*)); + types_length = types_lengthT; + for( uint32_t i = 0; i < types_length; i++){ + uint32_t length_st_types; + arrToVar(length_st_types, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_types; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_types-1]=0; + this->st_types = (char *)(inbuffer + offset-1); + offset += length_st_types; + memcpy( &(this->types[i]), &(this->st_types), sizeof(char*)); + } + uint32_t base_classes_lengthT = ((uint32_t) (*(inbuffer + offset))); + base_classes_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + base_classes_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + base_classes_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->base_classes_length); + if(base_classes_lengthT > base_classes_length) + this->base_classes = (char**)realloc(this->base_classes, base_classes_lengthT * sizeof(char*)); + base_classes_length = base_classes_lengthT; + for( uint32_t i = 0; i < base_classes_length; i++){ + uint32_t length_st_base_classes; + arrToVar(length_st_base_classes, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_base_classes; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_base_classes-1]=0; + this->st_base_classes = (char *)(inbuffer + offset-1); + offset += length_st_base_classes; + memcpy( &(this->base_classes[i]), &(this->st_base_classes), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return LISTCONTROLLERTYPES; }; + const char * getMD5(){ return "c1d4cd11aefa9f97ba4aeb5b33987f4e"; }; + + }; + + class ListControllerTypes { + public: + typedef ListControllerTypesRequest Request; + typedef ListControllerTypesResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/controller_manager_msgs/ListControllers.h b/source/ros-max-lib/ros_lib/controller_manager_msgs/ListControllers.h new file mode 100644 index 0000000000000000000000000000000000000000..f0d2a5efca596c0a91d564dcfb86aa206be4e03b --- /dev/null +++ b/source/ros-max-lib/ros_lib/controller_manager_msgs/ListControllers.h @@ -0,0 +1,96 @@ +#ifndef _ROS_SERVICE_ListControllers_h +#define _ROS_SERVICE_ListControllers_h +#include +#include +#include +#include "ros/msg.h" +#include "controller_manager_msgs/ControllerState.h" + +namespace controller_manager_msgs +{ + +static const char LISTCONTROLLERS[] = "controller_manager_msgs/ListControllers"; + + class ListControllersRequest : public ros::Msg + { + public: + + ListControllersRequest() + { + } + + 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 LISTCONTROLLERS; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class ListControllersResponse : public ros::Msg + { + public: + uint32_t controller_length; + typedef controller_manager_msgs::ControllerState _controller_type; + _controller_type st_controller; + _controller_type * controller; + + ListControllersResponse(): + controller_length(0), controller(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->controller_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->controller_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->controller_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->controller_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->controller_length); + for( uint32_t i = 0; i < controller_length; i++){ + offset += this->controller[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t controller_lengthT = ((uint32_t) (*(inbuffer + offset))); + controller_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + controller_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + controller_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->controller_length); + if(controller_lengthT > controller_length) + this->controller = (controller_manager_msgs::ControllerState*)realloc(this->controller, controller_lengthT * sizeof(controller_manager_msgs::ControllerState)); + controller_length = controller_lengthT; + for( uint32_t i = 0; i < controller_length; i++){ + offset += this->st_controller.deserialize(inbuffer + offset); + memcpy( &(this->controller[i]), &(this->st_controller), sizeof(controller_manager_msgs::ControllerState)); + } + return offset; + } + + const char * getType(){ return LISTCONTROLLERS; }; + const char * getMD5(){ return "1341feb2e63fa791f855565d0da950d8"; }; + + }; + + class ListControllers { + public: + typedef ListControllersRequest Request; + typedef ListControllersResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/controller_manager_msgs/LoadController.h b/source/ros-max-lib/ros_lib/controller_manager_msgs/LoadController.h new file mode 100644 index 0000000000000000000000000000000000000000..98d018fb3e6515ba2fb3aa53a08343169defe531 --- /dev/null +++ b/source/ros-max-lib/ros_lib/controller_manager_msgs/LoadController.h @@ -0,0 +1,105 @@ +#ifndef _ROS_SERVICE_LoadController_h +#define _ROS_SERVICE_LoadController_h +#include +#include +#include +#include "ros/msg.h" + +namespace controller_manager_msgs +{ + +static const char LOADCONTROLLER[] = "controller_manager_msgs/LoadController"; + + class LoadControllerRequest : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + + LoadControllerRequest(): + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return LOADCONTROLLER; }; + const char * getMD5(){ return "c1f3d28f1b044c871e6eff2e9fc3c667"; }; + + }; + + class LoadControllerResponse : public ros::Msg + { + public: + typedef bool _ok_type; + _ok_type ok; + + LoadControllerResponse(): + ok(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.real = this->ok; + *(outbuffer + offset + 0) = (u_ok.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->ok); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.base = 0; + u_ok.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->ok = u_ok.real; + offset += sizeof(this->ok); + return offset; + } + + const char * getType(){ return LOADCONTROLLER; }; + const char * getMD5(){ return "6f6da3883749771fac40d6deb24a8c02"; }; + + }; + + class LoadController { + public: + typedef LoadControllerRequest Request; + typedef LoadControllerResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/controller_manager_msgs/ReloadControllerLibraries.h b/source/ros-max-lib/ros_lib/controller_manager_msgs/ReloadControllerLibraries.h new file mode 100644 index 0000000000000000000000000000000000000000..279de974c7966f891505acef7ce9e21204df538d --- /dev/null +++ b/source/ros-max-lib/ros_lib/controller_manager_msgs/ReloadControllerLibraries.h @@ -0,0 +1,106 @@ +#ifndef _ROS_SERVICE_ReloadControllerLibraries_h +#define _ROS_SERVICE_ReloadControllerLibraries_h +#include +#include +#include +#include "ros/msg.h" + +namespace controller_manager_msgs +{ + +static const char RELOADCONTROLLERLIBRARIES[] = "controller_manager_msgs/ReloadControllerLibraries"; + + class ReloadControllerLibrariesRequest : public ros::Msg + { + public: + typedef bool _force_kill_type; + _force_kill_type force_kill; + + ReloadControllerLibrariesRequest(): + force_kill(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_force_kill; + u_force_kill.real = this->force_kill; + *(outbuffer + offset + 0) = (u_force_kill.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->force_kill); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_force_kill; + u_force_kill.base = 0; + u_force_kill.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->force_kill = u_force_kill.real; + offset += sizeof(this->force_kill); + return offset; + } + + const char * getType(){ return RELOADCONTROLLERLIBRARIES; }; + const char * getMD5(){ return "18442b59be9479097f11c543bddbac62"; }; + + }; + + class ReloadControllerLibrariesResponse : public ros::Msg + { + public: + typedef bool _ok_type; + _ok_type ok; + + ReloadControllerLibrariesResponse(): + ok(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.real = this->ok; + *(outbuffer + offset + 0) = (u_ok.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->ok); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.base = 0; + u_ok.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->ok = u_ok.real; + offset += sizeof(this->ok); + return offset; + } + + const char * getType(){ return RELOADCONTROLLERLIBRARIES; }; + const char * getMD5(){ return "6f6da3883749771fac40d6deb24a8c02"; }; + + }; + + class ReloadControllerLibraries { + public: + typedef ReloadControllerLibrariesRequest Request; + typedef ReloadControllerLibrariesResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/controller_manager_msgs/SwitchController.h b/source/ros-max-lib/ros_lib/controller_manager_msgs/SwitchController.h new file mode 100644 index 0000000000000000000000000000000000000000..9b76c735448f113a0f8d3b2a636a7f3008015d31 --- /dev/null +++ b/source/ros-max-lib/ros_lib/controller_manager_msgs/SwitchController.h @@ -0,0 +1,188 @@ +#ifndef _ROS_SERVICE_SwitchController_h +#define _ROS_SERVICE_SwitchController_h +#include +#include +#include +#include "ros/msg.h" + +namespace controller_manager_msgs +{ + +static const char SWITCHCONTROLLER[] = "controller_manager_msgs/SwitchController"; + + class SwitchControllerRequest : public ros::Msg + { + public: + uint32_t start_controllers_length; + typedef char* _start_controllers_type; + _start_controllers_type st_start_controllers; + _start_controllers_type * start_controllers; + uint32_t stop_controllers_length; + typedef char* _stop_controllers_type; + _stop_controllers_type st_stop_controllers; + _stop_controllers_type * stop_controllers; + typedef int32_t _strictness_type; + _strictness_type strictness; + enum { BEST_EFFORT = 1 }; + enum { STRICT = 2 }; + + SwitchControllerRequest(): + start_controllers_length(0), start_controllers(NULL), + stop_controllers_length(0), stop_controllers(NULL), + strictness(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->start_controllers_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->start_controllers_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->start_controllers_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->start_controllers_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->start_controllers_length); + for( uint32_t i = 0; i < start_controllers_length; i++){ + uint32_t length_start_controllersi = strlen(this->start_controllers[i]); + varToArr(outbuffer + offset, length_start_controllersi); + offset += 4; + memcpy(outbuffer + offset, this->start_controllers[i], length_start_controllersi); + offset += length_start_controllersi; + } + *(outbuffer + offset + 0) = (this->stop_controllers_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stop_controllers_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stop_controllers_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stop_controllers_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->stop_controllers_length); + for( uint32_t i = 0; i < stop_controllers_length; i++){ + uint32_t length_stop_controllersi = strlen(this->stop_controllers[i]); + varToArr(outbuffer + offset, length_stop_controllersi); + offset += 4; + memcpy(outbuffer + offset, this->stop_controllers[i], length_stop_controllersi); + offset += length_stop_controllersi; + } + union { + int32_t real; + uint32_t base; + } u_strictness; + u_strictness.real = this->strictness; + *(outbuffer + offset + 0) = (u_strictness.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_strictness.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_strictness.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_strictness.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->strictness); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t start_controllers_lengthT = ((uint32_t) (*(inbuffer + offset))); + start_controllers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + start_controllers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + start_controllers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->start_controllers_length); + if(start_controllers_lengthT > start_controllers_length) + this->start_controllers = (char**)realloc(this->start_controllers, start_controllers_lengthT * sizeof(char*)); + start_controllers_length = start_controllers_lengthT; + for( uint32_t i = 0; i < start_controllers_length; i++){ + uint32_t length_st_start_controllers; + arrToVar(length_st_start_controllers, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_start_controllers; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_start_controllers-1]=0; + this->st_start_controllers = (char *)(inbuffer + offset-1); + offset += length_st_start_controllers; + memcpy( &(this->start_controllers[i]), &(this->st_start_controllers), sizeof(char*)); + } + uint32_t stop_controllers_lengthT = ((uint32_t) (*(inbuffer + offset))); + stop_controllers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + stop_controllers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + stop_controllers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stop_controllers_length); + if(stop_controllers_lengthT > stop_controllers_length) + this->stop_controllers = (char**)realloc(this->stop_controllers, stop_controllers_lengthT * sizeof(char*)); + stop_controllers_length = stop_controllers_lengthT; + for( uint32_t i = 0; i < stop_controllers_length; i++){ + uint32_t length_st_stop_controllers; + arrToVar(length_st_stop_controllers, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_stop_controllers; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_stop_controllers-1]=0; + this->st_stop_controllers = (char *)(inbuffer + offset-1); + offset += length_st_stop_controllers; + memcpy( &(this->stop_controllers[i]), &(this->st_stop_controllers), sizeof(char*)); + } + union { + int32_t real; + uint32_t base; + } u_strictness; + u_strictness.base = 0; + u_strictness.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_strictness.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_strictness.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_strictness.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->strictness = u_strictness.real; + offset += sizeof(this->strictness); + return offset; + } + + const char * getType(){ return SWITCHCONTROLLER; }; + const char * getMD5(){ return "434da54adc434a5af5743ed711fd6ba1"; }; + + }; + + class SwitchControllerResponse : public ros::Msg + { + public: + typedef bool _ok_type; + _ok_type ok; + + SwitchControllerResponse(): + ok(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.real = this->ok; + *(outbuffer + offset + 0) = (u_ok.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->ok); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.base = 0; + u_ok.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->ok = u_ok.real; + offset += sizeof(this->ok); + return offset; + } + + const char * getType(){ return SWITCHCONTROLLER; }; + const char * getMD5(){ return "6f6da3883749771fac40d6deb24a8c02"; }; + + }; + + class SwitchController { + public: + typedef SwitchControllerRequest Request; + typedef SwitchControllerResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/controller_manager_msgs/UnloadController.h b/source/ros-max-lib/ros_lib/controller_manager_msgs/UnloadController.h new file mode 100644 index 0000000000000000000000000000000000000000..b8bba744f9b1ddcd19d2a600ee7cb7b4030a74b5 --- /dev/null +++ b/source/ros-max-lib/ros_lib/controller_manager_msgs/UnloadController.h @@ -0,0 +1,105 @@ +#ifndef _ROS_SERVICE_UnloadController_h +#define _ROS_SERVICE_UnloadController_h +#include +#include +#include +#include "ros/msg.h" + +namespace controller_manager_msgs +{ + +static const char UNLOADCONTROLLER[] = "controller_manager_msgs/UnloadController"; + + class UnloadControllerRequest : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + + UnloadControllerRequest(): + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return UNLOADCONTROLLER; }; + const char * getMD5(){ return "c1f3d28f1b044c871e6eff2e9fc3c667"; }; + + }; + + class UnloadControllerResponse : public ros::Msg + { + public: + typedef bool _ok_type; + _ok_type ok; + + UnloadControllerResponse(): + ok(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.real = this->ok; + *(outbuffer + offset + 0) = (u_ok.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->ok); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_ok; + u_ok.base = 0; + u_ok.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->ok = u_ok.real; + offset += sizeof(this->ok); + return offset; + } + + const char * getType(){ return UNLOADCONTROLLER; }; + const char * getMD5(){ return "6f6da3883749771fac40d6deb24a8c02"; }; + + }; + + class UnloadController { + public: + typedef UnloadControllerRequest Request; + typedef UnloadControllerResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/costmap_2d/VoxelGrid.h b/source/ros-max-lib/ros_lib/costmap_2d/VoxelGrid.h new file mode 100644 index 0000000000000000000000000000000000000000..2fa9dce9373f65674a226786c4e49073b15898fa --- /dev/null +++ b/source/ros-max-lib/ros_lib/costmap_2d/VoxelGrid.h @@ -0,0 +1,128 @@ +#ifndef _ROS_costmap_2d_VoxelGrid_h +#define _ROS_costmap_2d_VoxelGrid_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Point32.h" +#include "geometry_msgs/Vector3.h" + +namespace costmap_2d +{ + + class VoxelGrid : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t data_length; + typedef uint32_t _data_type; + _data_type st_data; + _data_type * data; + typedef geometry_msgs::Point32 _origin_type; + _origin_type origin; + typedef geometry_msgs::Vector3 _resolutions_type; + _resolutions_type resolutions; + typedef uint32_t _size_x_type; + _size_x_type size_x; + typedef uint32_t _size_y_type; + _size_y_type size_y; + typedef uint32_t _size_z_type; + _size_z_type size_z; + + VoxelGrid(): + header(), + data_length(0), data(NULL), + origin(), + resolutions(), + size_x(0), + size_y(0), + size_z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data[i] >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data[i] >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data[i] >> (8 * 3)) & 0xFF; + offset += sizeof(this->data[i]); + } + offset += this->origin.serialize(outbuffer + offset); + offset += this->resolutions.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->size_x >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->size_x >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->size_x >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->size_x >> (8 * 3)) & 0xFF; + offset += sizeof(this->size_x); + *(outbuffer + offset + 0) = (this->size_y >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->size_y >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->size_y >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->size_y >> (8 * 3)) & 0xFF; + offset += sizeof(this->size_y); + *(outbuffer + offset + 0) = (this->size_z >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->size_z >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->size_z >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->size_z >> (8 * 3)) & 0xFF; + offset += sizeof(this->size_z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint32_t*)realloc(this->data, data_lengthT * sizeof(uint32_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint32_t) (*(inbuffer + offset))); + this->st_data |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->st_data |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->st_data |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint32_t)); + } + offset += this->origin.deserialize(inbuffer + offset); + offset += this->resolutions.deserialize(inbuffer + offset); + this->size_x = ((uint32_t) (*(inbuffer + offset))); + this->size_x |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->size_x |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->size_x |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->size_x); + this->size_y = ((uint32_t) (*(inbuffer + offset))); + this->size_y |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->size_y |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->size_y |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->size_y); + this->size_z = ((uint32_t) (*(inbuffer + offset))); + this->size_z |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->size_z |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->size_z |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->size_z); + return offset; + } + + const char * getType(){ return "costmap_2d/VoxelGrid"; }; + const char * getMD5(){ return "48a040827e1322073d78ece5a497029c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/diagnostic_msgs/AddDiagnostics.h b/source/ros-max-lib/ros_lib/diagnostic_msgs/AddDiagnostics.h new file mode 100644 index 0000000000000000000000000000000000000000..4180098fdab258ea2b6702ab40c39ee263fe8372 --- /dev/null +++ b/source/ros-max-lib/ros_lib/diagnostic_msgs/AddDiagnostics.h @@ -0,0 +1,122 @@ +#ifndef _ROS_SERVICE_AddDiagnostics_h +#define _ROS_SERVICE_AddDiagnostics_h +#include +#include +#include +#include "ros/msg.h" + +namespace diagnostic_msgs +{ + +static const char ADDDIAGNOSTICS[] = "diagnostic_msgs/AddDiagnostics"; + + class AddDiagnosticsRequest : public ros::Msg + { + public: + typedef const char* _load_namespace_type; + _load_namespace_type load_namespace; + + AddDiagnosticsRequest(): + load_namespace("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_load_namespace = strlen(this->load_namespace); + varToArr(outbuffer + offset, length_load_namespace); + offset += 4; + memcpy(outbuffer + offset, this->load_namespace, length_load_namespace); + offset += length_load_namespace; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_load_namespace; + arrToVar(length_load_namespace, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_load_namespace; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_load_namespace-1]=0; + this->load_namespace = (char *)(inbuffer + offset-1); + offset += length_load_namespace; + return offset; + } + + const char * getType(){ return ADDDIAGNOSTICS; }; + const char * getMD5(){ return "c26cf6e164288fbc6050d74f838bcdf0"; }; + + }; + + class AddDiagnosticsResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _message_type; + _message_type message; + + AddDiagnosticsResponse(): + success(0), + message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_message = strlen(this->message); + varToArr(outbuffer + offset, length_message); + offset += 4; + memcpy(outbuffer + offset, this->message, length_message); + offset += length_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_message; + arrToVar(length_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message-1]=0; + this->message = (char *)(inbuffer + offset-1); + offset += length_message; + return offset; + } + + const char * getType(){ return ADDDIAGNOSTICS; }; + const char * getMD5(){ return "937c9679a518e3a18d831e57125ea522"; }; + + }; + + class AddDiagnostics { + public: + typedef AddDiagnosticsRequest Request; + typedef AddDiagnosticsResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/diagnostic_msgs/DiagnosticArray.h b/source/ros-max-lib/ros_lib/diagnostic_msgs/DiagnosticArray.h new file mode 100644 index 0000000000000000000000000000000000000000..1deb7430badb176efcd39ebbd3265bc02d7fead8 --- /dev/null +++ b/source/ros-max-lib/ros_lib/diagnostic_msgs/DiagnosticArray.h @@ -0,0 +1,70 @@ +#ifndef _ROS_diagnostic_msgs_DiagnosticArray_h +#define _ROS_diagnostic_msgs_DiagnosticArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "diagnostic_msgs/DiagnosticStatus.h" + +namespace diagnostic_msgs +{ + + class DiagnosticArray : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t status_length; + typedef diagnostic_msgs::DiagnosticStatus _status_type; + _status_type st_status; + _status_type * status; + + DiagnosticArray(): + header(), + status_length(0), status(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->status_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->status_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->status_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->status_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->status_length); + for( uint32_t i = 0; i < status_length; i++){ + offset += this->status[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t status_lengthT = ((uint32_t) (*(inbuffer + offset))); + status_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + status_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + status_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->status_length); + if(status_lengthT > status_length) + this->status = (diagnostic_msgs::DiagnosticStatus*)realloc(this->status, status_lengthT * sizeof(diagnostic_msgs::DiagnosticStatus)); + status_length = status_lengthT; + for( uint32_t i = 0; i < status_length; i++){ + offset += this->st_status.deserialize(inbuffer + offset); + memcpy( &(this->status[i]), &(this->st_status), sizeof(diagnostic_msgs::DiagnosticStatus)); + } + return offset; + } + + const char * getType(){ return "diagnostic_msgs/DiagnosticArray"; }; + const char * getMD5(){ return "60810da900de1dd6ddd437c3503511da"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/diagnostic_msgs/DiagnosticStatus.h b/source/ros-max-lib/ros_lib/diagnostic_msgs/DiagnosticStatus.h new file mode 100644 index 0000000000000000000000000000000000000000..490c16337ff4d1ca2cc5d0bc7fd497bc0010e0a7 --- /dev/null +++ b/source/ros-max-lib/ros_lib/diagnostic_msgs/DiagnosticStatus.h @@ -0,0 +1,137 @@ +#ifndef _ROS_diagnostic_msgs_DiagnosticStatus_h +#define _ROS_diagnostic_msgs_DiagnosticStatus_h + +#include +#include +#include +#include "ros/msg.h" +#include "diagnostic_msgs/KeyValue.h" + +namespace diagnostic_msgs +{ + + class DiagnosticStatus : public ros::Msg + { + public: + typedef int8_t _level_type; + _level_type level; + typedef const char* _name_type; + _name_type name; + typedef const char* _message_type; + _message_type message; + typedef const char* _hardware_id_type; + _hardware_id_type hardware_id; + uint32_t values_length; + typedef diagnostic_msgs::KeyValue _values_type; + _values_type st_values; + _values_type * values; + enum { OK = 0 }; + enum { WARN = 1 }; + enum { ERROR = 2 }; + enum { STALE = 3 }; + + DiagnosticStatus(): + level(0), + name(""), + message(""), + hardware_id(""), + values_length(0), values(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_level; + u_level.real = this->level; + *(outbuffer + offset + 0) = (u_level.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->level); + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_message = strlen(this->message); + varToArr(outbuffer + offset, length_message); + offset += 4; + memcpy(outbuffer + offset, this->message, length_message); + offset += length_message; + uint32_t length_hardware_id = strlen(this->hardware_id); + varToArr(outbuffer + offset, length_hardware_id); + offset += 4; + memcpy(outbuffer + offset, this->hardware_id, length_hardware_id); + offset += length_hardware_id; + *(outbuffer + offset + 0) = (this->values_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->values_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->values_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->values_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->values_length); + for( uint32_t i = 0; i < values_length; i++){ + offset += this->values[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_level; + u_level.base = 0; + u_level.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->level = u_level.real; + offset += sizeof(this->level); + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_message; + arrToVar(length_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message-1]=0; + this->message = (char *)(inbuffer + offset-1); + offset += length_message; + uint32_t length_hardware_id; + arrToVar(length_hardware_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_hardware_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_hardware_id-1]=0; + this->hardware_id = (char *)(inbuffer + offset-1); + offset += length_hardware_id; + uint32_t values_lengthT = ((uint32_t) (*(inbuffer + offset))); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->values_length); + if(values_lengthT > values_length) + this->values = (diagnostic_msgs::KeyValue*)realloc(this->values, values_lengthT * sizeof(diagnostic_msgs::KeyValue)); + values_length = values_lengthT; + for( uint32_t i = 0; i < values_length; i++){ + offset += this->st_values.deserialize(inbuffer + offset); + memcpy( &(this->values[i]), &(this->st_values), sizeof(diagnostic_msgs::KeyValue)); + } + return offset; + } + + const char * getType(){ return "diagnostic_msgs/DiagnosticStatus"; }; + const char * getMD5(){ return "d0ce08bc6e5ba34c7754f563a9cabaf1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/diagnostic_msgs/KeyValue.h b/source/ros-max-lib/ros_lib/diagnostic_msgs/KeyValue.h new file mode 100644 index 0000000000000000000000000000000000000000..e94dd76ca667140b5d33d0c1ceffa3b2b774ca1f --- /dev/null +++ b/source/ros-max-lib/ros_lib/diagnostic_msgs/KeyValue.h @@ -0,0 +1,72 @@ +#ifndef _ROS_diagnostic_msgs_KeyValue_h +#define _ROS_diagnostic_msgs_KeyValue_h + +#include +#include +#include +#include "ros/msg.h" + +namespace diagnostic_msgs +{ + + class KeyValue : public ros::Msg + { + public: + typedef const char* _key_type; + _key_type key; + typedef const char* _value_type; + _value_type value; + + KeyValue(): + key(""), + value("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_key = strlen(this->key); + varToArr(outbuffer + offset, length_key); + offset += 4; + memcpy(outbuffer + offset, this->key, length_key); + offset += length_key; + uint32_t length_value = strlen(this->value); + varToArr(outbuffer + offset, length_value); + offset += 4; + memcpy(outbuffer + offset, this->value, length_value); + offset += length_value; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_key; + arrToVar(length_key, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_key; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_key-1]=0; + this->key = (char *)(inbuffer + offset-1); + offset += length_key; + uint32_t length_value; + arrToVar(length_value, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_value; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_value-1]=0; + this->value = (char *)(inbuffer + offset-1); + offset += length_value; + return offset; + } + + const char * getType(){ return "diagnostic_msgs/KeyValue"; }; + const char * getMD5(){ return "cf57fdc6617a881a88c16e768132149c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/diagnostic_msgs/SelfTest.h b/source/ros-max-lib/ros_lib/diagnostic_msgs/SelfTest.h new file mode 100644 index 0000000000000000000000000000000000000000..6687c6bea86789648733b0f1a1ff572b9b2b09db --- /dev/null +++ b/source/ros-max-lib/ros_lib/diagnostic_msgs/SelfTest.h @@ -0,0 +1,131 @@ +#ifndef _ROS_SERVICE_SelfTest_h +#define _ROS_SERVICE_SelfTest_h +#include +#include +#include +#include "ros/msg.h" +#include "diagnostic_msgs/DiagnosticStatus.h" + +namespace diagnostic_msgs +{ + +static const char SELFTEST[] = "diagnostic_msgs/SelfTest"; + + class SelfTestRequest : public ros::Msg + { + public: + + SelfTestRequest() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return SELFTEST; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class SelfTestResponse : public ros::Msg + { + public: + typedef const char* _id_type; + _id_type id; + typedef int8_t _passed_type; + _passed_type passed; + uint32_t status_length; + typedef diagnostic_msgs::DiagnosticStatus _status_type; + _status_type st_status; + _status_type * status; + + SelfTestResponse(): + id(""), + passed(0), + status_length(0), status(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_id = strlen(this->id); + varToArr(outbuffer + offset, length_id); + offset += 4; + memcpy(outbuffer + offset, this->id, length_id); + offset += length_id; + union { + int8_t real; + uint8_t base; + } u_passed; + u_passed.real = this->passed; + *(outbuffer + offset + 0) = (u_passed.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->passed); + *(outbuffer + offset + 0) = (this->status_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->status_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->status_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->status_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->status_length); + for( uint32_t i = 0; i < status_length; i++){ + offset += this->status[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_id; + arrToVar(length_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_id-1]=0; + this->id = (char *)(inbuffer + offset-1); + offset += length_id; + union { + int8_t real; + uint8_t base; + } u_passed; + u_passed.base = 0; + u_passed.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->passed = u_passed.real; + offset += sizeof(this->passed); + uint32_t status_lengthT = ((uint32_t) (*(inbuffer + offset))); + status_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + status_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + status_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->status_length); + if(status_lengthT > status_length) + this->status = (diagnostic_msgs::DiagnosticStatus*)realloc(this->status, status_lengthT * sizeof(diagnostic_msgs::DiagnosticStatus)); + status_length = status_lengthT; + for( uint32_t i = 0; i < status_length; i++){ + offset += this->st_status.deserialize(inbuffer + offset); + memcpy( &(this->status[i]), &(this->st_status), sizeof(diagnostic_msgs::DiagnosticStatus)); + } + return offset; + } + + const char * getType(){ return SELFTEST; }; + const char * getMD5(){ return "ac21b1bab7ab17546986536c22eb34e9"; }; + + }; + + class SelfTest { + public: + typedef SelfTestRequest Request; + typedef SelfTestResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/duration.cpp b/source/ros-max-lib/ros_lib/duration.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d2dfdd6f3f669a1c7712740c940bb64e7de2c4c4 --- /dev/null +++ b/source/ros-max-lib/ros_lib/duration.cpp @@ -0,0 +1,83 @@ +/* + * 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. + */ + +#include +#include "ros/duration.h" + +namespace ros +{ +void normalizeSecNSecSigned(int32_t &sec, int32_t &nsec) +{ + int32_t nsec_part = nsec; + int32_t sec_part = sec; + + while (nsec_part > 1000000000L) + { + nsec_part -= 1000000000L; + ++sec_part; + } + while (nsec_part < 0) + { + nsec_part += 1000000000L; + --sec_part; + } + sec = sec_part; + nsec = nsec_part; +} + +Duration& Duration::operator+=(const Duration &rhs) +{ + sec += rhs.sec; + nsec += rhs.nsec; + normalizeSecNSecSigned(sec, nsec); + return *this; +} + +Duration& Duration::operator-=(const Duration &rhs) +{ + sec += -rhs.sec; + nsec += -rhs.nsec; + normalizeSecNSecSigned(sec, nsec); + return *this; +} + +Duration& Duration::operator*=(double scale) +{ + sec *= scale; + nsec *= scale; + normalizeSecNSecSigned(sec, nsec); + return *this; +} + +} diff --git a/source/ros-max-lib/ros_lib/dynamic_reconfigure/BoolParameter.h b/source/ros-max-lib/ros_lib/dynamic_reconfigure/BoolParameter.h new file mode 100644 index 0000000000000000000000000000000000000000..902548616470ad81ad65b7bc2a79a1fa57342413 --- /dev/null +++ b/source/ros-max-lib/ros_lib/dynamic_reconfigure/BoolParameter.h @@ -0,0 +1,73 @@ +#ifndef _ROS_dynamic_reconfigure_BoolParameter_h +#define _ROS_dynamic_reconfigure_BoolParameter_h + +#include +#include +#include +#include "ros/msg.h" + +namespace dynamic_reconfigure +{ + + class BoolParameter : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef bool _value_type; + _value_type value; + + BoolParameter(): + name(""), + value(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + union { + bool real; + uint8_t base; + } u_value; + u_value.real = this->value; + *(outbuffer + offset + 0) = (u_value.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->value); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + union { + bool real; + uint8_t base; + } u_value; + u_value.base = 0; + u_value.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->value = u_value.real; + offset += sizeof(this->value); + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/BoolParameter"; }; + const char * getMD5(){ return "23f05028c1a699fb83e22401228c3a9e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/dynamic_reconfigure/Config.h b/source/ros-max-lib/ros_lib/dynamic_reconfigure/Config.h new file mode 100644 index 0000000000000000000000000000000000000000..e5aca14f64f064b82c96ced2e08df716ddaf575c --- /dev/null +++ b/source/ros-max-lib/ros_lib/dynamic_reconfigure/Config.h @@ -0,0 +1,168 @@ +#ifndef _ROS_dynamic_reconfigure_Config_h +#define _ROS_dynamic_reconfigure_Config_h + +#include +#include +#include +#include "ros/msg.h" +#include "dynamic_reconfigure/BoolParameter.h" +#include "dynamic_reconfigure/IntParameter.h" +#include "dynamic_reconfigure/StrParameter.h" +#include "dynamic_reconfigure/DoubleParameter.h" +#include "dynamic_reconfigure/GroupState.h" + +namespace dynamic_reconfigure +{ + + class Config : public ros::Msg + { + public: + uint32_t bools_length; + typedef dynamic_reconfigure::BoolParameter _bools_type; + _bools_type st_bools; + _bools_type * bools; + uint32_t ints_length; + typedef dynamic_reconfigure::IntParameter _ints_type; + _ints_type st_ints; + _ints_type * ints; + uint32_t strs_length; + typedef dynamic_reconfigure::StrParameter _strs_type; + _strs_type st_strs; + _strs_type * strs; + uint32_t doubles_length; + typedef dynamic_reconfigure::DoubleParameter _doubles_type; + _doubles_type st_doubles; + _doubles_type * doubles; + uint32_t groups_length; + typedef dynamic_reconfigure::GroupState _groups_type; + _groups_type st_groups; + _groups_type * groups; + + Config(): + bools_length(0), bools(NULL), + ints_length(0), ints(NULL), + strs_length(0), strs(NULL), + doubles_length(0), doubles(NULL), + groups_length(0), groups(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->bools_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->bools_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->bools_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->bools_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->bools_length); + for( uint32_t i = 0; i < bools_length; i++){ + offset += this->bools[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->ints_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->ints_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->ints_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->ints_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->ints_length); + for( uint32_t i = 0; i < ints_length; i++){ + offset += this->ints[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->strs_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->strs_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->strs_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->strs_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->strs_length); + for( uint32_t i = 0; i < strs_length; i++){ + offset += this->strs[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->doubles_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->doubles_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->doubles_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->doubles_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->doubles_length); + for( uint32_t i = 0; i < doubles_length; i++){ + offset += this->doubles[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->groups_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->groups_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->groups_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->groups_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->groups_length); + for( uint32_t i = 0; i < groups_length; i++){ + offset += this->groups[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t bools_lengthT = ((uint32_t) (*(inbuffer + offset))); + bools_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + bools_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + bools_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->bools_length); + if(bools_lengthT > bools_length) + this->bools = (dynamic_reconfigure::BoolParameter*)realloc(this->bools, bools_lengthT * sizeof(dynamic_reconfigure::BoolParameter)); + bools_length = bools_lengthT; + for( uint32_t i = 0; i < bools_length; i++){ + offset += this->st_bools.deserialize(inbuffer + offset); + memcpy( &(this->bools[i]), &(this->st_bools), sizeof(dynamic_reconfigure::BoolParameter)); + } + uint32_t ints_lengthT = ((uint32_t) (*(inbuffer + offset))); + ints_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + ints_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + ints_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->ints_length); + if(ints_lengthT > ints_length) + this->ints = (dynamic_reconfigure::IntParameter*)realloc(this->ints, ints_lengthT * sizeof(dynamic_reconfigure::IntParameter)); + ints_length = ints_lengthT; + for( uint32_t i = 0; i < ints_length; i++){ + offset += this->st_ints.deserialize(inbuffer + offset); + memcpy( &(this->ints[i]), &(this->st_ints), sizeof(dynamic_reconfigure::IntParameter)); + } + uint32_t strs_lengthT = ((uint32_t) (*(inbuffer + offset))); + strs_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + strs_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + strs_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->strs_length); + if(strs_lengthT > strs_length) + this->strs = (dynamic_reconfigure::StrParameter*)realloc(this->strs, strs_lengthT * sizeof(dynamic_reconfigure::StrParameter)); + strs_length = strs_lengthT; + for( uint32_t i = 0; i < strs_length; i++){ + offset += this->st_strs.deserialize(inbuffer + offset); + memcpy( &(this->strs[i]), &(this->st_strs), sizeof(dynamic_reconfigure::StrParameter)); + } + uint32_t doubles_lengthT = ((uint32_t) (*(inbuffer + offset))); + doubles_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + doubles_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + doubles_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->doubles_length); + if(doubles_lengthT > doubles_length) + this->doubles = (dynamic_reconfigure::DoubleParameter*)realloc(this->doubles, doubles_lengthT * sizeof(dynamic_reconfigure::DoubleParameter)); + doubles_length = doubles_lengthT; + for( uint32_t i = 0; i < doubles_length; i++){ + offset += this->st_doubles.deserialize(inbuffer + offset); + memcpy( &(this->doubles[i]), &(this->st_doubles), sizeof(dynamic_reconfigure::DoubleParameter)); + } + uint32_t groups_lengthT = ((uint32_t) (*(inbuffer + offset))); + groups_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + groups_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + groups_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->groups_length); + if(groups_lengthT > groups_length) + this->groups = (dynamic_reconfigure::GroupState*)realloc(this->groups, groups_lengthT * sizeof(dynamic_reconfigure::GroupState)); + groups_length = groups_lengthT; + for( uint32_t i = 0; i < groups_length; i++){ + offset += this->st_groups.deserialize(inbuffer + offset); + memcpy( &(this->groups[i]), &(this->st_groups), sizeof(dynamic_reconfigure::GroupState)); + } + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/Config"; }; + const char * getMD5(){ return "958f16a05573709014982821e6822580"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/dynamic_reconfigure/ConfigDescription.h b/source/ros-max-lib/ros_lib/dynamic_reconfigure/ConfigDescription.h new file mode 100644 index 0000000000000000000000000000000000000000..4563bb7e6d4f692f5f21e30bc1905674d3e6f538 --- /dev/null +++ b/source/ros-max-lib/ros_lib/dynamic_reconfigure/ConfigDescription.h @@ -0,0 +1,80 @@ +#ifndef _ROS_dynamic_reconfigure_ConfigDescription_h +#define _ROS_dynamic_reconfigure_ConfigDescription_h + +#include +#include +#include +#include "ros/msg.h" +#include "dynamic_reconfigure/Group.h" +#include "dynamic_reconfigure/Config.h" + +namespace dynamic_reconfigure +{ + + class ConfigDescription : public ros::Msg + { + public: + uint32_t groups_length; + typedef dynamic_reconfigure::Group _groups_type; + _groups_type st_groups; + _groups_type * groups; + typedef dynamic_reconfigure::Config _max_type; + _max_type max; + typedef dynamic_reconfigure::Config _min_type; + _min_type min; + typedef dynamic_reconfigure::Config _dflt_type; + _dflt_type dflt; + + ConfigDescription(): + groups_length(0), groups(NULL), + max(), + min(), + dflt() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->groups_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->groups_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->groups_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->groups_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->groups_length); + for( uint32_t i = 0; i < groups_length; i++){ + offset += this->groups[i].serialize(outbuffer + offset); + } + offset += this->max.serialize(outbuffer + offset); + offset += this->min.serialize(outbuffer + offset); + offset += this->dflt.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t groups_lengthT = ((uint32_t) (*(inbuffer + offset))); + groups_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + groups_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + groups_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->groups_length); + if(groups_lengthT > groups_length) + this->groups = (dynamic_reconfigure::Group*)realloc(this->groups, groups_lengthT * sizeof(dynamic_reconfigure::Group)); + groups_length = groups_lengthT; + for( uint32_t i = 0; i < groups_length; i++){ + offset += this->st_groups.deserialize(inbuffer + offset); + memcpy( &(this->groups[i]), &(this->st_groups), sizeof(dynamic_reconfigure::Group)); + } + offset += this->max.deserialize(inbuffer + offset); + offset += this->min.deserialize(inbuffer + offset); + offset += this->dflt.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/ConfigDescription"; }; + const char * getMD5(){ return "757ce9d44ba8ddd801bb30bc456f946f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/dynamic_reconfigure/DoubleParameter.h b/source/ros-max-lib/ros_lib/dynamic_reconfigure/DoubleParameter.h new file mode 100644 index 0000000000000000000000000000000000000000..6f62e20fc2d12ab6dbcb306cad72dad51840b36f --- /dev/null +++ b/source/ros-max-lib/ros_lib/dynamic_reconfigure/DoubleParameter.h @@ -0,0 +1,87 @@ +#ifndef _ROS_dynamic_reconfigure_DoubleParameter_h +#define _ROS_dynamic_reconfigure_DoubleParameter_h + +#include +#include +#include +#include "ros/msg.h" + +namespace dynamic_reconfigure +{ + + class DoubleParameter : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef double _value_type; + _value_type value; + + DoubleParameter(): + name(""), + value(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + union { + double real; + uint64_t base; + } u_value; + u_value.real = this->value; + *(outbuffer + offset + 0) = (u_value.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_value.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_value.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_value.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_value.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_value.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_value.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_value.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->value); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + union { + double real; + uint64_t base; + } u_value; + u_value.base = 0; + u_value.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_value.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_value.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_value.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_value.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_value.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_value.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_value.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->value = u_value.real; + offset += sizeof(this->value); + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/DoubleParameter"; }; + const char * getMD5(){ return "d8512f27253c0f65f928a67c329cd658"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/dynamic_reconfigure/Group.h b/source/ros-max-lib/ros_lib/dynamic_reconfigure/Group.h new file mode 100644 index 0000000000000000000000000000000000000000..6f116acbe3aebe2dee140a1e5cee49ecd2974da1 --- /dev/null +++ b/source/ros-max-lib/ros_lib/dynamic_reconfigure/Group.h @@ -0,0 +1,146 @@ +#ifndef _ROS_dynamic_reconfigure_Group_h +#define _ROS_dynamic_reconfigure_Group_h + +#include +#include +#include +#include "ros/msg.h" +#include "dynamic_reconfigure/ParamDescription.h" + +namespace dynamic_reconfigure +{ + + class Group : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _type_type; + _type_type type; + uint32_t parameters_length; + typedef dynamic_reconfigure::ParamDescription _parameters_type; + _parameters_type st_parameters; + _parameters_type * parameters; + typedef int32_t _parent_type; + _parent_type parent; + typedef int32_t _id_type; + _id_type id; + + Group(): + name(""), + type(""), + parameters_length(0), parameters(NULL), + parent(0), + id(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_type = strlen(this->type); + varToArr(outbuffer + offset, length_type); + offset += 4; + memcpy(outbuffer + offset, this->type, length_type); + offset += length_type; + *(outbuffer + offset + 0) = (this->parameters_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->parameters_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->parameters_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->parameters_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->parameters_length); + for( uint32_t i = 0; i < parameters_length; i++){ + offset += this->parameters[i].serialize(outbuffer + offset); + } + union { + int32_t real; + uint32_t base; + } u_parent; + u_parent.real = this->parent; + *(outbuffer + offset + 0) = (u_parent.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_parent.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_parent.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_parent.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->parent); + union { + int32_t real; + uint32_t base; + } u_id; + u_id.real = this->id; + *(outbuffer + offset + 0) = (u_id.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_id.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_id.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_id.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->id); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_type; + arrToVar(length_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type-1]=0; + this->type = (char *)(inbuffer + offset-1); + offset += length_type; + uint32_t parameters_lengthT = ((uint32_t) (*(inbuffer + offset))); + parameters_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + parameters_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + parameters_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->parameters_length); + if(parameters_lengthT > parameters_length) + this->parameters = (dynamic_reconfigure::ParamDescription*)realloc(this->parameters, parameters_lengthT * sizeof(dynamic_reconfigure::ParamDescription)); + parameters_length = parameters_lengthT; + for( uint32_t i = 0; i < parameters_length; i++){ + offset += this->st_parameters.deserialize(inbuffer + offset); + memcpy( &(this->parameters[i]), &(this->st_parameters), sizeof(dynamic_reconfigure::ParamDescription)); + } + union { + int32_t real; + uint32_t base; + } u_parent; + u_parent.base = 0; + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->parent = u_parent.real; + offset += sizeof(this->parent); + union { + int32_t real; + uint32_t base; + } u_id; + u_id.base = 0; + u_id.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->id = u_id.real; + offset += sizeof(this->id); + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/Group"; }; + const char * getMD5(){ return "9e8cd9e9423c94823db3614dd8b1cf7a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/dynamic_reconfigure/GroupState.h b/source/ros-max-lib/ros_lib/dynamic_reconfigure/GroupState.h new file mode 100644 index 0000000000000000000000000000000000000000..7988eacd5109d754f8e3188be894d6cb31d81bf7 --- /dev/null +++ b/source/ros-max-lib/ros_lib/dynamic_reconfigure/GroupState.h @@ -0,0 +1,121 @@ +#ifndef _ROS_dynamic_reconfigure_GroupState_h +#define _ROS_dynamic_reconfigure_GroupState_h + +#include +#include +#include +#include "ros/msg.h" + +namespace dynamic_reconfigure +{ + + class GroupState : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef bool _state_type; + _state_type state; + typedef int32_t _id_type; + _id_type id; + typedef int32_t _parent_type; + _parent_type parent; + + GroupState(): + name(""), + state(0), + id(0), + parent(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + union { + bool real; + uint8_t base; + } u_state; + u_state.real = this->state; + *(outbuffer + offset + 0) = (u_state.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->state); + union { + int32_t real; + uint32_t base; + } u_id; + u_id.real = this->id; + *(outbuffer + offset + 0) = (u_id.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_id.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_id.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_id.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->id); + union { + int32_t real; + uint32_t base; + } u_parent; + u_parent.real = this->parent; + *(outbuffer + offset + 0) = (u_parent.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_parent.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_parent.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_parent.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->parent); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + union { + bool real; + uint8_t base; + } u_state; + u_state.base = 0; + u_state.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->state = u_state.real; + offset += sizeof(this->state); + union { + int32_t real; + uint32_t base; + } u_id; + u_id.base = 0; + u_id.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->id = u_id.real; + offset += sizeof(this->id); + union { + int32_t real; + uint32_t base; + } u_parent; + u_parent.base = 0; + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_parent.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->parent = u_parent.real; + offset += sizeof(this->parent); + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/GroupState"; }; + const char * getMD5(){ return "a2d87f51dc22930325041a2f8b1571f8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/dynamic_reconfigure/IntParameter.h b/source/ros-max-lib/ros_lib/dynamic_reconfigure/IntParameter.h new file mode 100644 index 0000000000000000000000000000000000000000..aab415807a89489816d4c0b2cb1792a4ff0c4f1a --- /dev/null +++ b/source/ros-max-lib/ros_lib/dynamic_reconfigure/IntParameter.h @@ -0,0 +1,79 @@ +#ifndef _ROS_dynamic_reconfigure_IntParameter_h +#define _ROS_dynamic_reconfigure_IntParameter_h + +#include +#include +#include +#include "ros/msg.h" + +namespace dynamic_reconfigure +{ + + class IntParameter : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef int32_t _value_type; + _value_type value; + + IntParameter(): + name(""), + value(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + union { + int32_t real; + uint32_t base; + } u_value; + u_value.real = this->value; + *(outbuffer + offset + 0) = (u_value.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_value.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_value.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_value.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->value); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + union { + int32_t real; + uint32_t base; + } u_value; + u_value.base = 0; + u_value.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_value.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_value.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_value.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->value = u_value.real; + offset += sizeof(this->value); + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/IntParameter"; }; + const char * getMD5(){ return "65fedc7a0cbfb8db035e46194a350bf1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/dynamic_reconfigure/ParamDescription.h b/source/ros-max-lib/ros_lib/dynamic_reconfigure/ParamDescription.h new file mode 100644 index 0000000000000000000000000000000000000000..00ac5ba79e5bd27e410baa7b60efc86f855997f0 --- /dev/null +++ b/source/ros-max-lib/ros_lib/dynamic_reconfigure/ParamDescription.h @@ -0,0 +1,119 @@ +#ifndef _ROS_dynamic_reconfigure_ParamDescription_h +#define _ROS_dynamic_reconfigure_ParamDescription_h + +#include +#include +#include +#include "ros/msg.h" + +namespace dynamic_reconfigure +{ + + class ParamDescription : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _type_type; + _type_type type; + typedef uint32_t _level_type; + _level_type level; + typedef const char* _description_type; + _description_type description; + typedef const char* _edit_method_type; + _edit_method_type edit_method; + + ParamDescription(): + name(""), + type(""), + level(0), + description(""), + edit_method("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_type = strlen(this->type); + varToArr(outbuffer + offset, length_type); + offset += 4; + memcpy(outbuffer + offset, this->type, length_type); + offset += length_type; + *(outbuffer + offset + 0) = (this->level >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->level >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->level >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->level >> (8 * 3)) & 0xFF; + offset += sizeof(this->level); + uint32_t length_description = strlen(this->description); + varToArr(outbuffer + offset, length_description); + offset += 4; + memcpy(outbuffer + offset, this->description, length_description); + offset += length_description; + uint32_t length_edit_method = strlen(this->edit_method); + varToArr(outbuffer + offset, length_edit_method); + offset += 4; + memcpy(outbuffer + offset, this->edit_method, length_edit_method); + offset += length_edit_method; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_type; + arrToVar(length_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type-1]=0; + this->type = (char *)(inbuffer + offset-1); + offset += length_type; + this->level = ((uint32_t) (*(inbuffer + offset))); + this->level |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->level |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->level |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->level); + uint32_t length_description; + arrToVar(length_description, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_description; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_description-1]=0; + this->description = (char *)(inbuffer + offset-1); + offset += length_description; + uint32_t length_edit_method; + arrToVar(length_edit_method, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_edit_method; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_edit_method-1]=0; + this->edit_method = (char *)(inbuffer + offset-1); + offset += length_edit_method; + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/ParamDescription"; }; + const char * getMD5(){ return "7434fcb9348c13054e0c3b267c8cb34d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/dynamic_reconfigure/Reconfigure.h b/source/ros-max-lib/ros_lib/dynamic_reconfigure/Reconfigure.h new file mode 100644 index 0000000000000000000000000000000000000000..e4e6b79b6a9ee136fece2ec1726cc358d0e63a19 --- /dev/null +++ b/source/ros-max-lib/ros_lib/dynamic_reconfigure/Reconfigure.h @@ -0,0 +1,81 @@ +#ifndef _ROS_SERVICE_Reconfigure_h +#define _ROS_SERVICE_Reconfigure_h +#include +#include +#include +#include "ros/msg.h" +#include "dynamic_reconfigure/Config.h" + +namespace dynamic_reconfigure +{ + +static const char RECONFIGURE[] = "dynamic_reconfigure/Reconfigure"; + + class ReconfigureRequest : public ros::Msg + { + public: + typedef dynamic_reconfigure::Config _config_type; + _config_type config; + + ReconfigureRequest(): + config() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->config.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->config.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return RECONFIGURE; }; + const char * getMD5(){ return "ac41a77620a4a0348b7001641796a8a1"; }; + + }; + + class ReconfigureResponse : public ros::Msg + { + public: + typedef dynamic_reconfigure::Config _config_type; + _config_type config; + + ReconfigureResponse(): + config() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->config.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->config.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return RECONFIGURE; }; + const char * getMD5(){ return "ac41a77620a4a0348b7001641796a8a1"; }; + + }; + + class Reconfigure { + public: + typedef ReconfigureRequest Request; + typedef ReconfigureResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/dynamic_reconfigure/SensorLevels.h b/source/ros-max-lib/ros_lib/dynamic_reconfigure/SensorLevels.h new file mode 100644 index 0000000000000000000000000000000000000000..8f85722eb104533806d61336418a60120f3fbe0f --- /dev/null +++ b/source/ros-max-lib/ros_lib/dynamic_reconfigure/SensorLevels.h @@ -0,0 +1,41 @@ +#ifndef _ROS_dynamic_reconfigure_SensorLevels_h +#define _ROS_dynamic_reconfigure_SensorLevels_h + +#include +#include +#include +#include "ros/msg.h" + +namespace dynamic_reconfigure +{ + + class SensorLevels : public ros::Msg + { + public: + enum { RECONFIGURE_CLOSE = 3 }; + enum { RECONFIGURE_STOP = 1 }; + enum { RECONFIGURE_RUNNING = 0 }; + + SensorLevels() + { + } + + 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 "dynamic_reconfigure/SensorLevels"; }; + const char * getMD5(){ return "6322637bee96d5489db6e2127c47602c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/dynamic_reconfigure/StrParameter.h b/source/ros-max-lib/ros_lib/dynamic_reconfigure/StrParameter.h new file mode 100644 index 0000000000000000000000000000000000000000..2e743f0346531a0d0948dd3dc0dd2d63d6976b29 --- /dev/null +++ b/source/ros-max-lib/ros_lib/dynamic_reconfigure/StrParameter.h @@ -0,0 +1,72 @@ +#ifndef _ROS_dynamic_reconfigure_StrParameter_h +#define _ROS_dynamic_reconfigure_StrParameter_h + +#include +#include +#include +#include "ros/msg.h" + +namespace dynamic_reconfigure +{ + + class StrParameter : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _value_type; + _value_type value; + + StrParameter(): + name(""), + value("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_value = strlen(this->value); + varToArr(outbuffer + offset, length_value); + offset += 4; + memcpy(outbuffer + offset, this->value, length_value); + offset += length_value; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_value; + arrToVar(length_value, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_value; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_value-1]=0; + this->value = (char *)(inbuffer + offset-1); + offset += length_value; + return offset; + } + + const char * getType(){ return "dynamic_reconfigure/StrParameter"; }; + const char * getMD5(){ return "bc6ccc4a57f61779c8eaae61e9f422e0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/embedded_linux_comms.c b/source/ros-max-lib/ros_lib/embedded_linux_comms.c new file mode 100644 index 0000000000000000000000000000000000000000..bde6e3776ca83f73433679dc51fc06219f4fde30 --- /dev/null +++ b/source/ros-max-lib/ros_lib/embedded_linux_comms.c @@ -0,0 +1,208 @@ +/* + * Software License Agreement (BSD License) + * + * Copyright (c) 2012, Paul Bouchier + * 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_EMBEDDED_LINUX_COMMS_H +#define ROS_EMBEDDED_LINUX_COMMS_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DEFAULT_PORTNUM 11411 + +void error(const char *msg) +{ + perror(msg); + exit(0); +} + +void set_nonblock(int socket) +{ + int flags; + flags = fcntl(socket, F_GETFL, 0); + assert(flags != -1); + fcntl(socket, F_SETFL, flags | O_NONBLOCK); +} + +int elCommInit(const char *portName, int baud) +{ + struct termios options; + int fd; + int sockfd; + struct sockaddr_in serv_addr; + struct hostent *server; + int rv; + + if (*portName == '/') // linux serial port names always begin with /dev + { + printf("Opening serial port %s\n", portName); + + fd = open(portName, O_RDWR | O_NOCTTY | O_NDELAY); + + if (fd == -1) + { + // Could not open the port. + perror("init(): Unable to open serial port - "); + } + else + { + // Sets the read() function to return NOW and not wait for data to enter + // buffer if there isn't anything there. + fcntl(fd, F_SETFL, FNDELAY); + + // Configure port for 8N1 transmission, 57600 baud, SW flow control. + tcgetattr(fd, &options); + cfsetispeed(&options, B57600); + cfsetospeed(&options, B57600); + options.c_cflag |= (CLOCAL | CREAD); + options.c_cflag &= ~PARENB; + options.c_cflag &= ~CSTOPB; + options.c_cflag &= ~CSIZE; + options.c_cflag |= CS8; + options.c_cflag &= ~CRTSCTS; + options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); + options.c_iflag &= ~(IXON | IXOFF | IXANY); + options.c_oflag &= ~OPOST; + + // Set the new options for the port "NOW" + tcsetattr(fd, TCSANOW, &options); + } + return fd; + } + else + { + // Split connection string into IP address and port. + const char* tcpPortNumString = strchr(portName, ':'); + long int tcpPortNum; + char ip[16]; + if (!tcpPortNumString) + { + tcpPortNum = DEFAULT_PORTNUM; + strncpy(ip, portName, 16); + } + else + { + tcpPortNum = strtol(tcpPortNumString + 1, NULL, 10); + strncpy(ip, portName, tcpPortNumString - portName); + } + + printf("Connecting to TCP server at %s:%ld....\n", ip, tcpPortNum); + + // Create the socket. + sockfd = socket(AF_INET, SOCK_STREAM, 0); + if (sockfd < 0) + { + error("ERROR opening socket"); + exit(-1); + } + + // Disable the Nagle (TCP No Delay) algorithm. + int flag = 1; + rv = setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(flag)); + if (rv == -1) + { + printf("Couldn't setsockopt(TCP_NODELAY)\n"); + exit(-1); + } + + // Connect to the server + server = gethostbyname(ip); + if (server == NULL) + { + fprintf(stderr, "ERROR, no such host\n"); + exit(0); + } + bzero((char *) &serv_addr, sizeof(serv_addr)); + serv_addr.sin_family = AF_INET; + bcopy((char *)server->h_addr, + (char *)&serv_addr.sin_addr.s_addr, + server->h_length); + serv_addr.sin_port = htons(tcpPortNum); + if (connect(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) + error("ERROR connecting"); + set_nonblock(sockfd); + printf("connected to server\n"); + return sockfd; + } + return -1; +} + +int elCommRead(int fd) +{ + unsigned char c; + unsigned int i; + int rv; + rv = read(fd, &c, 1); // read one byte + i = c; // convert byte to an int for return + if (rv > 0) + return i; // return the character read + if (rv < 0) + { + if ((errno != EAGAIN) && (errno != EWOULDBLOCK)) + perror("elCommRead() error:"); + } + + // return -1 or 0 either if we read nothing, or if read returned negative + return rv; +} + +int elCommWrite(int fd, uint8_t* data, int len) +{ + int rv = 0; + int length = len; + int totalsent = 0; + while (totalsent < length) + { + rv = write(fd, data + totalsent, length); + if (rv < 0) + perror("write(): error writing - trying again - "); + else + totalsent += rv; + } + return rv; +} + +#endif diff --git a/source/ros-max-lib/ros_lib/embedded_linux_hardware.h b/source/ros-max-lib/ros_lib/embedded_linux_hardware.h new file mode 100644 index 0000000000000000000000000000000000000000..fff1b462f088c376b3b2586e76831ada593d6267 --- /dev/null +++ b/source/ros-max-lib/ros_lib/embedded_linux_hardware.h @@ -0,0 +1,172 @@ +/* + * 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_EMBEDDED_LINUX_HARDWARE_H_ +#define ROS_EMBEDDED_LINUX_HARDWARE_H_ + +#include + +#ifdef BUILD_LIBROSSERIALEMBEDDEDLINUX +extern "C" int elCommInit(char *portName, int baud); +extern "C" int elCommRead(int fd); +extern "C" elCommWrite(int fd, uint8_t* data, int length); +#endif + +#ifdef __linux__ +#include +#endif + +// Includes necessary to support time on OS X. +#ifdef __MACH__ +#include +#include +static mach_timebase_info_data_t sTimebaseInfo; +#endif + +#define DEFAULT_PORT "/dev/ttyAM1" + +class EmbeddedLinuxHardware +{ +public: + EmbeddedLinuxHardware(const char *pn, long baud = 57600) + { + strncpy(portName, pn, 30); + baud_ = baud; + } + + EmbeddedLinuxHardware() + { + const char *envPortName = getenv("ROSSERIAL_PORT"); + if (envPortName == NULL) + strcpy(portName, DEFAULT_PORT); + else + strncpy(portName, envPortName, 29); + portName[29] = '\0'; // in case user gave us too long a port name + baud_ = 57600; + } + + void setBaud(long baud) + { + this->baud_ = baud; + } + + int getBaud() + { + return baud_; + } + + void init() + { + fd = elCommInit(portName, baud_); + if (fd < 0) + { + std::cout << "Exiting" << std::endl; + exit(-1); + } + std::cout << "EmbeddedHardware.h: opened serial port successfully\n"; + + initTime(); + } + + void init(const char *pName) + { + fd = elCommInit(pName, baud_); + if (fd < 0) + { + std::cout << "Exiting" << std::endl; + exit(-1); + } + std::cout << "EmbeddedHardware.h: opened comm port successfully\n"; + + initTime(); + } + + int read() + { + int c = elCommRead(fd); + return c; + } + + void write(uint8_t* data, int length) + { + elCommWrite(fd, data, length); + } + +#ifdef __linux__ + void initTime() + { + clock_gettime(CLOCK_MONOTONIC, &start); + } + + unsigned long time() + { + struct timespec end; + long seconds, nseconds; + + clock_gettime(CLOCK_MONOTONIC, &end); + + seconds = end.tv_sec - start.tv_sec; + nseconds = end.tv_nsec - start.tv_nsec; + + return ((seconds) * 1000 + nseconds / 1000000.0) + 0.5; + } + +#elif __MACH__ + void initTime() + { + start = mach_absolute_time(); + mach_timebase_info(&sTimebaseInfo); + } + + unsigned long time() + { + // See: https://developer.apple.com/library/mac/qa/qa1398/_index.html + uint64_t elapsed = mach_absolute_time() - start; + return elapsed * sTimebaseInfo.numer / (sTimebaseInfo.denom * 1000000); + } +#endif + +protected: + int fd; + char portName[30]; + long baud_; + +#ifdef __linux__ + struct timespec start; +#elif __MACH__ + uint64_t start; +#endif +}; + +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/ApplyBodyWrench.h b/source/ros-max-lib/ros_lib/gazebo_msgs/ApplyBodyWrench.h new file mode 100644 index 0000000000000000000000000000000000000000..e7af6bbb789592d719eb564ce4ad246a15968df7 --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/ApplyBodyWrench.h @@ -0,0 +1,199 @@ +#ifndef _ROS_SERVICE_ApplyBodyWrench_h +#define _ROS_SERVICE_ApplyBodyWrench_h +#include +#include +#include +#include "ros/msg.h" +#include "ros/duration.h" +#include "geometry_msgs/Wrench.h" +#include "ros/time.h" +#include "geometry_msgs/Point.h" + +namespace gazebo_msgs +{ + +static const char APPLYBODYWRENCH[] = "gazebo_msgs/ApplyBodyWrench"; + + class ApplyBodyWrenchRequest : public ros::Msg + { + public: + typedef const char* _body_name_type; + _body_name_type body_name; + typedef const char* _reference_frame_type; + _reference_frame_type reference_frame; + typedef geometry_msgs::Point _reference_point_type; + _reference_point_type reference_point; + typedef geometry_msgs::Wrench _wrench_type; + _wrench_type wrench; + typedef ros::Time _start_time_type; + _start_time_type start_time; + typedef ros::Duration _duration_type; + _duration_type duration; + + ApplyBodyWrenchRequest(): + body_name(""), + reference_frame(""), + reference_point(), + wrench(), + start_time(), + duration() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_body_name = strlen(this->body_name); + varToArr(outbuffer + offset, length_body_name); + offset += 4; + memcpy(outbuffer + offset, this->body_name, length_body_name); + offset += length_body_name; + uint32_t length_reference_frame = strlen(this->reference_frame); + varToArr(outbuffer + offset, length_reference_frame); + offset += 4; + memcpy(outbuffer + offset, this->reference_frame, length_reference_frame); + offset += length_reference_frame; + offset += this->reference_point.serialize(outbuffer + offset); + offset += this->wrench.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->start_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->start_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->start_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->start_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->start_time.sec); + *(outbuffer + offset + 0) = (this->start_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->start_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->start_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->start_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->start_time.nsec); + *(outbuffer + offset + 0) = (this->duration.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->duration.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->duration.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->duration.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->duration.sec); + *(outbuffer + offset + 0) = (this->duration.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->duration.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->duration.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->duration.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->duration.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_body_name; + arrToVar(length_body_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_body_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_body_name-1]=0; + this->body_name = (char *)(inbuffer + offset-1); + offset += length_body_name; + uint32_t length_reference_frame; + arrToVar(length_reference_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_reference_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_reference_frame-1]=0; + this->reference_frame = (char *)(inbuffer + offset-1); + offset += length_reference_frame; + offset += this->reference_point.deserialize(inbuffer + offset); + offset += this->wrench.deserialize(inbuffer + offset); + this->start_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->start_time.sec); + this->start_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->start_time.nsec); + this->duration.sec = ((uint32_t) (*(inbuffer + offset))); + this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->duration.sec); + this->duration.nsec = ((uint32_t) (*(inbuffer + offset))); + this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->duration.nsec); + return offset; + } + + const char * getType(){ return APPLYBODYWRENCH; }; + const char * getMD5(){ return "e37e6adf97eba5095baa77dffb71e5bd"; }; + + }; + + class ApplyBodyWrenchResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + ApplyBodyWrenchResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return APPLYBODYWRENCH; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class ApplyBodyWrench { + public: + typedef ApplyBodyWrenchRequest Request; + typedef ApplyBodyWrenchResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/ApplyJointEffort.h b/source/ros-max-lib/ros_lib/gazebo_msgs/ApplyJointEffort.h new file mode 100644 index 0000000000000000000000000000000000000000..636084fdbf4f32c068d8087772503b40063758a3 --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/ApplyJointEffort.h @@ -0,0 +1,202 @@ +#ifndef _ROS_SERVICE_ApplyJointEffort_h +#define _ROS_SERVICE_ApplyJointEffort_h +#include +#include +#include +#include "ros/msg.h" +#include "ros/duration.h" +#include "ros/time.h" + +namespace gazebo_msgs +{ + +static const char APPLYJOINTEFFORT[] = "gazebo_msgs/ApplyJointEffort"; + + class ApplyJointEffortRequest : public ros::Msg + { + public: + typedef const char* _joint_name_type; + _joint_name_type joint_name; + typedef double _effort_type; + _effort_type effort; + typedef ros::Time _start_time_type; + _start_time_type start_time; + typedef ros::Duration _duration_type; + _duration_type duration; + + ApplyJointEffortRequest(): + joint_name(""), + effort(0), + start_time(), + duration() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_joint_name = strlen(this->joint_name); + varToArr(outbuffer + offset, length_joint_name); + offset += 4; + memcpy(outbuffer + offset, this->joint_name, length_joint_name); + offset += length_joint_name; + union { + double real; + uint64_t base; + } u_effort; + u_effort.real = this->effort; + *(outbuffer + offset + 0) = (u_effort.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_effort.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_effort.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_effort.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_effort.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_effort.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_effort.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_effort.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->effort); + *(outbuffer + offset + 0) = (this->start_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->start_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->start_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->start_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->start_time.sec); + *(outbuffer + offset + 0) = (this->start_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->start_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->start_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->start_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->start_time.nsec); + *(outbuffer + offset + 0) = (this->duration.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->duration.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->duration.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->duration.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->duration.sec); + *(outbuffer + offset + 0) = (this->duration.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->duration.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->duration.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->duration.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->duration.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_joint_name; + arrToVar(length_joint_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_joint_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_joint_name-1]=0; + this->joint_name = (char *)(inbuffer + offset-1); + offset += length_joint_name; + union { + double real; + uint64_t base; + } u_effort; + u_effort.base = 0; + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_effort.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->effort = u_effort.real; + offset += sizeof(this->effort); + this->start_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->start_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->start_time.sec); + this->start_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->start_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->start_time.nsec); + this->duration.sec = ((uint32_t) (*(inbuffer + offset))); + this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->duration.sec); + this->duration.nsec = ((uint32_t) (*(inbuffer + offset))); + this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->duration.nsec); + return offset; + } + + const char * getType(){ return APPLYJOINTEFFORT; }; + const char * getMD5(){ return "2c3396ab9af67a509ecd2167a8fe41a2"; }; + + }; + + class ApplyJointEffortResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + ApplyJointEffortResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return APPLYJOINTEFFORT; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class ApplyJointEffort { + public: + typedef ApplyJointEffortRequest Request; + typedef ApplyJointEffortResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/BodyRequest.h b/source/ros-max-lib/ros_lib/gazebo_msgs/BodyRequest.h new file mode 100644 index 0000000000000000000000000000000000000000..bb2106d9c836e8b5e3e59fba9b6aee7f8f4cf023 --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/BodyRequest.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_BodyRequest_h +#define _ROS_SERVICE_BodyRequest_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char BODYREQUEST[] = "gazebo_msgs/BodyRequest"; + + class BodyRequestRequest : public ros::Msg + { + public: + typedef const char* _body_name_type; + _body_name_type body_name; + + BodyRequestRequest(): + body_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_body_name = strlen(this->body_name); + varToArr(outbuffer + offset, length_body_name); + offset += 4; + memcpy(outbuffer + offset, this->body_name, length_body_name); + offset += length_body_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_body_name; + arrToVar(length_body_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_body_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_body_name-1]=0; + this->body_name = (char *)(inbuffer + offset-1); + offset += length_body_name; + return offset; + } + + const char * getType(){ return BODYREQUEST; }; + const char * getMD5(){ return "5eade9afe7f232d78005bd0cafeab755"; }; + + }; + + class BodyRequestResponse : public ros::Msg + { + public: + + BodyRequestResponse() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return BODYREQUEST; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class BodyRequest { + public: + typedef BodyRequestRequest Request; + typedef BodyRequestResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/ContactState.h b/source/ros-max-lib/ros_lib/gazebo_msgs/ContactState.h new file mode 100644 index 0000000000000000000000000000000000000000..a3d852d889430da110c29dc463f6e54b6b0e5e3e --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/ContactState.h @@ -0,0 +1,223 @@ +#ifndef _ROS_gazebo_msgs_ContactState_h +#define _ROS_gazebo_msgs_ContactState_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Wrench.h" +#include "geometry_msgs/Vector3.h" + +namespace gazebo_msgs +{ + + class ContactState : public ros::Msg + { + public: + typedef const char* _info_type; + _info_type info; + typedef const char* _collision1_name_type; + _collision1_name_type collision1_name; + typedef const char* _collision2_name_type; + _collision2_name_type collision2_name; + uint32_t wrenches_length; + typedef geometry_msgs::Wrench _wrenches_type; + _wrenches_type st_wrenches; + _wrenches_type * wrenches; + typedef geometry_msgs::Wrench _total_wrench_type; + _total_wrench_type total_wrench; + uint32_t contact_positions_length; + typedef geometry_msgs::Vector3 _contact_positions_type; + _contact_positions_type st_contact_positions; + _contact_positions_type * contact_positions; + uint32_t contact_normals_length; + typedef geometry_msgs::Vector3 _contact_normals_type; + _contact_normals_type st_contact_normals; + _contact_normals_type * contact_normals; + uint32_t depths_length; + typedef double _depths_type; + _depths_type st_depths; + _depths_type * depths; + + ContactState(): + info(""), + collision1_name(""), + collision2_name(""), + wrenches_length(0), wrenches(NULL), + total_wrench(), + contact_positions_length(0), contact_positions(NULL), + contact_normals_length(0), contact_normals(NULL), + depths_length(0), depths(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_info = strlen(this->info); + varToArr(outbuffer + offset, length_info); + offset += 4; + memcpy(outbuffer + offset, this->info, length_info); + offset += length_info; + uint32_t length_collision1_name = strlen(this->collision1_name); + varToArr(outbuffer + offset, length_collision1_name); + offset += 4; + memcpy(outbuffer + offset, this->collision1_name, length_collision1_name); + offset += length_collision1_name; + uint32_t length_collision2_name = strlen(this->collision2_name); + varToArr(outbuffer + offset, length_collision2_name); + offset += 4; + memcpy(outbuffer + offset, this->collision2_name, length_collision2_name); + offset += length_collision2_name; + *(outbuffer + offset + 0) = (this->wrenches_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->wrenches_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->wrenches_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->wrenches_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->wrenches_length); + for( uint32_t i = 0; i < wrenches_length; i++){ + offset += this->wrenches[i].serialize(outbuffer + offset); + } + offset += this->total_wrench.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->contact_positions_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->contact_positions_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->contact_positions_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->contact_positions_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->contact_positions_length); + for( uint32_t i = 0; i < contact_positions_length; i++){ + offset += this->contact_positions[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->contact_normals_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->contact_normals_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->contact_normals_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->contact_normals_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->contact_normals_length); + for( uint32_t i = 0; i < contact_normals_length; i++){ + offset += this->contact_normals[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->depths_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->depths_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->depths_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->depths_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->depths_length); + for( uint32_t i = 0; i < depths_length; i++){ + union { + double real; + uint64_t base; + } u_depthsi; + u_depthsi.real = this->depths[i]; + *(outbuffer + offset + 0) = (u_depthsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_depthsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_depthsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_depthsi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_depthsi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_depthsi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_depthsi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_depthsi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->depths[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_info; + arrToVar(length_info, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_info; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_info-1]=0; + this->info = (char *)(inbuffer + offset-1); + offset += length_info; + uint32_t length_collision1_name; + arrToVar(length_collision1_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_collision1_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_collision1_name-1]=0; + this->collision1_name = (char *)(inbuffer + offset-1); + offset += length_collision1_name; + uint32_t length_collision2_name; + arrToVar(length_collision2_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_collision2_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_collision2_name-1]=0; + this->collision2_name = (char *)(inbuffer + offset-1); + offset += length_collision2_name; + uint32_t wrenches_lengthT = ((uint32_t) (*(inbuffer + offset))); + wrenches_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + wrenches_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + wrenches_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->wrenches_length); + if(wrenches_lengthT > wrenches_length) + this->wrenches = (geometry_msgs::Wrench*)realloc(this->wrenches, wrenches_lengthT * sizeof(geometry_msgs::Wrench)); + wrenches_length = wrenches_lengthT; + for( uint32_t i = 0; i < wrenches_length; i++){ + offset += this->st_wrenches.deserialize(inbuffer + offset); + memcpy( &(this->wrenches[i]), &(this->st_wrenches), sizeof(geometry_msgs::Wrench)); + } + offset += this->total_wrench.deserialize(inbuffer + offset); + uint32_t contact_positions_lengthT = ((uint32_t) (*(inbuffer + offset))); + contact_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + contact_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + contact_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->contact_positions_length); + if(contact_positions_lengthT > contact_positions_length) + this->contact_positions = (geometry_msgs::Vector3*)realloc(this->contact_positions, contact_positions_lengthT * sizeof(geometry_msgs::Vector3)); + contact_positions_length = contact_positions_lengthT; + for( uint32_t i = 0; i < contact_positions_length; i++){ + offset += this->st_contact_positions.deserialize(inbuffer + offset); + memcpy( &(this->contact_positions[i]), &(this->st_contact_positions), sizeof(geometry_msgs::Vector3)); + } + uint32_t contact_normals_lengthT = ((uint32_t) (*(inbuffer + offset))); + contact_normals_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + contact_normals_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + contact_normals_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->contact_normals_length); + if(contact_normals_lengthT > contact_normals_length) + this->contact_normals = (geometry_msgs::Vector3*)realloc(this->contact_normals, contact_normals_lengthT * sizeof(geometry_msgs::Vector3)); + contact_normals_length = contact_normals_lengthT; + for( uint32_t i = 0; i < contact_normals_length; i++){ + offset += this->st_contact_normals.deserialize(inbuffer + offset); + memcpy( &(this->contact_normals[i]), &(this->st_contact_normals), sizeof(geometry_msgs::Vector3)); + } + uint32_t depths_lengthT = ((uint32_t) (*(inbuffer + offset))); + depths_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + depths_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + depths_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->depths_length); + if(depths_lengthT > depths_length) + this->depths = (double*)realloc(this->depths, depths_lengthT * sizeof(double)); + depths_length = depths_lengthT; + for( uint32_t i = 0; i < depths_length; i++){ + union { + double real; + uint64_t base; + } u_st_depths; + u_st_depths.base = 0; + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_depths.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_depths = u_st_depths.real; + offset += sizeof(this->st_depths); + memcpy( &(this->depths[i]), &(this->st_depths), sizeof(double)); + } + return offset; + } + + const char * getType(){ return "gazebo_msgs/ContactState"; }; + const char * getMD5(){ return "48c0ffb054b8c444f870cecea1ee50d9"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/ContactsState.h b/source/ros-max-lib/ros_lib/gazebo_msgs/ContactsState.h new file mode 100644 index 0000000000000000000000000000000000000000..9af62c0236887b6eccde24e0194839a949971e06 --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/ContactsState.h @@ -0,0 +1,70 @@ +#ifndef _ROS_gazebo_msgs_ContactsState_h +#define _ROS_gazebo_msgs_ContactsState_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "gazebo_msgs/ContactState.h" + +namespace gazebo_msgs +{ + + class ContactsState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t states_length; + typedef gazebo_msgs::ContactState _states_type; + _states_type st_states; + _states_type * states; + + ContactsState(): + header(), + states_length(0), states(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->states_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->states_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->states_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->states_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->states_length); + for( uint32_t i = 0; i < states_length; i++){ + offset += this->states[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t states_lengthT = ((uint32_t) (*(inbuffer + offset))); + states_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + states_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + states_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->states_length); + if(states_lengthT > states_length) + this->states = (gazebo_msgs::ContactState*)realloc(this->states, states_lengthT * sizeof(gazebo_msgs::ContactState)); + states_length = states_lengthT; + for( uint32_t i = 0; i < states_length; i++){ + offset += this->st_states.deserialize(inbuffer + offset); + memcpy( &(this->states[i]), &(this->st_states), sizeof(gazebo_msgs::ContactState)); + } + return offset; + } + + const char * getType(){ return "gazebo_msgs/ContactsState"; }; + const char * getMD5(){ return "acbcb1601a8e525bf72509f18e6f668d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/DeleteLight.h b/source/ros-max-lib/ros_lib/gazebo_msgs/DeleteLight.h new file mode 100644 index 0000000000000000000000000000000000000000..54a9c5d84c9d82134892db1ce2f485b30c05e73a --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/DeleteLight.h @@ -0,0 +1,122 @@ +#ifndef _ROS_SERVICE_DeleteLight_h +#define _ROS_SERVICE_DeleteLight_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char DELETELIGHT[] = "gazebo_msgs/DeleteLight"; + + class DeleteLightRequest : public ros::Msg + { + public: + typedef const char* _light_name_type; + _light_name_type light_name; + + DeleteLightRequest(): + light_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_light_name = strlen(this->light_name); + varToArr(outbuffer + offset, length_light_name); + offset += 4; + memcpy(outbuffer + offset, this->light_name, length_light_name); + offset += length_light_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_light_name; + arrToVar(length_light_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_light_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_light_name-1]=0; + this->light_name = (char *)(inbuffer + offset-1); + offset += length_light_name; + return offset; + } + + const char * getType(){ return DELETELIGHT; }; + const char * getMD5(){ return "4fb676dfb4741fc866365702a859441c"; }; + + }; + + class DeleteLightResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + DeleteLightResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return DELETELIGHT; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class DeleteLight { + public: + typedef DeleteLightRequest Request; + typedef DeleteLightResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/DeleteModel.h b/source/ros-max-lib/ros_lib/gazebo_msgs/DeleteModel.h new file mode 100644 index 0000000000000000000000000000000000000000..00da12dc6f6bd7c40f0c2203308dfd8b568a01e6 --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/DeleteModel.h @@ -0,0 +1,122 @@ +#ifndef _ROS_SERVICE_DeleteModel_h +#define _ROS_SERVICE_DeleteModel_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char DELETEMODEL[] = "gazebo_msgs/DeleteModel"; + + class DeleteModelRequest : public ros::Msg + { + public: + typedef const char* _model_name_type; + _model_name_type model_name; + + DeleteModelRequest(): + model_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_model_name = strlen(this->model_name); + varToArr(outbuffer + offset, length_model_name); + offset += 4; + memcpy(outbuffer + offset, this->model_name, length_model_name); + offset += length_model_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_model_name; + arrToVar(length_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_name-1]=0; + this->model_name = (char *)(inbuffer + offset-1); + offset += length_model_name; + return offset; + } + + const char * getType(){ return DELETEMODEL; }; + const char * getMD5(){ return "ea31c8eab6fc401383cf528a7c0984ba"; }; + + }; + + class DeleteModelResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + DeleteModelResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return DELETEMODEL; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class DeleteModel { + public: + typedef DeleteModelRequest Request; + typedef DeleteModelResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/GetJointProperties.h b/source/ros-max-lib/ros_lib/gazebo_msgs/GetJointProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..6ad0fe916cd4b0cb385017204bb8deabbb27965c --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/GetJointProperties.h @@ -0,0 +1,291 @@ +#ifndef _ROS_SERVICE_GetJointProperties_h +#define _ROS_SERVICE_GetJointProperties_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char GETJOINTPROPERTIES[] = "gazebo_msgs/GetJointProperties"; + + class GetJointPropertiesRequest : public ros::Msg + { + public: + typedef const char* _joint_name_type; + _joint_name_type joint_name; + + GetJointPropertiesRequest(): + joint_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_joint_name = strlen(this->joint_name); + varToArr(outbuffer + offset, length_joint_name); + offset += 4; + memcpy(outbuffer + offset, this->joint_name, length_joint_name); + offset += length_joint_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_joint_name; + arrToVar(length_joint_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_joint_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_joint_name-1]=0; + this->joint_name = (char *)(inbuffer + offset-1); + offset += length_joint_name; + return offset; + } + + const char * getType(){ return GETJOINTPROPERTIES; }; + const char * getMD5(){ return "0be1351618e1dc030eb7959d9a4902de"; }; + + }; + + class GetJointPropertiesResponse : public ros::Msg + { + public: + typedef uint8_t _type_type; + _type_type type; + uint32_t damping_length; + typedef double _damping_type; + _damping_type st_damping; + _damping_type * damping; + uint32_t position_length; + typedef double _position_type; + _position_type st_position; + _position_type * position; + uint32_t rate_length; + typedef double _rate_type; + _rate_type st_rate; + _rate_type * rate; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + enum { REVOLUTE = 0 }; + enum { CONTINUOUS = 1 }; + enum { PRISMATIC = 2 }; + enum { FIXED = 3 }; + enum { BALL = 4 }; + enum { UNIVERSAL = 5 }; + + GetJointPropertiesResponse(): + type(0), + damping_length(0), damping(NULL), + position_length(0), position(NULL), + rate_length(0), rate(NULL), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->type >> (8 * 0)) & 0xFF; + offset += sizeof(this->type); + *(outbuffer + offset + 0) = (this->damping_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->damping_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->damping_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->damping_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->damping_length); + for( uint32_t i = 0; i < damping_length; i++){ + union { + double real; + uint64_t base; + } u_dampingi; + u_dampingi.real = this->damping[i]; + *(outbuffer + offset + 0) = (u_dampingi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_dampingi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_dampingi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_dampingi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_dampingi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_dampingi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_dampingi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_dampingi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->damping[i]); + } + *(outbuffer + offset + 0) = (this->position_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->position_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->position_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->position_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->position_length); + for( uint32_t i = 0; i < position_length; i++){ + union { + double real; + uint64_t base; + } u_positioni; + u_positioni.real = this->position[i]; + *(outbuffer + offset + 0) = (u_positioni.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_positioni.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_positioni.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_positioni.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_positioni.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_positioni.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_positioni.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_positioni.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position[i]); + } + *(outbuffer + offset + 0) = (this->rate_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->rate_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->rate_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->rate_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->rate_length); + for( uint32_t i = 0; i < rate_length; i++){ + union { + double real; + uint64_t base; + } u_ratei; + u_ratei.real = this->rate[i]; + *(outbuffer + offset + 0) = (u_ratei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ratei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ratei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ratei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ratei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ratei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ratei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ratei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->rate[i]); + } + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->type); + uint32_t damping_lengthT = ((uint32_t) (*(inbuffer + offset))); + damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->damping_length); + if(damping_lengthT > damping_length) + this->damping = (double*)realloc(this->damping, damping_lengthT * sizeof(double)); + damping_length = damping_lengthT; + for( uint32_t i = 0; i < damping_length; i++){ + union { + double real; + uint64_t base; + } u_st_damping; + u_st_damping.base = 0; + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_damping = u_st_damping.real; + offset += sizeof(this->st_damping); + memcpy( &(this->damping[i]), &(this->st_damping), sizeof(double)); + } + uint32_t position_lengthT = ((uint32_t) (*(inbuffer + offset))); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->position_length); + if(position_lengthT > position_length) + this->position = (double*)realloc(this->position, position_lengthT * sizeof(double)); + position_length = position_lengthT; + for( uint32_t i = 0; i < position_length; i++){ + union { + double real; + uint64_t base; + } u_st_position; + u_st_position.base = 0; + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_position = u_st_position.real; + offset += sizeof(this->st_position); + memcpy( &(this->position[i]), &(this->st_position), sizeof(double)); + } + uint32_t rate_lengthT = ((uint32_t) (*(inbuffer + offset))); + rate_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + rate_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + rate_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->rate_length); + if(rate_lengthT > rate_length) + this->rate = (double*)realloc(this->rate, rate_lengthT * sizeof(double)); + rate_length = rate_lengthT; + for( uint32_t i = 0; i < rate_length; i++){ + union { + double real; + uint64_t base; + } u_st_rate; + u_st_rate.base = 0; + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_rate.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_rate = u_st_rate.real; + offset += sizeof(this->st_rate); + memcpy( &(this->rate[i]), &(this->st_rate), sizeof(double)); + } + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETJOINTPROPERTIES; }; + const char * getMD5(){ return "cd7b30a39faa372283dc94c5f6457f82"; }; + + }; + + class GetJointProperties { + public: + typedef GetJointPropertiesRequest Request; + typedef GetJointPropertiesResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/GetLightProperties.h b/source/ros-max-lib/ros_lib/gazebo_msgs/GetLightProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..721018679f449cfe5622c08c1036fc42d693bfec --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/GetLightProperties.h @@ -0,0 +1,224 @@ +#ifndef _ROS_SERVICE_GetLightProperties_h +#define _ROS_SERVICE_GetLightProperties_h +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/ColorRGBA.h" + +namespace gazebo_msgs +{ + +static const char GETLIGHTPROPERTIES[] = "gazebo_msgs/GetLightProperties"; + + class GetLightPropertiesRequest : public ros::Msg + { + public: + typedef const char* _light_name_type; + _light_name_type light_name; + + GetLightPropertiesRequest(): + light_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_light_name = strlen(this->light_name); + varToArr(outbuffer + offset, length_light_name); + offset += 4; + memcpy(outbuffer + offset, this->light_name, length_light_name); + offset += length_light_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_light_name; + arrToVar(length_light_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_light_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_light_name-1]=0; + this->light_name = (char *)(inbuffer + offset-1); + offset += length_light_name; + return offset; + } + + const char * getType(){ return GETLIGHTPROPERTIES; }; + const char * getMD5(){ return "4fb676dfb4741fc866365702a859441c"; }; + + }; + + class GetLightPropertiesResponse : public ros::Msg + { + public: + typedef std_msgs::ColorRGBA _diffuse_type; + _diffuse_type diffuse; + typedef double _attenuation_constant_type; + _attenuation_constant_type attenuation_constant; + typedef double _attenuation_linear_type; + _attenuation_linear_type attenuation_linear; + typedef double _attenuation_quadratic_type; + _attenuation_quadratic_type attenuation_quadratic; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + GetLightPropertiesResponse(): + diffuse(), + attenuation_constant(0), + attenuation_linear(0), + attenuation_quadratic(0), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->diffuse.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_attenuation_constant; + u_attenuation_constant.real = this->attenuation_constant; + *(outbuffer + offset + 0) = (u_attenuation_constant.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_attenuation_constant.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_attenuation_constant.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_attenuation_constant.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_attenuation_constant.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_attenuation_constant.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_attenuation_constant.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_attenuation_constant.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->attenuation_constant); + union { + double real; + uint64_t base; + } u_attenuation_linear; + u_attenuation_linear.real = this->attenuation_linear; + *(outbuffer + offset + 0) = (u_attenuation_linear.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_attenuation_linear.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_attenuation_linear.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_attenuation_linear.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_attenuation_linear.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_attenuation_linear.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_attenuation_linear.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_attenuation_linear.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->attenuation_linear); + union { + double real; + uint64_t base; + } u_attenuation_quadratic; + u_attenuation_quadratic.real = this->attenuation_quadratic; + *(outbuffer + offset + 0) = (u_attenuation_quadratic.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_attenuation_quadratic.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_attenuation_quadratic.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_attenuation_quadratic.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_attenuation_quadratic.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_attenuation_quadratic.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_attenuation_quadratic.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_attenuation_quadratic.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->attenuation_quadratic); + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->diffuse.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_attenuation_constant; + u_attenuation_constant.base = 0; + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->attenuation_constant = u_attenuation_constant.real; + offset += sizeof(this->attenuation_constant); + union { + double real; + uint64_t base; + } u_attenuation_linear; + u_attenuation_linear.base = 0; + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->attenuation_linear = u_attenuation_linear.real; + offset += sizeof(this->attenuation_linear); + union { + double real; + uint64_t base; + } u_attenuation_quadratic; + u_attenuation_quadratic.base = 0; + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->attenuation_quadratic = u_attenuation_quadratic.real; + offset += sizeof(this->attenuation_quadratic); + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETLIGHTPROPERTIES; }; + const char * getMD5(){ return "9a19ddd5aab4c13b7643d1722c709f1f"; }; + + }; + + class GetLightProperties { + public: + typedef GetLightPropertiesRequest Request; + typedef GetLightPropertiesResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/GetLinkProperties.h b/source/ros-max-lib/ros_lib/gazebo_msgs/GetLinkProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..0d4173f2dff8fe46df53949d2edb244ed55c95a0 --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/GetLinkProperties.h @@ -0,0 +1,370 @@ +#ifndef _ROS_SERVICE_GetLinkProperties_h +#define _ROS_SERVICE_GetLinkProperties_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" + +namespace gazebo_msgs +{ + +static const char GETLINKPROPERTIES[] = "gazebo_msgs/GetLinkProperties"; + + class GetLinkPropertiesRequest : public ros::Msg + { + public: + typedef const char* _link_name_type; + _link_name_type link_name; + + GetLinkPropertiesRequest(): + link_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_link_name = strlen(this->link_name); + varToArr(outbuffer + offset, length_link_name); + offset += 4; + memcpy(outbuffer + offset, this->link_name, length_link_name); + offset += length_link_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_link_name; + arrToVar(length_link_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_link_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_link_name-1]=0; + this->link_name = (char *)(inbuffer + offset-1); + offset += length_link_name; + return offset; + } + + const char * getType(){ return GETLINKPROPERTIES; }; + const char * getMD5(){ return "7d82d60381f1b66a30f2157f60884345"; }; + + }; + + class GetLinkPropertiesResponse : public ros::Msg + { + public: + typedef geometry_msgs::Pose _com_type; + _com_type com; + typedef bool _gravity_mode_type; + _gravity_mode_type gravity_mode; + typedef double _mass_type; + _mass_type mass; + typedef double _ixx_type; + _ixx_type ixx; + typedef double _ixy_type; + _ixy_type ixy; + typedef double _ixz_type; + _ixz_type ixz; + typedef double _iyy_type; + _iyy_type iyy; + typedef double _iyz_type; + _iyz_type iyz; + typedef double _izz_type; + _izz_type izz; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + GetLinkPropertiesResponse(): + com(), + gravity_mode(0), + mass(0), + ixx(0), + ixy(0), + ixz(0), + iyy(0), + iyz(0), + izz(0), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->com.serialize(outbuffer + offset); + union { + bool real; + uint8_t base; + } u_gravity_mode; + u_gravity_mode.real = this->gravity_mode; + *(outbuffer + offset + 0) = (u_gravity_mode.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->gravity_mode); + union { + double real; + uint64_t base; + } u_mass; + u_mass.real = this->mass; + *(outbuffer + offset + 0) = (u_mass.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_mass.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_mass.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_mass.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_mass.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_mass.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_mass.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_mass.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->mass); + union { + double real; + uint64_t base; + } u_ixx; + u_ixx.real = this->ixx; + *(outbuffer + offset + 0) = (u_ixx.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixx.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixx.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixx.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixx.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixx.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixx.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixx.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixx); + union { + double real; + uint64_t base; + } u_ixy; + u_ixy.real = this->ixy; + *(outbuffer + offset + 0) = (u_ixy.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixy.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixy.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixy.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixy.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixy.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixy.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixy.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixy); + union { + double real; + uint64_t base; + } u_ixz; + u_ixz.real = this->ixz; + *(outbuffer + offset + 0) = (u_ixz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixz); + union { + double real; + uint64_t base; + } u_iyy; + u_iyy.real = this->iyy; + *(outbuffer + offset + 0) = (u_iyy.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_iyy.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_iyy.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_iyy.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_iyy.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_iyy.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_iyy.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_iyy.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->iyy); + union { + double real; + uint64_t base; + } u_iyz; + u_iyz.real = this->iyz; + *(outbuffer + offset + 0) = (u_iyz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_iyz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_iyz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_iyz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_iyz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_iyz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_iyz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_iyz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->iyz); + union { + double real; + uint64_t base; + } u_izz; + u_izz.real = this->izz; + *(outbuffer + offset + 0) = (u_izz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_izz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_izz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_izz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_izz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_izz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_izz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_izz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->izz); + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->com.deserialize(inbuffer + offset); + union { + bool real; + uint8_t base; + } u_gravity_mode; + u_gravity_mode.base = 0; + u_gravity_mode.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->gravity_mode = u_gravity_mode.real; + offset += sizeof(this->gravity_mode); + union { + double real; + uint64_t base; + } u_mass; + u_mass.base = 0; + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->mass = u_mass.real; + offset += sizeof(this->mass); + union { + double real; + uint64_t base; + } u_ixx; + u_ixx.base = 0; + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixx = u_ixx.real; + offset += sizeof(this->ixx); + union { + double real; + uint64_t base; + } u_ixy; + u_ixy.base = 0; + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixy = u_ixy.real; + offset += sizeof(this->ixy); + union { + double real; + uint64_t base; + } u_ixz; + u_ixz.base = 0; + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixz = u_ixz.real; + offset += sizeof(this->ixz); + union { + double real; + uint64_t base; + } u_iyy; + u_iyy.base = 0; + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->iyy = u_iyy.real; + offset += sizeof(this->iyy); + union { + double real; + uint64_t base; + } u_iyz; + u_iyz.base = 0; + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->iyz = u_iyz.real; + offset += sizeof(this->iyz); + union { + double real; + uint64_t base; + } u_izz; + u_izz.base = 0; + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->izz = u_izz.real; + offset += sizeof(this->izz); + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETLINKPROPERTIES; }; + const char * getMD5(){ return "a8619f92d17cfcc3958c0fd13299443d"; }; + + }; + + class GetLinkProperties { + public: + typedef GetLinkPropertiesRequest Request; + typedef GetLinkPropertiesResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/GetLinkState.h b/source/ros-max-lib/ros_lib/gazebo_msgs/GetLinkState.h new file mode 100644 index 0000000000000000000000000000000000000000..5e207644d5cc22860ea7d7a241ce2fef7be86791 --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/GetLinkState.h @@ -0,0 +1,145 @@ +#ifndef _ROS_SERVICE_GetLinkState_h +#define _ROS_SERVICE_GetLinkState_h +#include +#include +#include +#include "ros/msg.h" +#include "gazebo_msgs/LinkState.h" + +namespace gazebo_msgs +{ + +static const char GETLINKSTATE[] = "gazebo_msgs/GetLinkState"; + + class GetLinkStateRequest : public ros::Msg + { + public: + typedef const char* _link_name_type; + _link_name_type link_name; + typedef const char* _reference_frame_type; + _reference_frame_type reference_frame; + + GetLinkStateRequest(): + link_name(""), + reference_frame("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_link_name = strlen(this->link_name); + varToArr(outbuffer + offset, length_link_name); + offset += 4; + memcpy(outbuffer + offset, this->link_name, length_link_name); + offset += length_link_name; + uint32_t length_reference_frame = strlen(this->reference_frame); + varToArr(outbuffer + offset, length_reference_frame); + offset += 4; + memcpy(outbuffer + offset, this->reference_frame, length_reference_frame); + offset += length_reference_frame; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_link_name; + arrToVar(length_link_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_link_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_link_name-1]=0; + this->link_name = (char *)(inbuffer + offset-1); + offset += length_link_name; + uint32_t length_reference_frame; + arrToVar(length_reference_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_reference_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_reference_frame-1]=0; + this->reference_frame = (char *)(inbuffer + offset-1); + offset += length_reference_frame; + return offset; + } + + const char * getType(){ return GETLINKSTATE; }; + const char * getMD5(){ return "7551675c30aaa71f7c288d4864552001"; }; + + }; + + class GetLinkStateResponse : public ros::Msg + { + public: + typedef gazebo_msgs::LinkState _link_state_type; + _link_state_type link_state; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + GetLinkStateResponse(): + link_state(), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->link_state.serialize(outbuffer + offset); + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->link_state.deserialize(inbuffer + offset); + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETLINKSTATE; }; + const char * getMD5(){ return "8ba55ad34f9c072e75c0de57b089753b"; }; + + }; + + class GetLinkState { + public: + typedef GetLinkStateRequest Request; + typedef GetLinkStateResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/GetModelProperties.h b/source/ros-max-lib/ros_lib/gazebo_msgs/GetModelProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..082e688b3134dad92c29f9e3038770afb33dda9e --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/GetModelProperties.h @@ -0,0 +1,322 @@ +#ifndef _ROS_SERVICE_GetModelProperties_h +#define _ROS_SERVICE_GetModelProperties_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char GETMODELPROPERTIES[] = "gazebo_msgs/GetModelProperties"; + + class GetModelPropertiesRequest : public ros::Msg + { + public: + typedef const char* _model_name_type; + _model_name_type model_name; + + GetModelPropertiesRequest(): + model_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_model_name = strlen(this->model_name); + varToArr(outbuffer + offset, length_model_name); + offset += 4; + memcpy(outbuffer + offset, this->model_name, length_model_name); + offset += length_model_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_model_name; + arrToVar(length_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_name-1]=0; + this->model_name = (char *)(inbuffer + offset-1); + offset += length_model_name; + return offset; + } + + const char * getType(){ return GETMODELPROPERTIES; }; + const char * getMD5(){ return "ea31c8eab6fc401383cf528a7c0984ba"; }; + + }; + + class GetModelPropertiesResponse : public ros::Msg + { + public: + typedef const char* _parent_model_name_type; + _parent_model_name_type parent_model_name; + typedef const char* _canonical_body_name_type; + _canonical_body_name_type canonical_body_name; + uint32_t body_names_length; + typedef char* _body_names_type; + _body_names_type st_body_names; + _body_names_type * body_names; + uint32_t geom_names_length; + typedef char* _geom_names_type; + _geom_names_type st_geom_names; + _geom_names_type * geom_names; + uint32_t joint_names_length; + typedef char* _joint_names_type; + _joint_names_type st_joint_names; + _joint_names_type * joint_names; + uint32_t child_model_names_length; + typedef char* _child_model_names_type; + _child_model_names_type st_child_model_names; + _child_model_names_type * child_model_names; + typedef bool _is_static_type; + _is_static_type is_static; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + GetModelPropertiesResponse(): + parent_model_name(""), + canonical_body_name(""), + body_names_length(0), body_names(NULL), + geom_names_length(0), geom_names(NULL), + joint_names_length(0), joint_names(NULL), + child_model_names_length(0), child_model_names(NULL), + is_static(0), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_parent_model_name = strlen(this->parent_model_name); + varToArr(outbuffer + offset, length_parent_model_name); + offset += 4; + memcpy(outbuffer + offset, this->parent_model_name, length_parent_model_name); + offset += length_parent_model_name; + uint32_t length_canonical_body_name = strlen(this->canonical_body_name); + varToArr(outbuffer + offset, length_canonical_body_name); + offset += 4; + memcpy(outbuffer + offset, this->canonical_body_name, length_canonical_body_name); + offset += length_canonical_body_name; + *(outbuffer + offset + 0) = (this->body_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->body_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->body_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->body_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->body_names_length); + for( uint32_t i = 0; i < body_names_length; i++){ + uint32_t length_body_namesi = strlen(this->body_names[i]); + varToArr(outbuffer + offset, length_body_namesi); + offset += 4; + memcpy(outbuffer + offset, this->body_names[i], length_body_namesi); + offset += length_body_namesi; + } + *(outbuffer + offset + 0) = (this->geom_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->geom_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->geom_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->geom_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->geom_names_length); + for( uint32_t i = 0; i < geom_names_length; i++){ + uint32_t length_geom_namesi = strlen(this->geom_names[i]); + varToArr(outbuffer + offset, length_geom_namesi); + offset += 4; + memcpy(outbuffer + offset, this->geom_names[i], length_geom_namesi); + offset += length_geom_namesi; + } + *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_names_length); + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_joint_namesi = strlen(this->joint_names[i]); + varToArr(outbuffer + offset, length_joint_namesi); + offset += 4; + memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); + offset += length_joint_namesi; + } + *(outbuffer + offset + 0) = (this->child_model_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->child_model_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->child_model_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->child_model_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->child_model_names_length); + for( uint32_t i = 0; i < child_model_names_length; i++){ + uint32_t length_child_model_namesi = strlen(this->child_model_names[i]); + varToArr(outbuffer + offset, length_child_model_namesi); + offset += 4; + memcpy(outbuffer + offset, this->child_model_names[i], length_child_model_namesi); + offset += length_child_model_namesi; + } + union { + bool real; + uint8_t base; + } u_is_static; + u_is_static.real = this->is_static; + *(outbuffer + offset + 0) = (u_is_static.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->is_static); + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_parent_model_name; + arrToVar(length_parent_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_parent_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_parent_model_name-1]=0; + this->parent_model_name = (char *)(inbuffer + offset-1); + offset += length_parent_model_name; + uint32_t length_canonical_body_name; + arrToVar(length_canonical_body_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_canonical_body_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_canonical_body_name-1]=0; + this->canonical_body_name = (char *)(inbuffer + offset-1); + offset += length_canonical_body_name; + uint32_t body_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + body_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + body_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + body_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->body_names_length); + if(body_names_lengthT > body_names_length) + this->body_names = (char**)realloc(this->body_names, body_names_lengthT * sizeof(char*)); + body_names_length = body_names_lengthT; + for( uint32_t i = 0; i < body_names_length; i++){ + uint32_t length_st_body_names; + arrToVar(length_st_body_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_body_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_body_names-1]=0; + this->st_body_names = (char *)(inbuffer + offset-1); + offset += length_st_body_names; + memcpy( &(this->body_names[i]), &(this->st_body_names), sizeof(char*)); + } + uint32_t geom_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + geom_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + geom_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + geom_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->geom_names_length); + if(geom_names_lengthT > geom_names_length) + this->geom_names = (char**)realloc(this->geom_names, geom_names_lengthT * sizeof(char*)); + geom_names_length = geom_names_lengthT; + for( uint32_t i = 0; i < geom_names_length; i++){ + uint32_t length_st_geom_names; + arrToVar(length_st_geom_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_geom_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_geom_names-1]=0; + this->st_geom_names = (char *)(inbuffer + offset-1); + offset += length_st_geom_names; + memcpy( &(this->geom_names[i]), &(this->st_geom_names), sizeof(char*)); + } + uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_names_length); + if(joint_names_lengthT > joint_names_length) + this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); + joint_names_length = joint_names_lengthT; + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_st_joint_names; + arrToVar(length_st_joint_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_joint_names-1]=0; + this->st_joint_names = (char *)(inbuffer + offset-1); + offset += length_st_joint_names; + memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); + } + uint32_t child_model_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + child_model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + child_model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + child_model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->child_model_names_length); + if(child_model_names_lengthT > child_model_names_length) + this->child_model_names = (char**)realloc(this->child_model_names, child_model_names_lengthT * sizeof(char*)); + child_model_names_length = child_model_names_lengthT; + for( uint32_t i = 0; i < child_model_names_length; i++){ + uint32_t length_st_child_model_names; + arrToVar(length_st_child_model_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_child_model_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_child_model_names-1]=0; + this->st_child_model_names = (char *)(inbuffer + offset-1); + offset += length_st_child_model_names; + memcpy( &(this->child_model_names[i]), &(this->st_child_model_names), sizeof(char*)); + } + union { + bool real; + uint8_t base; + } u_is_static; + u_is_static.base = 0; + u_is_static.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->is_static = u_is_static.real; + offset += sizeof(this->is_static); + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETMODELPROPERTIES; }; + const char * getMD5(){ return "b7f370938ef77b464b95f1bab3ec5028"; }; + + }; + + class GetModelProperties { + public: + typedef GetModelPropertiesRequest Request; + typedef GetModelPropertiesResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/GetModelState.h b/source/ros-max-lib/ros_lib/gazebo_msgs/GetModelState.h new file mode 100644 index 0000000000000000000000000000000000000000..0dbcc8159b968dfc167caef10fb7f1cf93306a13 --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/GetModelState.h @@ -0,0 +1,157 @@ +#ifndef _ROS_SERVICE_GetModelState_h +#define _ROS_SERVICE_GetModelState_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Twist.h" +#include "std_msgs/Header.h" + +namespace gazebo_msgs +{ + +static const char GETMODELSTATE[] = "gazebo_msgs/GetModelState"; + + class GetModelStateRequest : public ros::Msg + { + public: + typedef const char* _model_name_type; + _model_name_type model_name; + typedef const char* _relative_entity_name_type; + _relative_entity_name_type relative_entity_name; + + GetModelStateRequest(): + model_name(""), + relative_entity_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_model_name = strlen(this->model_name); + varToArr(outbuffer + offset, length_model_name); + offset += 4; + memcpy(outbuffer + offset, this->model_name, length_model_name); + offset += length_model_name; + uint32_t length_relative_entity_name = strlen(this->relative_entity_name); + varToArr(outbuffer + offset, length_relative_entity_name); + offset += 4; + memcpy(outbuffer + offset, this->relative_entity_name, length_relative_entity_name); + offset += length_relative_entity_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_model_name; + arrToVar(length_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_name-1]=0; + this->model_name = (char *)(inbuffer + offset-1); + offset += length_model_name; + uint32_t length_relative_entity_name; + arrToVar(length_relative_entity_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_relative_entity_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_relative_entity_name-1]=0; + this->relative_entity_name = (char *)(inbuffer + offset-1); + offset += length_relative_entity_name; + return offset; + } + + const char * getType(){ return GETMODELSTATE; }; + const char * getMD5(){ return "19d412713cefe4a67437e17a951e759e"; }; + + }; + + class GetModelStateResponse : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + typedef geometry_msgs::Twist _twist_type; + _twist_type twist; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + GetModelStateResponse(): + header(), + pose(), + twist(), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->pose.serialize(outbuffer + offset); + offset += this->twist.serialize(outbuffer + offset); + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->pose.deserialize(inbuffer + offset); + offset += this->twist.deserialize(inbuffer + offset); + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETMODELSTATE; }; + const char * getMD5(){ return "ccd51739bb00f0141629e87b792e92b9"; }; + + }; + + class GetModelState { + public: + typedef GetModelStateRequest Request; + typedef GetModelStateResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/GetPhysicsProperties.h b/source/ros-max-lib/ros_lib/gazebo_msgs/GetPhysicsProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..f79bc89a80fd67ea2fba10b24660b6cc49785e16 --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/GetPhysicsProperties.h @@ -0,0 +1,199 @@ +#ifndef _ROS_SERVICE_GetPhysicsProperties_h +#define _ROS_SERVICE_GetPhysicsProperties_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Vector3.h" +#include "gazebo_msgs/ODEPhysics.h" + +namespace gazebo_msgs +{ + +static const char GETPHYSICSPROPERTIES[] = "gazebo_msgs/GetPhysicsProperties"; + + class GetPhysicsPropertiesRequest : public ros::Msg + { + public: + + GetPhysicsPropertiesRequest() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return GETPHYSICSPROPERTIES; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetPhysicsPropertiesResponse : public ros::Msg + { + public: + typedef double _time_step_type; + _time_step_type time_step; + typedef bool _pause_type; + _pause_type pause; + typedef double _max_update_rate_type; + _max_update_rate_type max_update_rate; + typedef geometry_msgs::Vector3 _gravity_type; + _gravity_type gravity; + typedef gazebo_msgs::ODEPhysics _ode_config_type; + _ode_config_type ode_config; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + GetPhysicsPropertiesResponse(): + time_step(0), + pause(0), + max_update_rate(0), + gravity(), + ode_config(), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_time_step; + u_time_step.real = this->time_step; + *(outbuffer + offset + 0) = (u_time_step.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_time_step.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_time_step.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_time_step.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_time_step.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_time_step.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_time_step.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_time_step.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->time_step); + union { + bool real; + uint8_t base; + } u_pause; + u_pause.real = this->pause; + *(outbuffer + offset + 0) = (u_pause.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->pause); + union { + double real; + uint64_t base; + } u_max_update_rate; + u_max_update_rate.real = this->max_update_rate; + *(outbuffer + offset + 0) = (u_max_update_rate.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_update_rate.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_update_rate.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_update_rate.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max_update_rate.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max_update_rate.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max_update_rate.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max_update_rate.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max_update_rate); + offset += this->gravity.serialize(outbuffer + offset); + offset += this->ode_config.serialize(outbuffer + offset); + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_time_step; + u_time_step.base = 0; + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->time_step = u_time_step.real; + offset += sizeof(this->time_step); + union { + bool real; + uint8_t base; + } u_pause; + u_pause.base = 0; + u_pause.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->pause = u_pause.real; + offset += sizeof(this->pause); + union { + double real; + uint64_t base; + } u_max_update_rate; + u_max_update_rate.base = 0; + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max_update_rate = u_max_update_rate.real; + offset += sizeof(this->max_update_rate); + offset += this->gravity.deserialize(inbuffer + offset); + offset += this->ode_config.deserialize(inbuffer + offset); + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETPHYSICSPROPERTIES; }; + const char * getMD5(){ return "575a5e74786981b7df2e3afc567693a6"; }; + + }; + + class GetPhysicsProperties { + public: + typedef GetPhysicsPropertiesRequest Request; + typedef GetPhysicsPropertiesResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/GetWorldProperties.h b/source/ros-max-lib/ros_lib/gazebo_msgs/GetWorldProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..e9170e76633f1f313b6bfb7c74b705ab29853099 --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/GetWorldProperties.h @@ -0,0 +1,192 @@ +#ifndef _ROS_SERVICE_GetWorldProperties_h +#define _ROS_SERVICE_GetWorldProperties_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char GETWORLDPROPERTIES[] = "gazebo_msgs/GetWorldProperties"; + + class GetWorldPropertiesRequest : public ros::Msg + { + public: + + GetWorldPropertiesRequest() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return GETWORLDPROPERTIES; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetWorldPropertiesResponse : public ros::Msg + { + public: + typedef double _sim_time_type; + _sim_time_type sim_time; + uint32_t model_names_length; + typedef char* _model_names_type; + _model_names_type st_model_names; + _model_names_type * model_names; + typedef bool _rendering_enabled_type; + _rendering_enabled_type rendering_enabled; + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + GetWorldPropertiesResponse(): + sim_time(0), + model_names_length(0), model_names(NULL), + rendering_enabled(0), + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_sim_time; + u_sim_time.real = this->sim_time; + *(outbuffer + offset + 0) = (u_sim_time.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_sim_time.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_sim_time.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_sim_time.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_sim_time.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_sim_time.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_sim_time.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_sim_time.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->sim_time); + *(outbuffer + offset + 0) = (this->model_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->model_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->model_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->model_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->model_names_length); + for( uint32_t i = 0; i < model_names_length; i++){ + uint32_t length_model_namesi = strlen(this->model_names[i]); + varToArr(outbuffer + offset, length_model_namesi); + offset += 4; + memcpy(outbuffer + offset, this->model_names[i], length_model_namesi); + offset += length_model_namesi; + } + union { + bool real; + uint8_t base; + } u_rendering_enabled; + u_rendering_enabled.real = this->rendering_enabled; + *(outbuffer + offset + 0) = (u_rendering_enabled.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->rendering_enabled); + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_sim_time; + u_sim_time.base = 0; + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_sim_time.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->sim_time = u_sim_time.real; + offset += sizeof(this->sim_time); + uint32_t model_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + model_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->model_names_length); + if(model_names_lengthT > model_names_length) + this->model_names = (char**)realloc(this->model_names, model_names_lengthT * sizeof(char*)); + model_names_length = model_names_lengthT; + for( uint32_t i = 0; i < model_names_length; i++){ + uint32_t length_st_model_names; + arrToVar(length_st_model_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_model_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_model_names-1]=0; + this->st_model_names = (char *)(inbuffer + offset-1); + offset += length_st_model_names; + memcpy( &(this->model_names[i]), &(this->st_model_names), sizeof(char*)); + } + union { + bool real; + uint8_t base; + } u_rendering_enabled; + u_rendering_enabled.base = 0; + u_rendering_enabled.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->rendering_enabled = u_rendering_enabled.real; + offset += sizeof(this->rendering_enabled); + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return GETWORLDPROPERTIES; }; + const char * getMD5(){ return "36bb0f2eccf4d8be971410c22818ba3f"; }; + + }; + + class GetWorldProperties { + public: + typedef GetWorldPropertiesRequest Request; + typedef GetWorldPropertiesResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/JointRequest.h b/source/ros-max-lib/ros_lib/gazebo_msgs/JointRequest.h new file mode 100644 index 0000000000000000000000000000000000000000..6c2c13ede645be8153c7e0d208e74d41170d1b71 --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/JointRequest.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_JointRequest_h +#define _ROS_SERVICE_JointRequest_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char JOINTREQUEST[] = "gazebo_msgs/JointRequest"; + + class JointRequestRequest : public ros::Msg + { + public: + typedef const char* _joint_name_type; + _joint_name_type joint_name; + + JointRequestRequest(): + joint_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_joint_name = strlen(this->joint_name); + varToArr(outbuffer + offset, length_joint_name); + offset += 4; + memcpy(outbuffer + offset, this->joint_name, length_joint_name); + offset += length_joint_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_joint_name; + arrToVar(length_joint_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_joint_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_joint_name-1]=0; + this->joint_name = (char *)(inbuffer + offset-1); + offset += length_joint_name; + return offset; + } + + const char * getType(){ return JOINTREQUEST; }; + const char * getMD5(){ return "0be1351618e1dc030eb7959d9a4902de"; }; + + }; + + class JointRequestResponse : public ros::Msg + { + public: + + JointRequestResponse() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return JOINTREQUEST; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class JointRequest { + public: + typedef JointRequestRequest Request; + typedef JointRequestResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/LinkState.h b/source/ros-max-lib/ros_lib/gazebo_msgs/LinkState.h new file mode 100644 index 0000000000000000000000000000000000000000..cd2684b3c3f42b2925475aca9a746a9ff0f8ea7a --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/LinkState.h @@ -0,0 +1,84 @@ +#ifndef _ROS_gazebo_msgs_LinkState_h +#define _ROS_gazebo_msgs_LinkState_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Twist.h" + +namespace gazebo_msgs +{ + + class LinkState : public ros::Msg + { + public: + typedef const char* _link_name_type; + _link_name_type link_name; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + typedef geometry_msgs::Twist _twist_type; + _twist_type twist; + typedef const char* _reference_frame_type; + _reference_frame_type reference_frame; + + LinkState(): + link_name(""), + pose(), + twist(), + reference_frame("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_link_name = strlen(this->link_name); + varToArr(outbuffer + offset, length_link_name); + offset += 4; + memcpy(outbuffer + offset, this->link_name, length_link_name); + offset += length_link_name; + offset += this->pose.serialize(outbuffer + offset); + offset += this->twist.serialize(outbuffer + offset); + uint32_t length_reference_frame = strlen(this->reference_frame); + varToArr(outbuffer + offset, length_reference_frame); + offset += 4; + memcpy(outbuffer + offset, this->reference_frame, length_reference_frame); + offset += length_reference_frame; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_link_name; + arrToVar(length_link_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_link_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_link_name-1]=0; + this->link_name = (char *)(inbuffer + offset-1); + offset += length_link_name; + offset += this->pose.deserialize(inbuffer + offset); + offset += this->twist.deserialize(inbuffer + offset); + uint32_t length_reference_frame; + arrToVar(length_reference_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_reference_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_reference_frame-1]=0; + this->reference_frame = (char *)(inbuffer + offset-1); + offset += length_reference_frame; + return offset; + } + + const char * getType(){ return "gazebo_msgs/LinkState"; }; + const char * getMD5(){ return "0818ebbf28ce3a08d48ab1eaa7309ebe"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/LinkStates.h b/source/ros-max-lib/ros_lib/gazebo_msgs/LinkStates.h new file mode 100644 index 0000000000000000000000000000000000000000..8ec738d0e941ad881121e02f1f8bfdf390c11b6a --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/LinkStates.h @@ -0,0 +1,127 @@ +#ifndef _ROS_gazebo_msgs_LinkStates_h +#define _ROS_gazebo_msgs_LinkStates_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Twist.h" + +namespace gazebo_msgs +{ + + class LinkStates : public ros::Msg + { + public: + uint32_t name_length; + typedef char* _name_type; + _name_type st_name; + _name_type * name; + uint32_t pose_length; + typedef geometry_msgs::Pose _pose_type; + _pose_type st_pose; + _pose_type * pose; + uint32_t twist_length; + typedef geometry_msgs::Twist _twist_type; + _twist_type st_twist; + _twist_type * twist; + + LinkStates(): + name_length(0), name(NULL), + pose_length(0), pose(NULL), + twist_length(0), twist(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->name_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->name_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->name_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->name_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->name_length); + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_namei = strlen(this->name[i]); + varToArr(outbuffer + offset, length_namei); + offset += 4; + memcpy(outbuffer + offset, this->name[i], length_namei); + offset += length_namei; + } + *(outbuffer + offset + 0) = (this->pose_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->pose_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->pose_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->pose_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->pose_length); + for( uint32_t i = 0; i < pose_length; i++){ + offset += this->pose[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->twist_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->twist_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->twist_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->twist_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->twist_length); + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->twist[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t name_lengthT = ((uint32_t) (*(inbuffer + offset))); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->name_length); + if(name_lengthT > name_length) + this->name = (char**)realloc(this->name, name_lengthT * sizeof(char*)); + name_length = name_lengthT; + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_st_name; + arrToVar(length_st_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_name-1]=0; + this->st_name = (char *)(inbuffer + offset-1); + offset += length_st_name; + memcpy( &(this->name[i]), &(this->st_name), sizeof(char*)); + } + uint32_t pose_lengthT = ((uint32_t) (*(inbuffer + offset))); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->pose_length); + if(pose_lengthT > pose_length) + this->pose = (geometry_msgs::Pose*)realloc(this->pose, pose_lengthT * sizeof(geometry_msgs::Pose)); + pose_length = pose_lengthT; + for( uint32_t i = 0; i < pose_length; i++){ + offset += this->st_pose.deserialize(inbuffer + offset); + memcpy( &(this->pose[i]), &(this->st_pose), sizeof(geometry_msgs::Pose)); + } + uint32_t twist_lengthT = ((uint32_t) (*(inbuffer + offset))); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->twist_length); + if(twist_lengthT > twist_length) + this->twist = (geometry_msgs::Twist*)realloc(this->twist, twist_lengthT * sizeof(geometry_msgs::Twist)); + twist_length = twist_lengthT; + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->st_twist.deserialize(inbuffer + offset); + memcpy( &(this->twist[i]), &(this->st_twist), sizeof(geometry_msgs::Twist)); + } + return offset; + } + + const char * getType(){ return "gazebo_msgs/LinkStates"; }; + const char * getMD5(){ return "48c080191eb15c41858319b4d8a609c2"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/ModelState.h b/source/ros-max-lib/ros_lib/gazebo_msgs/ModelState.h new file mode 100644 index 0000000000000000000000000000000000000000..4a3cfd1cf72bcefa02bee32c00c6720558e954de --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/ModelState.h @@ -0,0 +1,84 @@ +#ifndef _ROS_gazebo_msgs_ModelState_h +#define _ROS_gazebo_msgs_ModelState_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Twist.h" + +namespace gazebo_msgs +{ + + class ModelState : public ros::Msg + { + public: + typedef const char* _model_name_type; + _model_name_type model_name; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + typedef geometry_msgs::Twist _twist_type; + _twist_type twist; + typedef const char* _reference_frame_type; + _reference_frame_type reference_frame; + + ModelState(): + model_name(""), + pose(), + twist(), + reference_frame("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_model_name = strlen(this->model_name); + varToArr(outbuffer + offset, length_model_name); + offset += 4; + memcpy(outbuffer + offset, this->model_name, length_model_name); + offset += length_model_name; + offset += this->pose.serialize(outbuffer + offset); + offset += this->twist.serialize(outbuffer + offset); + uint32_t length_reference_frame = strlen(this->reference_frame); + varToArr(outbuffer + offset, length_reference_frame); + offset += 4; + memcpy(outbuffer + offset, this->reference_frame, length_reference_frame); + offset += length_reference_frame; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_model_name; + arrToVar(length_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_name-1]=0; + this->model_name = (char *)(inbuffer + offset-1); + offset += length_model_name; + offset += this->pose.deserialize(inbuffer + offset); + offset += this->twist.deserialize(inbuffer + offset); + uint32_t length_reference_frame; + arrToVar(length_reference_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_reference_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_reference_frame-1]=0; + this->reference_frame = (char *)(inbuffer + offset-1); + offset += length_reference_frame; + return offset; + } + + const char * getType(){ return "gazebo_msgs/ModelState"; }; + const char * getMD5(){ return "9330fd35f2fcd82d457e54bd54e10593"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/ModelStates.h b/source/ros-max-lib/ros_lib/gazebo_msgs/ModelStates.h new file mode 100644 index 0000000000000000000000000000000000000000..f6c66d5297004ff1c06a9ab8acc4346900a1dffb --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/ModelStates.h @@ -0,0 +1,127 @@ +#ifndef _ROS_gazebo_msgs_ModelStates_h +#define _ROS_gazebo_msgs_ModelStates_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Twist.h" + +namespace gazebo_msgs +{ + + class ModelStates : public ros::Msg + { + public: + uint32_t name_length; + typedef char* _name_type; + _name_type st_name; + _name_type * name; + uint32_t pose_length; + typedef geometry_msgs::Pose _pose_type; + _pose_type st_pose; + _pose_type * pose; + uint32_t twist_length; + typedef geometry_msgs::Twist _twist_type; + _twist_type st_twist; + _twist_type * twist; + + ModelStates(): + name_length(0), name(NULL), + pose_length(0), pose(NULL), + twist_length(0), twist(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->name_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->name_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->name_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->name_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->name_length); + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_namei = strlen(this->name[i]); + varToArr(outbuffer + offset, length_namei); + offset += 4; + memcpy(outbuffer + offset, this->name[i], length_namei); + offset += length_namei; + } + *(outbuffer + offset + 0) = (this->pose_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->pose_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->pose_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->pose_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->pose_length); + for( uint32_t i = 0; i < pose_length; i++){ + offset += this->pose[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->twist_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->twist_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->twist_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->twist_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->twist_length); + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->twist[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t name_lengthT = ((uint32_t) (*(inbuffer + offset))); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->name_length); + if(name_lengthT > name_length) + this->name = (char**)realloc(this->name, name_lengthT * sizeof(char*)); + name_length = name_lengthT; + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_st_name; + arrToVar(length_st_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_name-1]=0; + this->st_name = (char *)(inbuffer + offset-1); + offset += length_st_name; + memcpy( &(this->name[i]), &(this->st_name), sizeof(char*)); + } + uint32_t pose_lengthT = ((uint32_t) (*(inbuffer + offset))); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->pose_length); + if(pose_lengthT > pose_length) + this->pose = (geometry_msgs::Pose*)realloc(this->pose, pose_lengthT * sizeof(geometry_msgs::Pose)); + pose_length = pose_lengthT; + for( uint32_t i = 0; i < pose_length; i++){ + offset += this->st_pose.deserialize(inbuffer + offset); + memcpy( &(this->pose[i]), &(this->st_pose), sizeof(geometry_msgs::Pose)); + } + uint32_t twist_lengthT = ((uint32_t) (*(inbuffer + offset))); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->twist_length); + if(twist_lengthT > twist_length) + this->twist = (geometry_msgs::Twist*)realloc(this->twist, twist_lengthT * sizeof(geometry_msgs::Twist)); + twist_length = twist_lengthT; + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->st_twist.deserialize(inbuffer + offset); + memcpy( &(this->twist[i]), &(this->st_twist), sizeof(geometry_msgs::Twist)); + } + return offset; + } + + const char * getType(){ return "gazebo_msgs/ModelStates"; }; + const char * getMD5(){ return "48c080191eb15c41858319b4d8a609c2"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/ODEJointProperties.h b/source/ros-max-lib/ros_lib/gazebo_msgs/ODEJointProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..c3fba20a3ad1338c1c9bab3efc688e8215c526a2 --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/ODEJointProperties.h @@ -0,0 +1,558 @@ +#ifndef _ROS_gazebo_msgs_ODEJointProperties_h +#define _ROS_gazebo_msgs_ODEJointProperties_h + +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + + class ODEJointProperties : public ros::Msg + { + public: + uint32_t damping_length; + typedef double _damping_type; + _damping_type st_damping; + _damping_type * damping; + uint32_t hiStop_length; + typedef double _hiStop_type; + _hiStop_type st_hiStop; + _hiStop_type * hiStop; + uint32_t loStop_length; + typedef double _loStop_type; + _loStop_type st_loStop; + _loStop_type * loStop; + uint32_t erp_length; + typedef double _erp_type; + _erp_type st_erp; + _erp_type * erp; + uint32_t cfm_length; + typedef double _cfm_type; + _cfm_type st_cfm; + _cfm_type * cfm; + uint32_t stop_erp_length; + typedef double _stop_erp_type; + _stop_erp_type st_stop_erp; + _stop_erp_type * stop_erp; + uint32_t stop_cfm_length; + typedef double _stop_cfm_type; + _stop_cfm_type st_stop_cfm; + _stop_cfm_type * stop_cfm; + uint32_t fudge_factor_length; + typedef double _fudge_factor_type; + _fudge_factor_type st_fudge_factor; + _fudge_factor_type * fudge_factor; + uint32_t fmax_length; + typedef double _fmax_type; + _fmax_type st_fmax; + _fmax_type * fmax; + uint32_t vel_length; + typedef double _vel_type; + _vel_type st_vel; + _vel_type * vel; + + ODEJointProperties(): + damping_length(0), damping(NULL), + hiStop_length(0), hiStop(NULL), + loStop_length(0), loStop(NULL), + erp_length(0), erp(NULL), + cfm_length(0), cfm(NULL), + stop_erp_length(0), stop_erp(NULL), + stop_cfm_length(0), stop_cfm(NULL), + fudge_factor_length(0), fudge_factor(NULL), + fmax_length(0), fmax(NULL), + vel_length(0), vel(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->damping_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->damping_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->damping_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->damping_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->damping_length); + for( uint32_t i = 0; i < damping_length; i++){ + union { + double real; + uint64_t base; + } u_dampingi; + u_dampingi.real = this->damping[i]; + *(outbuffer + offset + 0) = (u_dampingi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_dampingi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_dampingi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_dampingi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_dampingi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_dampingi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_dampingi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_dampingi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->damping[i]); + } + *(outbuffer + offset + 0) = (this->hiStop_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->hiStop_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->hiStop_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->hiStop_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->hiStop_length); + for( uint32_t i = 0; i < hiStop_length; i++){ + union { + double real; + uint64_t base; + } u_hiStopi; + u_hiStopi.real = this->hiStop[i]; + *(outbuffer + offset + 0) = (u_hiStopi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_hiStopi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_hiStopi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_hiStopi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_hiStopi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_hiStopi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_hiStopi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_hiStopi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->hiStop[i]); + } + *(outbuffer + offset + 0) = (this->loStop_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->loStop_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->loStop_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->loStop_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->loStop_length); + for( uint32_t i = 0; i < loStop_length; i++){ + union { + double real; + uint64_t base; + } u_loStopi; + u_loStopi.real = this->loStop[i]; + *(outbuffer + offset + 0) = (u_loStopi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_loStopi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_loStopi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_loStopi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_loStopi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_loStopi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_loStopi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_loStopi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->loStop[i]); + } + *(outbuffer + offset + 0) = (this->erp_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->erp_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->erp_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->erp_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->erp_length); + for( uint32_t i = 0; i < erp_length; i++){ + union { + double real; + uint64_t base; + } u_erpi; + u_erpi.real = this->erp[i]; + *(outbuffer + offset + 0) = (u_erpi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_erpi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_erpi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_erpi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_erpi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_erpi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_erpi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_erpi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->erp[i]); + } + *(outbuffer + offset + 0) = (this->cfm_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->cfm_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->cfm_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->cfm_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->cfm_length); + for( uint32_t i = 0; i < cfm_length; i++){ + union { + double real; + uint64_t base; + } u_cfmi; + u_cfmi.real = this->cfm[i]; + *(outbuffer + offset + 0) = (u_cfmi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_cfmi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_cfmi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_cfmi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_cfmi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_cfmi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_cfmi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_cfmi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->cfm[i]); + } + *(outbuffer + offset + 0) = (this->stop_erp_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stop_erp_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stop_erp_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stop_erp_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->stop_erp_length); + for( uint32_t i = 0; i < stop_erp_length; i++){ + union { + double real; + uint64_t base; + } u_stop_erpi; + u_stop_erpi.real = this->stop_erp[i]; + *(outbuffer + offset + 0) = (u_stop_erpi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_stop_erpi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_stop_erpi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_stop_erpi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_stop_erpi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_stop_erpi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_stop_erpi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_stop_erpi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->stop_erp[i]); + } + *(outbuffer + offset + 0) = (this->stop_cfm_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stop_cfm_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stop_cfm_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stop_cfm_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->stop_cfm_length); + for( uint32_t i = 0; i < stop_cfm_length; i++){ + union { + double real; + uint64_t base; + } u_stop_cfmi; + u_stop_cfmi.real = this->stop_cfm[i]; + *(outbuffer + offset + 0) = (u_stop_cfmi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_stop_cfmi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_stop_cfmi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_stop_cfmi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_stop_cfmi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_stop_cfmi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_stop_cfmi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_stop_cfmi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->stop_cfm[i]); + } + *(outbuffer + offset + 0) = (this->fudge_factor_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->fudge_factor_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->fudge_factor_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->fudge_factor_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->fudge_factor_length); + for( uint32_t i = 0; i < fudge_factor_length; i++){ + union { + double real; + uint64_t base; + } u_fudge_factori; + u_fudge_factori.real = this->fudge_factor[i]; + *(outbuffer + offset + 0) = (u_fudge_factori.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_fudge_factori.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_fudge_factori.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_fudge_factori.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_fudge_factori.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_fudge_factori.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_fudge_factori.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_fudge_factori.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->fudge_factor[i]); + } + *(outbuffer + offset + 0) = (this->fmax_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->fmax_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->fmax_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->fmax_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->fmax_length); + for( uint32_t i = 0; i < fmax_length; i++){ + union { + double real; + uint64_t base; + } u_fmaxi; + u_fmaxi.real = this->fmax[i]; + *(outbuffer + offset + 0) = (u_fmaxi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_fmaxi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_fmaxi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_fmaxi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_fmaxi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_fmaxi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_fmaxi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_fmaxi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->fmax[i]); + } + *(outbuffer + offset + 0) = (this->vel_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->vel_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->vel_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->vel_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->vel_length); + for( uint32_t i = 0; i < vel_length; i++){ + union { + double real; + uint64_t base; + } u_veli; + u_veli.real = this->vel[i]; + *(outbuffer + offset + 0) = (u_veli.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_veli.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_veli.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_veli.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_veli.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_veli.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_veli.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_veli.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->vel[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t damping_lengthT = ((uint32_t) (*(inbuffer + offset))); + damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->damping_length); + if(damping_lengthT > damping_length) + this->damping = (double*)realloc(this->damping, damping_lengthT * sizeof(double)); + damping_length = damping_lengthT; + for( uint32_t i = 0; i < damping_length; i++){ + union { + double real; + uint64_t base; + } u_st_damping; + u_st_damping.base = 0; + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_damping = u_st_damping.real; + offset += sizeof(this->st_damping); + memcpy( &(this->damping[i]), &(this->st_damping), sizeof(double)); + } + uint32_t hiStop_lengthT = ((uint32_t) (*(inbuffer + offset))); + hiStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + hiStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + hiStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->hiStop_length); + if(hiStop_lengthT > hiStop_length) + this->hiStop = (double*)realloc(this->hiStop, hiStop_lengthT * sizeof(double)); + hiStop_length = hiStop_lengthT; + for( uint32_t i = 0; i < hiStop_length; i++){ + union { + double real; + uint64_t base; + } u_st_hiStop; + u_st_hiStop.base = 0; + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_hiStop = u_st_hiStop.real; + offset += sizeof(this->st_hiStop); + memcpy( &(this->hiStop[i]), &(this->st_hiStop), sizeof(double)); + } + uint32_t loStop_lengthT = ((uint32_t) (*(inbuffer + offset))); + loStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + loStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + loStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->loStop_length); + if(loStop_lengthT > loStop_length) + this->loStop = (double*)realloc(this->loStop, loStop_lengthT * sizeof(double)); + loStop_length = loStop_lengthT; + for( uint32_t i = 0; i < loStop_length; i++){ + union { + double real; + uint64_t base; + } u_st_loStop; + u_st_loStop.base = 0; + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_loStop = u_st_loStop.real; + offset += sizeof(this->st_loStop); + memcpy( &(this->loStop[i]), &(this->st_loStop), sizeof(double)); + } + uint32_t erp_lengthT = ((uint32_t) (*(inbuffer + offset))); + erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->erp_length); + if(erp_lengthT > erp_length) + this->erp = (double*)realloc(this->erp, erp_lengthT * sizeof(double)); + erp_length = erp_lengthT; + for( uint32_t i = 0; i < erp_length; i++){ + union { + double real; + uint64_t base; + } u_st_erp; + u_st_erp.base = 0; + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_erp = u_st_erp.real; + offset += sizeof(this->st_erp); + memcpy( &(this->erp[i]), &(this->st_erp), sizeof(double)); + } + uint32_t cfm_lengthT = ((uint32_t) (*(inbuffer + offset))); + cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->cfm_length); + if(cfm_lengthT > cfm_length) + this->cfm = (double*)realloc(this->cfm, cfm_lengthT * sizeof(double)); + cfm_length = cfm_lengthT; + for( uint32_t i = 0; i < cfm_length; i++){ + union { + double real; + uint64_t base; + } u_st_cfm; + u_st_cfm.base = 0; + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_cfm = u_st_cfm.real; + offset += sizeof(this->st_cfm); + memcpy( &(this->cfm[i]), &(this->st_cfm), sizeof(double)); + } + uint32_t stop_erp_lengthT = ((uint32_t) (*(inbuffer + offset))); + stop_erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + stop_erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + stop_erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stop_erp_length); + if(stop_erp_lengthT > stop_erp_length) + this->stop_erp = (double*)realloc(this->stop_erp, stop_erp_lengthT * sizeof(double)); + stop_erp_length = stop_erp_lengthT; + for( uint32_t i = 0; i < stop_erp_length; i++){ + union { + double real; + uint64_t base; + } u_st_stop_erp; + u_st_stop_erp.base = 0; + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_stop_erp = u_st_stop_erp.real; + offset += sizeof(this->st_stop_erp); + memcpy( &(this->stop_erp[i]), &(this->st_stop_erp), sizeof(double)); + } + uint32_t stop_cfm_lengthT = ((uint32_t) (*(inbuffer + offset))); + stop_cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + stop_cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + stop_cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stop_cfm_length); + if(stop_cfm_lengthT > stop_cfm_length) + this->stop_cfm = (double*)realloc(this->stop_cfm, stop_cfm_lengthT * sizeof(double)); + stop_cfm_length = stop_cfm_lengthT; + for( uint32_t i = 0; i < stop_cfm_length; i++){ + union { + double real; + uint64_t base; + } u_st_stop_cfm; + u_st_stop_cfm.base = 0; + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_stop_cfm = u_st_stop_cfm.real; + offset += sizeof(this->st_stop_cfm); + memcpy( &(this->stop_cfm[i]), &(this->st_stop_cfm), sizeof(double)); + } + uint32_t fudge_factor_lengthT = ((uint32_t) (*(inbuffer + offset))); + fudge_factor_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + fudge_factor_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + fudge_factor_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->fudge_factor_length); + if(fudge_factor_lengthT > fudge_factor_length) + this->fudge_factor = (double*)realloc(this->fudge_factor, fudge_factor_lengthT * sizeof(double)); + fudge_factor_length = fudge_factor_lengthT; + for( uint32_t i = 0; i < fudge_factor_length; i++){ + union { + double real; + uint64_t base; + } u_st_fudge_factor; + u_st_fudge_factor.base = 0; + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_fudge_factor = u_st_fudge_factor.real; + offset += sizeof(this->st_fudge_factor); + memcpy( &(this->fudge_factor[i]), &(this->st_fudge_factor), sizeof(double)); + } + uint32_t fmax_lengthT = ((uint32_t) (*(inbuffer + offset))); + fmax_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + fmax_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + fmax_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->fmax_length); + if(fmax_lengthT > fmax_length) + this->fmax = (double*)realloc(this->fmax, fmax_lengthT * sizeof(double)); + fmax_length = fmax_lengthT; + for( uint32_t i = 0; i < fmax_length; i++){ + union { + double real; + uint64_t base; + } u_st_fmax; + u_st_fmax.base = 0; + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_fmax = u_st_fmax.real; + offset += sizeof(this->st_fmax); + memcpy( &(this->fmax[i]), &(this->st_fmax), sizeof(double)); + } + uint32_t vel_lengthT = ((uint32_t) (*(inbuffer + offset))); + vel_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + vel_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + vel_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->vel_length); + if(vel_lengthT > vel_length) + this->vel = (double*)realloc(this->vel, vel_lengthT * sizeof(double)); + vel_length = vel_lengthT; + for( uint32_t i = 0; i < vel_length; i++){ + union { + double real; + uint64_t base; + } u_st_vel; + u_st_vel.base = 0; + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_vel = u_st_vel.real; + offset += sizeof(this->st_vel); + memcpy( &(this->vel[i]), &(this->st_vel), sizeof(double)); + } + return offset; + } + + const char * getType(){ return "gazebo_msgs/ODEJointProperties"; }; + const char * getMD5(){ return "1b744c32a920af979f53afe2f9c3511f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/ODEPhysics.h b/source/ros-max-lib/ros_lib/gazebo_msgs/ODEPhysics.h new file mode 100644 index 0000000000000000000000000000000000000000..dcb60385b640e945e55415f0defbfbea881eaac1 --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/ODEPhysics.h @@ -0,0 +1,287 @@ +#ifndef _ROS_gazebo_msgs_ODEPhysics_h +#define _ROS_gazebo_msgs_ODEPhysics_h + +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + + class ODEPhysics : public ros::Msg + { + public: + typedef bool _auto_disable_bodies_type; + _auto_disable_bodies_type auto_disable_bodies; + typedef uint32_t _sor_pgs_precon_iters_type; + _sor_pgs_precon_iters_type sor_pgs_precon_iters; + typedef uint32_t _sor_pgs_iters_type; + _sor_pgs_iters_type sor_pgs_iters; + typedef double _sor_pgs_w_type; + _sor_pgs_w_type sor_pgs_w; + typedef double _sor_pgs_rms_error_tol_type; + _sor_pgs_rms_error_tol_type sor_pgs_rms_error_tol; + typedef double _contact_surface_layer_type; + _contact_surface_layer_type contact_surface_layer; + typedef double _contact_max_correcting_vel_type; + _contact_max_correcting_vel_type contact_max_correcting_vel; + typedef double _cfm_type; + _cfm_type cfm; + typedef double _erp_type; + _erp_type erp; + typedef uint32_t _max_contacts_type; + _max_contacts_type max_contacts; + + ODEPhysics(): + auto_disable_bodies(0), + sor_pgs_precon_iters(0), + sor_pgs_iters(0), + sor_pgs_w(0), + sor_pgs_rms_error_tol(0), + contact_surface_layer(0), + contact_max_correcting_vel(0), + cfm(0), + erp(0), + max_contacts(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_auto_disable_bodies; + u_auto_disable_bodies.real = this->auto_disable_bodies; + *(outbuffer + offset + 0) = (u_auto_disable_bodies.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->auto_disable_bodies); + *(outbuffer + offset + 0) = (this->sor_pgs_precon_iters >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->sor_pgs_precon_iters >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->sor_pgs_precon_iters >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->sor_pgs_precon_iters >> (8 * 3)) & 0xFF; + offset += sizeof(this->sor_pgs_precon_iters); + *(outbuffer + offset + 0) = (this->sor_pgs_iters >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->sor_pgs_iters >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->sor_pgs_iters >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->sor_pgs_iters >> (8 * 3)) & 0xFF; + offset += sizeof(this->sor_pgs_iters); + union { + double real; + uint64_t base; + } u_sor_pgs_w; + u_sor_pgs_w.real = this->sor_pgs_w; + *(outbuffer + offset + 0) = (u_sor_pgs_w.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_sor_pgs_w.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_sor_pgs_w.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_sor_pgs_w.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_sor_pgs_w.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_sor_pgs_w.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_sor_pgs_w.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_sor_pgs_w.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->sor_pgs_w); + union { + double real; + uint64_t base; + } u_sor_pgs_rms_error_tol; + u_sor_pgs_rms_error_tol.real = this->sor_pgs_rms_error_tol; + *(outbuffer + offset + 0) = (u_sor_pgs_rms_error_tol.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_sor_pgs_rms_error_tol.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_sor_pgs_rms_error_tol.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_sor_pgs_rms_error_tol.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_sor_pgs_rms_error_tol.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_sor_pgs_rms_error_tol.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_sor_pgs_rms_error_tol.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_sor_pgs_rms_error_tol.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->sor_pgs_rms_error_tol); + union { + double real; + uint64_t base; + } u_contact_surface_layer; + u_contact_surface_layer.real = this->contact_surface_layer; + *(outbuffer + offset + 0) = (u_contact_surface_layer.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_contact_surface_layer.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_contact_surface_layer.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_contact_surface_layer.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_contact_surface_layer.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_contact_surface_layer.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_contact_surface_layer.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_contact_surface_layer.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->contact_surface_layer); + union { + double real; + uint64_t base; + } u_contact_max_correcting_vel; + u_contact_max_correcting_vel.real = this->contact_max_correcting_vel; + *(outbuffer + offset + 0) = (u_contact_max_correcting_vel.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_contact_max_correcting_vel.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_contact_max_correcting_vel.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_contact_max_correcting_vel.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_contact_max_correcting_vel.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_contact_max_correcting_vel.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_contact_max_correcting_vel.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_contact_max_correcting_vel.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->contact_max_correcting_vel); + union { + double real; + uint64_t base; + } u_cfm; + u_cfm.real = this->cfm; + *(outbuffer + offset + 0) = (u_cfm.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_cfm.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_cfm.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_cfm.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_cfm.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_cfm.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_cfm.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_cfm.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->cfm); + union { + double real; + uint64_t base; + } u_erp; + u_erp.real = this->erp; + *(outbuffer + offset + 0) = (u_erp.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_erp.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_erp.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_erp.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_erp.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_erp.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_erp.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_erp.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->erp); + *(outbuffer + offset + 0) = (this->max_contacts >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->max_contacts >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->max_contacts >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->max_contacts >> (8 * 3)) & 0xFF; + offset += sizeof(this->max_contacts); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_auto_disable_bodies; + u_auto_disable_bodies.base = 0; + u_auto_disable_bodies.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->auto_disable_bodies = u_auto_disable_bodies.real; + offset += sizeof(this->auto_disable_bodies); + this->sor_pgs_precon_iters = ((uint32_t) (*(inbuffer + offset))); + this->sor_pgs_precon_iters |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->sor_pgs_precon_iters |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->sor_pgs_precon_iters |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->sor_pgs_precon_iters); + this->sor_pgs_iters = ((uint32_t) (*(inbuffer + offset))); + this->sor_pgs_iters |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->sor_pgs_iters |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->sor_pgs_iters |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->sor_pgs_iters); + union { + double real; + uint64_t base; + } u_sor_pgs_w; + u_sor_pgs_w.base = 0; + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_sor_pgs_w.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->sor_pgs_w = u_sor_pgs_w.real; + offset += sizeof(this->sor_pgs_w); + union { + double real; + uint64_t base; + } u_sor_pgs_rms_error_tol; + u_sor_pgs_rms_error_tol.base = 0; + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_sor_pgs_rms_error_tol.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->sor_pgs_rms_error_tol = u_sor_pgs_rms_error_tol.real; + offset += sizeof(this->sor_pgs_rms_error_tol); + union { + double real; + uint64_t base; + } u_contact_surface_layer; + u_contact_surface_layer.base = 0; + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_contact_surface_layer.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->contact_surface_layer = u_contact_surface_layer.real; + offset += sizeof(this->contact_surface_layer); + union { + double real; + uint64_t base; + } u_contact_max_correcting_vel; + u_contact_max_correcting_vel.base = 0; + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_contact_max_correcting_vel.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->contact_max_correcting_vel = u_contact_max_correcting_vel.real; + offset += sizeof(this->contact_max_correcting_vel); + union { + double real; + uint64_t base; + } u_cfm; + u_cfm.base = 0; + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_cfm.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->cfm = u_cfm.real; + offset += sizeof(this->cfm); + union { + double real; + uint64_t base; + } u_erp; + u_erp.base = 0; + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_erp.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->erp = u_erp.real; + offset += sizeof(this->erp); + this->max_contacts = ((uint32_t) (*(inbuffer + offset))); + this->max_contacts |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->max_contacts |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->max_contacts |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->max_contacts); + return offset; + } + + const char * getType(){ return "gazebo_msgs/ODEPhysics"; }; + const char * getMD5(){ return "667d56ddbd547918c32d1934503dc335"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/SetJointProperties.h b/source/ros-max-lib/ros_lib/gazebo_msgs/SetJointProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..981853d9daa0042f81fc76cfaf033feb2208f60c --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/SetJointProperties.h @@ -0,0 +1,128 @@ +#ifndef _ROS_SERVICE_SetJointProperties_h +#define _ROS_SERVICE_SetJointProperties_h +#include +#include +#include +#include "ros/msg.h" +#include "gazebo_msgs/ODEJointProperties.h" + +namespace gazebo_msgs +{ + +static const char SETJOINTPROPERTIES[] = "gazebo_msgs/SetJointProperties"; + + class SetJointPropertiesRequest : public ros::Msg + { + public: + typedef const char* _joint_name_type; + _joint_name_type joint_name; + typedef gazebo_msgs::ODEJointProperties _ode_joint_config_type; + _ode_joint_config_type ode_joint_config; + + SetJointPropertiesRequest(): + joint_name(""), + ode_joint_config() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_joint_name = strlen(this->joint_name); + varToArr(outbuffer + offset, length_joint_name); + offset += 4; + memcpy(outbuffer + offset, this->joint_name, length_joint_name); + offset += length_joint_name; + offset += this->ode_joint_config.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_joint_name; + arrToVar(length_joint_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_joint_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_joint_name-1]=0; + this->joint_name = (char *)(inbuffer + offset-1); + offset += length_joint_name; + offset += this->ode_joint_config.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return SETJOINTPROPERTIES; }; + const char * getMD5(){ return "331fd8f35fd27e3c1421175590258e26"; }; + + }; + + class SetJointPropertiesResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetJointPropertiesResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETJOINTPROPERTIES; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetJointProperties { + public: + typedef SetJointPropertiesRequest Request; + typedef SetJointPropertiesResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/SetJointTrajectory.h b/source/ros-max-lib/ros_lib/gazebo_msgs/SetJointTrajectory.h new file mode 100644 index 0000000000000000000000000000000000000000..81146cee35e5c4bcdd166110d2595a9dea4c2465 --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/SetJointTrajectory.h @@ -0,0 +1,170 @@ +#ifndef _ROS_SERVICE_SetJointTrajectory_h +#define _ROS_SERVICE_SetJointTrajectory_h +#include +#include +#include +#include "ros/msg.h" +#include "trajectory_msgs/JointTrajectory.h" +#include "geometry_msgs/Pose.h" + +namespace gazebo_msgs +{ + +static const char SETJOINTTRAJECTORY[] = "gazebo_msgs/SetJointTrajectory"; + + class SetJointTrajectoryRequest : public ros::Msg + { + public: + typedef const char* _model_name_type; + _model_name_type model_name; + typedef trajectory_msgs::JointTrajectory _joint_trajectory_type; + _joint_trajectory_type joint_trajectory; + typedef geometry_msgs::Pose _model_pose_type; + _model_pose_type model_pose; + typedef bool _set_model_pose_type; + _set_model_pose_type set_model_pose; + typedef bool _disable_physics_updates_type; + _disable_physics_updates_type disable_physics_updates; + + SetJointTrajectoryRequest(): + model_name(""), + joint_trajectory(), + model_pose(), + set_model_pose(0), + disable_physics_updates(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_model_name = strlen(this->model_name); + varToArr(outbuffer + offset, length_model_name); + offset += 4; + memcpy(outbuffer + offset, this->model_name, length_model_name); + offset += length_model_name; + offset += this->joint_trajectory.serialize(outbuffer + offset); + offset += this->model_pose.serialize(outbuffer + offset); + union { + bool real; + uint8_t base; + } u_set_model_pose; + u_set_model_pose.real = this->set_model_pose; + *(outbuffer + offset + 0) = (u_set_model_pose.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->set_model_pose); + union { + bool real; + uint8_t base; + } u_disable_physics_updates; + u_disable_physics_updates.real = this->disable_physics_updates; + *(outbuffer + offset + 0) = (u_disable_physics_updates.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->disable_physics_updates); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_model_name; + arrToVar(length_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_name-1]=0; + this->model_name = (char *)(inbuffer + offset-1); + offset += length_model_name; + offset += this->joint_trajectory.deserialize(inbuffer + offset); + offset += this->model_pose.deserialize(inbuffer + offset); + union { + bool real; + uint8_t base; + } u_set_model_pose; + u_set_model_pose.base = 0; + u_set_model_pose.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->set_model_pose = u_set_model_pose.real; + offset += sizeof(this->set_model_pose); + union { + bool real; + uint8_t base; + } u_disable_physics_updates; + u_disable_physics_updates.base = 0; + u_disable_physics_updates.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->disable_physics_updates = u_disable_physics_updates.real; + offset += sizeof(this->disable_physics_updates); + return offset; + } + + const char * getType(){ return SETJOINTTRAJECTORY; }; + const char * getMD5(){ return "649dd2eba5ffd358069238825f9f85ab"; }; + + }; + + class SetJointTrajectoryResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetJointTrajectoryResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETJOINTTRAJECTORY; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetJointTrajectory { + public: + typedef SetJointTrajectoryRequest Request; + typedef SetJointTrajectoryResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/SetLightProperties.h b/source/ros-max-lib/ros_lib/gazebo_msgs/SetLightProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..5243ae2861430a90990205de9f42d420844a7416 --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/SetLightProperties.h @@ -0,0 +1,224 @@ +#ifndef _ROS_SERVICE_SetLightProperties_h +#define _ROS_SERVICE_SetLightProperties_h +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/ColorRGBA.h" + +namespace gazebo_msgs +{ + +static const char SETLIGHTPROPERTIES[] = "gazebo_msgs/SetLightProperties"; + + class SetLightPropertiesRequest : public ros::Msg + { + public: + typedef const char* _light_name_type; + _light_name_type light_name; + typedef std_msgs::ColorRGBA _diffuse_type; + _diffuse_type diffuse; + typedef double _attenuation_constant_type; + _attenuation_constant_type attenuation_constant; + typedef double _attenuation_linear_type; + _attenuation_linear_type attenuation_linear; + typedef double _attenuation_quadratic_type; + _attenuation_quadratic_type attenuation_quadratic; + + SetLightPropertiesRequest(): + light_name(""), + diffuse(), + attenuation_constant(0), + attenuation_linear(0), + attenuation_quadratic(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_light_name = strlen(this->light_name); + varToArr(outbuffer + offset, length_light_name); + offset += 4; + memcpy(outbuffer + offset, this->light_name, length_light_name); + offset += length_light_name; + offset += this->diffuse.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_attenuation_constant; + u_attenuation_constant.real = this->attenuation_constant; + *(outbuffer + offset + 0) = (u_attenuation_constant.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_attenuation_constant.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_attenuation_constant.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_attenuation_constant.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_attenuation_constant.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_attenuation_constant.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_attenuation_constant.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_attenuation_constant.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->attenuation_constant); + union { + double real; + uint64_t base; + } u_attenuation_linear; + u_attenuation_linear.real = this->attenuation_linear; + *(outbuffer + offset + 0) = (u_attenuation_linear.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_attenuation_linear.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_attenuation_linear.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_attenuation_linear.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_attenuation_linear.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_attenuation_linear.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_attenuation_linear.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_attenuation_linear.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->attenuation_linear); + union { + double real; + uint64_t base; + } u_attenuation_quadratic; + u_attenuation_quadratic.real = this->attenuation_quadratic; + *(outbuffer + offset + 0) = (u_attenuation_quadratic.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_attenuation_quadratic.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_attenuation_quadratic.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_attenuation_quadratic.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_attenuation_quadratic.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_attenuation_quadratic.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_attenuation_quadratic.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_attenuation_quadratic.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->attenuation_quadratic); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_light_name; + arrToVar(length_light_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_light_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_light_name-1]=0; + this->light_name = (char *)(inbuffer + offset-1); + offset += length_light_name; + offset += this->diffuse.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_attenuation_constant; + u_attenuation_constant.base = 0; + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_attenuation_constant.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->attenuation_constant = u_attenuation_constant.real; + offset += sizeof(this->attenuation_constant); + union { + double real; + uint64_t base; + } u_attenuation_linear; + u_attenuation_linear.base = 0; + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_attenuation_linear.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->attenuation_linear = u_attenuation_linear.real; + offset += sizeof(this->attenuation_linear); + union { + double real; + uint64_t base; + } u_attenuation_quadratic; + u_attenuation_quadratic.base = 0; + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_attenuation_quadratic.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->attenuation_quadratic = u_attenuation_quadratic.real; + offset += sizeof(this->attenuation_quadratic); + return offset; + } + + const char * getType(){ return SETLIGHTPROPERTIES; }; + const char * getMD5(){ return "73ad1ac5e9e312ddf7c74f38ad843f34"; }; + + }; + + class SetLightPropertiesResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetLightPropertiesResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETLIGHTPROPERTIES; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetLightProperties { + public: + typedef SetLightPropertiesRequest Request; + typedef SetLightPropertiesResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/SetLinkProperties.h b/source/ros-max-lib/ros_lib/gazebo_msgs/SetLinkProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..3b0ae61ccfde44f78cb0f6730ecd8a20da16a0f6 --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/SetLinkProperties.h @@ -0,0 +1,370 @@ +#ifndef _ROS_SERVICE_SetLinkProperties_h +#define _ROS_SERVICE_SetLinkProperties_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" + +namespace gazebo_msgs +{ + +static const char SETLINKPROPERTIES[] = "gazebo_msgs/SetLinkProperties"; + + class SetLinkPropertiesRequest : public ros::Msg + { + public: + typedef const char* _link_name_type; + _link_name_type link_name; + typedef geometry_msgs::Pose _com_type; + _com_type com; + typedef bool _gravity_mode_type; + _gravity_mode_type gravity_mode; + typedef double _mass_type; + _mass_type mass; + typedef double _ixx_type; + _ixx_type ixx; + typedef double _ixy_type; + _ixy_type ixy; + typedef double _ixz_type; + _ixz_type ixz; + typedef double _iyy_type; + _iyy_type iyy; + typedef double _iyz_type; + _iyz_type iyz; + typedef double _izz_type; + _izz_type izz; + + SetLinkPropertiesRequest(): + link_name(""), + com(), + gravity_mode(0), + mass(0), + ixx(0), + ixy(0), + ixz(0), + iyy(0), + iyz(0), + izz(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_link_name = strlen(this->link_name); + varToArr(outbuffer + offset, length_link_name); + offset += 4; + memcpy(outbuffer + offset, this->link_name, length_link_name); + offset += length_link_name; + offset += this->com.serialize(outbuffer + offset); + union { + bool real; + uint8_t base; + } u_gravity_mode; + u_gravity_mode.real = this->gravity_mode; + *(outbuffer + offset + 0) = (u_gravity_mode.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->gravity_mode); + union { + double real; + uint64_t base; + } u_mass; + u_mass.real = this->mass; + *(outbuffer + offset + 0) = (u_mass.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_mass.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_mass.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_mass.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_mass.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_mass.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_mass.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_mass.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->mass); + union { + double real; + uint64_t base; + } u_ixx; + u_ixx.real = this->ixx; + *(outbuffer + offset + 0) = (u_ixx.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixx.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixx.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixx.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixx.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixx.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixx.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixx.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixx); + union { + double real; + uint64_t base; + } u_ixy; + u_ixy.real = this->ixy; + *(outbuffer + offset + 0) = (u_ixy.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixy.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixy.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixy.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixy.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixy.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixy.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixy.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixy); + union { + double real; + uint64_t base; + } u_ixz; + u_ixz.real = this->ixz; + *(outbuffer + offset + 0) = (u_ixz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixz); + union { + double real; + uint64_t base; + } u_iyy; + u_iyy.real = this->iyy; + *(outbuffer + offset + 0) = (u_iyy.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_iyy.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_iyy.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_iyy.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_iyy.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_iyy.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_iyy.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_iyy.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->iyy); + union { + double real; + uint64_t base; + } u_iyz; + u_iyz.real = this->iyz; + *(outbuffer + offset + 0) = (u_iyz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_iyz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_iyz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_iyz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_iyz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_iyz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_iyz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_iyz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->iyz); + union { + double real; + uint64_t base; + } u_izz; + u_izz.real = this->izz; + *(outbuffer + offset + 0) = (u_izz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_izz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_izz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_izz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_izz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_izz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_izz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_izz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->izz); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_link_name; + arrToVar(length_link_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_link_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_link_name-1]=0; + this->link_name = (char *)(inbuffer + offset-1); + offset += length_link_name; + offset += this->com.deserialize(inbuffer + offset); + union { + bool real; + uint8_t base; + } u_gravity_mode; + u_gravity_mode.base = 0; + u_gravity_mode.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->gravity_mode = u_gravity_mode.real; + offset += sizeof(this->gravity_mode); + union { + double real; + uint64_t base; + } u_mass; + u_mass.base = 0; + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_mass.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->mass = u_mass.real; + offset += sizeof(this->mass); + union { + double real; + uint64_t base; + } u_ixx; + u_ixx.base = 0; + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixx = u_ixx.real; + offset += sizeof(this->ixx); + union { + double real; + uint64_t base; + } u_ixy; + u_ixy.base = 0; + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixy = u_ixy.real; + offset += sizeof(this->ixy); + union { + double real; + uint64_t base; + } u_ixz; + u_ixz.base = 0; + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixz = u_ixz.real; + offset += sizeof(this->ixz); + union { + double real; + uint64_t base; + } u_iyy; + u_iyy.base = 0; + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->iyy = u_iyy.real; + offset += sizeof(this->iyy); + union { + double real; + uint64_t base; + } u_iyz; + u_iyz.base = 0; + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->iyz = u_iyz.real; + offset += sizeof(this->iyz); + union { + double real; + uint64_t base; + } u_izz; + u_izz.base = 0; + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->izz = u_izz.real; + offset += sizeof(this->izz); + return offset; + } + + const char * getType(){ return SETLINKPROPERTIES; }; + const char * getMD5(){ return "68ac74a4be01b165bc305b5ccdc45e91"; }; + + }; + + class SetLinkPropertiesResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetLinkPropertiesResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETLINKPROPERTIES; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetLinkProperties { + public: + typedef SetLinkPropertiesRequest Request; + typedef SetLinkPropertiesResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/SetLinkState.h b/source/ros-max-lib/ros_lib/gazebo_msgs/SetLinkState.h new file mode 100644 index 0000000000000000000000000000000000000000..f089492a4d235b7cee253d91bfeb9504b18063f6 --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/SetLinkState.h @@ -0,0 +1,111 @@ +#ifndef _ROS_SERVICE_SetLinkState_h +#define _ROS_SERVICE_SetLinkState_h +#include +#include +#include +#include "ros/msg.h" +#include "gazebo_msgs/LinkState.h" + +namespace gazebo_msgs +{ + +static const char SETLINKSTATE[] = "gazebo_msgs/SetLinkState"; + + class SetLinkStateRequest : public ros::Msg + { + public: + typedef gazebo_msgs::LinkState _link_state_type; + _link_state_type link_state; + + SetLinkStateRequest(): + link_state() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->link_state.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->link_state.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return SETLINKSTATE; }; + const char * getMD5(){ return "22a2c757d56911b6f27868159e9a872d"; }; + + }; + + class SetLinkStateResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetLinkStateResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETLINKSTATE; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetLinkState { + public: + typedef SetLinkStateRequest Request; + typedef SetLinkStateResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/SetModelConfiguration.h b/source/ros-max-lib/ros_lib/gazebo_msgs/SetModelConfiguration.h new file mode 100644 index 0000000000000000000000000000000000000000..d2da91bea16de1fc1c9b3a7ce30423754adfb9b7 --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/SetModelConfiguration.h @@ -0,0 +1,228 @@ +#ifndef _ROS_SERVICE_SetModelConfiguration_h +#define _ROS_SERVICE_SetModelConfiguration_h +#include +#include +#include +#include "ros/msg.h" + +namespace gazebo_msgs +{ + +static const char SETMODELCONFIGURATION[] = "gazebo_msgs/SetModelConfiguration"; + + class SetModelConfigurationRequest : public ros::Msg + { + public: + typedef const char* _model_name_type; + _model_name_type model_name; + typedef const char* _urdf_param_name_type; + _urdf_param_name_type urdf_param_name; + uint32_t joint_names_length; + typedef char* _joint_names_type; + _joint_names_type st_joint_names; + _joint_names_type * joint_names; + uint32_t joint_positions_length; + typedef double _joint_positions_type; + _joint_positions_type st_joint_positions; + _joint_positions_type * joint_positions; + + SetModelConfigurationRequest(): + model_name(""), + urdf_param_name(""), + joint_names_length(0), joint_names(NULL), + joint_positions_length(0), joint_positions(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_model_name = strlen(this->model_name); + varToArr(outbuffer + offset, length_model_name); + offset += 4; + memcpy(outbuffer + offset, this->model_name, length_model_name); + offset += length_model_name; + uint32_t length_urdf_param_name = strlen(this->urdf_param_name); + varToArr(outbuffer + offset, length_urdf_param_name); + offset += 4; + memcpy(outbuffer + offset, this->urdf_param_name, length_urdf_param_name); + offset += length_urdf_param_name; + *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_names_length); + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_joint_namesi = strlen(this->joint_names[i]); + varToArr(outbuffer + offset, length_joint_namesi); + offset += 4; + memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); + offset += length_joint_namesi; + } + *(outbuffer + offset + 0) = (this->joint_positions_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_positions_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_positions_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_positions_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_positions_length); + for( uint32_t i = 0; i < joint_positions_length; i++){ + union { + double real; + uint64_t base; + } u_joint_positionsi; + u_joint_positionsi.real = this->joint_positions[i]; + *(outbuffer + offset + 0) = (u_joint_positionsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_joint_positionsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_joint_positionsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_joint_positionsi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_joint_positionsi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_joint_positionsi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_joint_positionsi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_joint_positionsi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->joint_positions[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_model_name; + arrToVar(length_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_name-1]=0; + this->model_name = (char *)(inbuffer + offset-1); + offset += length_model_name; + uint32_t length_urdf_param_name; + arrToVar(length_urdf_param_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_urdf_param_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_urdf_param_name-1]=0; + this->urdf_param_name = (char *)(inbuffer + offset-1); + offset += length_urdf_param_name; + uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_names_length); + if(joint_names_lengthT > joint_names_length) + this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); + joint_names_length = joint_names_lengthT; + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_st_joint_names; + arrToVar(length_st_joint_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_joint_names-1]=0; + this->st_joint_names = (char *)(inbuffer + offset-1); + offset += length_st_joint_names; + memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); + } + uint32_t joint_positions_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_positions_length); + if(joint_positions_lengthT > joint_positions_length) + this->joint_positions = (double*)realloc(this->joint_positions, joint_positions_lengthT * sizeof(double)); + joint_positions_length = joint_positions_lengthT; + for( uint32_t i = 0; i < joint_positions_length; i++){ + union { + double real; + uint64_t base; + } u_st_joint_positions; + u_st_joint_positions.base = 0; + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_joint_positions.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_joint_positions = u_st_joint_positions.real; + offset += sizeof(this->st_joint_positions); + memcpy( &(this->joint_positions[i]), &(this->st_joint_positions), sizeof(double)); + } + return offset; + } + + const char * getType(){ return SETMODELCONFIGURATION; }; + const char * getMD5(){ return "160eae60f51fabff255480c70afa289f"; }; + + }; + + class SetModelConfigurationResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetModelConfigurationResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETMODELCONFIGURATION; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetModelConfiguration { + public: + typedef SetModelConfigurationRequest Request; + typedef SetModelConfigurationResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/SetModelState.h b/source/ros-max-lib/ros_lib/gazebo_msgs/SetModelState.h new file mode 100644 index 0000000000000000000000000000000000000000..ef251ad6309c0bf01685417fae3b06e0011e5b71 --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/SetModelState.h @@ -0,0 +1,111 @@ +#ifndef _ROS_SERVICE_SetModelState_h +#define _ROS_SERVICE_SetModelState_h +#include +#include +#include +#include "ros/msg.h" +#include "gazebo_msgs/ModelState.h" + +namespace gazebo_msgs +{ + +static const char SETMODELSTATE[] = "gazebo_msgs/SetModelState"; + + class SetModelStateRequest : public ros::Msg + { + public: + typedef gazebo_msgs::ModelState _model_state_type; + _model_state_type model_state; + + SetModelStateRequest(): + model_state() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->model_state.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->model_state.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return SETMODELSTATE; }; + const char * getMD5(){ return "cb042b0e91880f4661b29ea5b6234350"; }; + + }; + + class SetModelStateResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetModelStateResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETMODELSTATE; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetModelState { + public: + typedef SetModelStateRequest Request; + typedef SetModelStateResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/SetPhysicsProperties.h b/source/ros-max-lib/ros_lib/gazebo_msgs/SetPhysicsProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..ea160b5142063181af9639cbbb91d3811a40178d --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/SetPhysicsProperties.h @@ -0,0 +1,181 @@ +#ifndef _ROS_SERVICE_SetPhysicsProperties_h +#define _ROS_SERVICE_SetPhysicsProperties_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Vector3.h" +#include "gazebo_msgs/ODEPhysics.h" + +namespace gazebo_msgs +{ + +static const char SETPHYSICSPROPERTIES[] = "gazebo_msgs/SetPhysicsProperties"; + + class SetPhysicsPropertiesRequest : public ros::Msg + { + public: + typedef double _time_step_type; + _time_step_type time_step; + typedef double _max_update_rate_type; + _max_update_rate_type max_update_rate; + typedef geometry_msgs::Vector3 _gravity_type; + _gravity_type gravity; + typedef gazebo_msgs::ODEPhysics _ode_config_type; + _ode_config_type ode_config; + + SetPhysicsPropertiesRequest(): + time_step(0), + max_update_rate(0), + gravity(), + ode_config() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_time_step; + u_time_step.real = this->time_step; + *(outbuffer + offset + 0) = (u_time_step.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_time_step.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_time_step.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_time_step.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_time_step.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_time_step.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_time_step.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_time_step.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->time_step); + union { + double real; + uint64_t base; + } u_max_update_rate; + u_max_update_rate.real = this->max_update_rate; + *(outbuffer + offset + 0) = (u_max_update_rate.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_update_rate.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_update_rate.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_update_rate.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max_update_rate.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max_update_rate.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max_update_rate.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max_update_rate.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max_update_rate); + offset += this->gravity.serialize(outbuffer + offset); + offset += this->ode_config.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_time_step; + u_time_step.base = 0; + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_time_step.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->time_step = u_time_step.real; + offset += sizeof(this->time_step); + union { + double real; + uint64_t base; + } u_max_update_rate; + u_max_update_rate.base = 0; + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max_update_rate.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max_update_rate = u_max_update_rate.real; + offset += sizeof(this->max_update_rate); + offset += this->gravity.deserialize(inbuffer + offset); + offset += this->ode_config.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return SETPHYSICSPROPERTIES; }; + const char * getMD5(){ return "abd9f82732b52b92e9d6bb36e6a82452"; }; + + }; + + class SetPhysicsPropertiesResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetPhysicsPropertiesResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETPHYSICSPROPERTIES; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetPhysicsProperties { + public: + typedef SetPhysicsPropertiesRequest Request; + typedef SetPhysicsPropertiesResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/SpawnModel.h b/source/ros-max-lib/ros_lib/gazebo_msgs/SpawnModel.h new file mode 100644 index 0000000000000000000000000000000000000000..215b0019d671282b0eed7b1e2f31f5e66f750885 --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/SpawnModel.h @@ -0,0 +1,179 @@ +#ifndef _ROS_SERVICE_SpawnModel_h +#define _ROS_SERVICE_SpawnModel_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" + +namespace gazebo_msgs +{ + +static const char SPAWNMODEL[] = "gazebo_msgs/SpawnModel"; + + class SpawnModelRequest : public ros::Msg + { + public: + typedef const char* _model_name_type; + _model_name_type model_name; + typedef const char* _model_xml_type; + _model_xml_type model_xml; + typedef const char* _robot_namespace_type; + _robot_namespace_type robot_namespace; + typedef geometry_msgs::Pose _initial_pose_type; + _initial_pose_type initial_pose; + typedef const char* _reference_frame_type; + _reference_frame_type reference_frame; + + SpawnModelRequest(): + model_name(""), + model_xml(""), + robot_namespace(""), + initial_pose(), + reference_frame("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_model_name = strlen(this->model_name); + varToArr(outbuffer + offset, length_model_name); + offset += 4; + memcpy(outbuffer + offset, this->model_name, length_model_name); + offset += length_model_name; + uint32_t length_model_xml = strlen(this->model_xml); + varToArr(outbuffer + offset, length_model_xml); + offset += 4; + memcpy(outbuffer + offset, this->model_xml, length_model_xml); + offset += length_model_xml; + uint32_t length_robot_namespace = strlen(this->robot_namespace); + varToArr(outbuffer + offset, length_robot_namespace); + offset += 4; + memcpy(outbuffer + offset, this->robot_namespace, length_robot_namespace); + offset += length_robot_namespace; + offset += this->initial_pose.serialize(outbuffer + offset); + uint32_t length_reference_frame = strlen(this->reference_frame); + varToArr(outbuffer + offset, length_reference_frame); + offset += 4; + memcpy(outbuffer + offset, this->reference_frame, length_reference_frame); + offset += length_reference_frame; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_model_name; + arrToVar(length_model_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_name-1]=0; + this->model_name = (char *)(inbuffer + offset-1); + offset += length_model_name; + uint32_t length_model_xml; + arrToVar(length_model_xml, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_model_xml; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_model_xml-1]=0; + this->model_xml = (char *)(inbuffer + offset-1); + offset += length_model_xml; + uint32_t length_robot_namespace; + arrToVar(length_robot_namespace, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_robot_namespace; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_robot_namespace-1]=0; + this->robot_namespace = (char *)(inbuffer + offset-1); + offset += length_robot_namespace; + offset += this->initial_pose.deserialize(inbuffer + offset); + uint32_t length_reference_frame; + arrToVar(length_reference_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_reference_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_reference_frame-1]=0; + this->reference_frame = (char *)(inbuffer + offset-1); + offset += length_reference_frame; + return offset; + } + + const char * getType(){ return SPAWNMODEL; }; + const char * getMD5(){ return "6d0eba5753761cd57e6263a056b79930"; }; + + }; + + class SpawnModelResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SpawnModelResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SPAWNMODEL; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SpawnModel { + public: + typedef SpawnModelRequest Request; + typedef SpawnModelResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/gazebo_msgs/WorldState.h b/source/ros-max-lib/ros_lib/gazebo_msgs/WorldState.h new file mode 100644 index 0000000000000000000000000000000000000000..43eb25694281ccda142d0b3eaddc6648e9d8b776 --- /dev/null +++ b/source/ros-max-lib/ros_lib/gazebo_msgs/WorldState.h @@ -0,0 +1,159 @@ +#ifndef _ROS_gazebo_msgs_WorldState_h +#define _ROS_gazebo_msgs_WorldState_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Twist.h" +#include "geometry_msgs/Wrench.h" + +namespace gazebo_msgs +{ + + class WorldState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t name_length; + typedef char* _name_type; + _name_type st_name; + _name_type * name; + uint32_t pose_length; + typedef geometry_msgs::Pose _pose_type; + _pose_type st_pose; + _pose_type * pose; + uint32_t twist_length; + typedef geometry_msgs::Twist _twist_type; + _twist_type st_twist; + _twist_type * twist; + uint32_t wrench_length; + typedef geometry_msgs::Wrench _wrench_type; + _wrench_type st_wrench; + _wrench_type * wrench; + + WorldState(): + header(), + name_length(0), name(NULL), + pose_length(0), pose(NULL), + twist_length(0), twist(NULL), + wrench_length(0), wrench(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->name_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->name_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->name_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->name_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->name_length); + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_namei = strlen(this->name[i]); + varToArr(outbuffer + offset, length_namei); + offset += 4; + memcpy(outbuffer + offset, this->name[i], length_namei); + offset += length_namei; + } + *(outbuffer + offset + 0) = (this->pose_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->pose_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->pose_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->pose_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->pose_length); + for( uint32_t i = 0; i < pose_length; i++){ + offset += this->pose[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->twist_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->twist_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->twist_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->twist_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->twist_length); + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->twist[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->wrench_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->wrench_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->wrench_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->wrench_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->wrench_length); + for( uint32_t i = 0; i < wrench_length; i++){ + offset += this->wrench[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t name_lengthT = ((uint32_t) (*(inbuffer + offset))); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->name_length); + if(name_lengthT > name_length) + this->name = (char**)realloc(this->name, name_lengthT * sizeof(char*)); + name_length = name_lengthT; + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_st_name; + arrToVar(length_st_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_name-1]=0; + this->st_name = (char *)(inbuffer + offset-1); + offset += length_st_name; + memcpy( &(this->name[i]), &(this->st_name), sizeof(char*)); + } + uint32_t pose_lengthT = ((uint32_t) (*(inbuffer + offset))); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + pose_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->pose_length); + if(pose_lengthT > pose_length) + this->pose = (geometry_msgs::Pose*)realloc(this->pose, pose_lengthT * sizeof(geometry_msgs::Pose)); + pose_length = pose_lengthT; + for( uint32_t i = 0; i < pose_length; i++){ + offset += this->st_pose.deserialize(inbuffer + offset); + memcpy( &(this->pose[i]), &(this->st_pose), sizeof(geometry_msgs::Pose)); + } + uint32_t twist_lengthT = ((uint32_t) (*(inbuffer + offset))); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->twist_length); + if(twist_lengthT > twist_length) + this->twist = (geometry_msgs::Twist*)realloc(this->twist, twist_lengthT * sizeof(geometry_msgs::Twist)); + twist_length = twist_lengthT; + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->st_twist.deserialize(inbuffer + offset); + memcpy( &(this->twist[i]), &(this->st_twist), sizeof(geometry_msgs::Twist)); + } + uint32_t wrench_lengthT = ((uint32_t) (*(inbuffer + offset))); + wrench_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + wrench_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + wrench_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->wrench_length); + if(wrench_lengthT > wrench_length) + this->wrench = (geometry_msgs::Wrench*)realloc(this->wrench, wrench_lengthT * sizeof(geometry_msgs::Wrench)); + wrench_length = wrench_lengthT; + for( uint32_t i = 0; i < wrench_length; i++){ + offset += this->st_wrench.deserialize(inbuffer + offset); + memcpy( &(this->wrench[i]), &(this->st_wrench), sizeof(geometry_msgs::Wrench)); + } + return offset; + } + + const char * getType(){ return "gazebo_msgs/WorldState"; }; + const char * getMD5(){ return "de1a9de3ab7ba97ac0e9ec01a4eb481e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/Accel.h b/source/ros-max-lib/ros_lib/geometry_msgs/Accel.h new file mode 100644 index 0000000000000000000000000000000000000000..b5931f673cd76fbc030e42a02f9364752ecc5726 --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/Accel.h @@ -0,0 +1,49 @@ +#ifndef _ROS_geometry_msgs_Accel_h +#define _ROS_geometry_msgs_Accel_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Vector3.h" + +namespace geometry_msgs +{ + + class Accel : public ros::Msg + { + public: + typedef geometry_msgs::Vector3 _linear_type; + _linear_type linear; + typedef geometry_msgs::Vector3 _angular_type; + _angular_type angular; + + Accel(): + linear(), + angular() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->linear.serialize(outbuffer + offset); + offset += this->angular.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->linear.deserialize(inbuffer + offset); + offset += this->angular.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Accel"; }; + const char * getMD5(){ return "9f195f881246fdfa2798d1d3eebca84a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/AccelStamped.h b/source/ros-max-lib/ros_lib/geometry_msgs/AccelStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..d7f785804e678ba810707dafe0dc99b222d19467 --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/AccelStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_AccelStamped_h +#define _ROS_geometry_msgs_AccelStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Accel.h" + +namespace geometry_msgs +{ + + class AccelStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Accel _accel_type; + _accel_type accel; + + AccelStamped(): + header(), + accel() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->accel.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->accel.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/AccelStamped"; }; + const char * getMD5(){ return "d8a98a5d81351b6eb0578c78557e7659"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/AccelWithCovariance.h b/source/ros-max-lib/ros_lib/geometry_msgs/AccelWithCovariance.h new file mode 100644 index 0000000000000000000000000000000000000000..9ce6ca28726a3552d0d3476940e4d393ea2264ec --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/AccelWithCovariance.h @@ -0,0 +1,79 @@ +#ifndef _ROS_geometry_msgs_AccelWithCovariance_h +#define _ROS_geometry_msgs_AccelWithCovariance_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Accel.h" + +namespace geometry_msgs +{ + + class AccelWithCovariance : public ros::Msg + { + public: + typedef geometry_msgs::Accel _accel_type; + _accel_type accel; + double covariance[36]; + + AccelWithCovariance(): + accel(), + covariance() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->accel.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.real = this->covariance[i]; + *(outbuffer + offset + 0) = (u_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->accel.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.base = 0; + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->covariance[i] = u_covariancei.real; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + const char * getType(){ return "geometry_msgs/AccelWithCovariance"; }; + const char * getMD5(){ return "ad5a718d699c6be72a02b8d6a139f334"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/AccelWithCovarianceStamped.h b/source/ros-max-lib/ros_lib/geometry_msgs/AccelWithCovarianceStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..3153d39bc160828858eff4e2b7b5a0f3a469cbeb --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/AccelWithCovarianceStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_AccelWithCovarianceStamped_h +#define _ROS_geometry_msgs_AccelWithCovarianceStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/AccelWithCovariance.h" + +namespace geometry_msgs +{ + + class AccelWithCovarianceStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::AccelWithCovariance _accel_type; + _accel_type accel; + + AccelWithCovarianceStamped(): + header(), + accel() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->accel.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->accel.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/AccelWithCovarianceStamped"; }; + const char * getMD5(){ return "96adb295225031ec8d57fb4251b0a886"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/Inertia.h b/source/ros-max-lib/ros_lib/geometry_msgs/Inertia.h new file mode 100644 index 0000000000000000000000000000000000000000..4c487c058aea418012129d671de5eb64d1def7e9 --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/Inertia.h @@ -0,0 +1,268 @@ +#ifndef _ROS_geometry_msgs_Inertia_h +#define _ROS_geometry_msgs_Inertia_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Vector3.h" + +namespace geometry_msgs +{ + + class Inertia : public ros::Msg + { + public: + typedef double _m_type; + _m_type m; + typedef geometry_msgs::Vector3 _com_type; + _com_type com; + typedef double _ixx_type; + _ixx_type ixx; + typedef double _ixy_type; + _ixy_type ixy; + typedef double _ixz_type; + _ixz_type ixz; + typedef double _iyy_type; + _iyy_type iyy; + typedef double _iyz_type; + _iyz_type iyz; + typedef double _izz_type; + _izz_type izz; + + Inertia(): + m(0), + com(), + ixx(0), + ixy(0), + ixz(0), + iyy(0), + iyz(0), + izz(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_m; + u_m.real = this->m; + *(outbuffer + offset + 0) = (u_m.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_m.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_m.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_m.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_m.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_m.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_m.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_m.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->m); + offset += this->com.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_ixx; + u_ixx.real = this->ixx; + *(outbuffer + offset + 0) = (u_ixx.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixx.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixx.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixx.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixx.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixx.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixx.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixx.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixx); + union { + double real; + uint64_t base; + } u_ixy; + u_ixy.real = this->ixy; + *(outbuffer + offset + 0) = (u_ixy.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixy.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixy.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixy.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixy.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixy.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixy.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixy.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixy); + union { + double real; + uint64_t base; + } u_ixz; + u_ixz.real = this->ixz; + *(outbuffer + offset + 0) = (u_ixz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixz); + union { + double real; + uint64_t base; + } u_iyy; + u_iyy.real = this->iyy; + *(outbuffer + offset + 0) = (u_iyy.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_iyy.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_iyy.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_iyy.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_iyy.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_iyy.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_iyy.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_iyy.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->iyy); + union { + double real; + uint64_t base; + } u_iyz; + u_iyz.real = this->iyz; + *(outbuffer + offset + 0) = (u_iyz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_iyz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_iyz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_iyz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_iyz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_iyz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_iyz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_iyz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->iyz); + union { + double real; + uint64_t base; + } u_izz; + u_izz.real = this->izz; + *(outbuffer + offset + 0) = (u_izz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_izz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_izz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_izz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_izz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_izz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_izz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_izz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->izz); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_m; + u_m.base = 0; + u_m.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->m = u_m.real; + offset += sizeof(this->m); + offset += this->com.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_ixx; + u_ixx.base = 0; + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixx = u_ixx.real; + offset += sizeof(this->ixx); + union { + double real; + uint64_t base; + } u_ixy; + u_ixy.base = 0; + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixy = u_ixy.real; + offset += sizeof(this->ixy); + union { + double real; + uint64_t base; + } u_ixz; + u_ixz.base = 0; + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixz = u_ixz.real; + offset += sizeof(this->ixz); + union { + double real; + uint64_t base; + } u_iyy; + u_iyy.base = 0; + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->iyy = u_iyy.real; + offset += sizeof(this->iyy); + union { + double real; + uint64_t base; + } u_iyz; + u_iyz.base = 0; + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->iyz = u_iyz.real; + offset += sizeof(this->iyz); + union { + double real; + uint64_t base; + } u_izz; + u_izz.base = 0; + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->izz = u_izz.real; + offset += sizeof(this->izz); + return offset; + } + + const char * getType(){ return "geometry_msgs/Inertia"; }; + const char * getMD5(){ return "1d26e4bb6c83ff141c5cf0d883c2b0fe"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/InertiaStamped.h b/source/ros-max-lib/ros_lib/geometry_msgs/InertiaStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..2d8c94408c51f05f44a7a7b9dd07575108b03009 --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/InertiaStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_InertiaStamped_h +#define _ROS_geometry_msgs_InertiaStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Inertia.h" + +namespace geometry_msgs +{ + + class InertiaStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Inertia _inertia_type; + _inertia_type inertia; + + InertiaStamped(): + header(), + inertia() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->inertia.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->inertia.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/InertiaStamped"; }; + const char * getMD5(){ return "ddee48caeab5a966c5e8d166654a9ac7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/Point.h b/source/ros-max-lib/ros_lib/geometry_msgs/Point.h new file mode 100644 index 0000000000000000000000000000000000000000..4764c84c8a87274abcbfddccf70a0a0b2c119e5d --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/Point.h @@ -0,0 +1,134 @@ +#ifndef _ROS_geometry_msgs_Point_h +#define _ROS_geometry_msgs_Point_h + +#include +#include +#include +#include "../ros/msg.h" + +namespace geometry_msgs +{ + + class Point : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _z_type; + _z_type z; + + Point(): + x(0), + y(0), + z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.real = this->z; + *(outbuffer + offset + 0) = (u_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.base = 0; + u_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->z = u_z.real; + offset += sizeof(this->z); + return offset; + } + + const char * getType(){ return "geometry_msgs/Point"; }; + const char * getMD5(){ return "4a842b65f413084dc2b10fb484ea7f17"; }; + + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/Point32.h b/source/ros-max-lib/ros_lib/geometry_msgs/Point32.h new file mode 100644 index 0000000000000000000000000000000000000000..8c3b572a3a632122f5a27523c0fb6356c2df048c --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/Point32.h @@ -0,0 +1,110 @@ +#ifndef _ROS_geometry_msgs_Point32_h +#define _ROS_geometry_msgs_Point32_h + +#include +#include +#include +#include "ros/msg.h" + +namespace geometry_msgs +{ + + class Point32 : public ros::Msg + { + public: + typedef float _x_type; + _x_type x; + typedef float _y_type; + _y_type y; + typedef float _z_type; + _z_type z; + + Point32(): + x(0), + y(0), + z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_z; + u_z.real = this->z; + *(outbuffer + offset + 0) = (u_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_z.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->x = u_x.real; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->y = u_y.real; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_z; + u_z.base = 0; + u_z.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_z.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_z.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_z.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->z = u_z.real; + offset += sizeof(this->z); + return offset; + } + + const char * getType(){ return "geometry_msgs/Point32"; }; + const char * getMD5(){ return "cc153912f1453b708d221682bc23d9ac"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/PointStamped.h b/source/ros-max-lib/ros_lib/geometry_msgs/PointStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..ce24530c64615703d9da2eb0fc32505593c3aaad --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/PointStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_PointStamped_h +#define _ROS_geometry_msgs_PointStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Point.h" + +namespace geometry_msgs +{ + + class PointStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Point _point_type; + _point_type point; + + PointStamped(): + header(), + point() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->point.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->point.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/PointStamped"; }; + const char * getMD5(){ return "c63aecb41bfdfd6b7e1fac37c7cbe7bf"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/Polygon.h b/source/ros-max-lib/ros_lib/geometry_msgs/Polygon.h new file mode 100644 index 0000000000000000000000000000000000000000..8ff3276fae77860328542ac3891e8c30b346c289 --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/Polygon.h @@ -0,0 +1,64 @@ +#ifndef _ROS_geometry_msgs_Polygon_h +#define _ROS_geometry_msgs_Polygon_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Point32.h" + +namespace geometry_msgs +{ + + class Polygon : public ros::Msg + { + public: + uint32_t points_length; + typedef geometry_msgs::Point32 _points_type; + _points_type st_points; + _points_type * points; + + Polygon(): + points_length(0), points(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->points_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->points_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->points_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->points_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->points_length); + for( uint32_t i = 0; i < points_length; i++){ + offset += this->points[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t points_lengthT = ((uint32_t) (*(inbuffer + offset))); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->points_length); + if(points_lengthT > points_length) + this->points = (geometry_msgs::Point32*)realloc(this->points, points_lengthT * sizeof(geometry_msgs::Point32)); + points_length = points_lengthT; + for( uint32_t i = 0; i < points_length; i++){ + offset += this->st_points.deserialize(inbuffer + offset); + memcpy( &(this->points[i]), &(this->st_points), sizeof(geometry_msgs::Point32)); + } + return offset; + } + + const char * getType(){ return "geometry_msgs/Polygon"; }; + const char * getMD5(){ return "cd60a26494a087f577976f0329fa120e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/PolygonStamped.h b/source/ros-max-lib/ros_lib/geometry_msgs/PolygonStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..badc359a3ab7e4bc9d4220e424674e99be58f5ea --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/PolygonStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_PolygonStamped_h +#define _ROS_geometry_msgs_PolygonStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Polygon.h" + +namespace geometry_msgs +{ + + class PolygonStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Polygon _polygon_type; + _polygon_type polygon; + + PolygonStamped(): + header(), + polygon() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->polygon.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->polygon.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/PolygonStamped"; }; + const char * getMD5(){ return "c6be8f7dc3bee7fe9e8d296070f53340"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/Pose.h b/source/ros-max-lib/ros_lib/geometry_msgs/Pose.h new file mode 100644 index 0000000000000000000000000000000000000000..1a9f46ca69f4b4251e06eb1258ed5cf1247ba15f --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/Pose.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_Pose_h +#define _ROS_geometry_msgs_Pose_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../geometry_msgs/Point.h" +#include "../geometry_msgs/Quaternion.h" + +namespace geometry_msgs +{ + + class Pose : public ros::Msg + { + public: + typedef geometry_msgs::Point _position_type; + _position_type position; + typedef geometry_msgs::Quaternion _orientation_type; + _orientation_type orientation; + + Pose(): + position(), + orientation() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->position.serialize(outbuffer + offset); + offset += this->orientation.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->position.deserialize(inbuffer + offset); + offset += this->orientation.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Pose"; }; + const char * getMD5(){ return "e45d45a5a1ce597b249e23fb30fc871f"; }; + + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/Pose2D.h b/source/ros-max-lib/ros_lib/geometry_msgs/Pose2D.h new file mode 100644 index 0000000000000000000000000000000000000000..2858588075a54e4fa24390fe0f95f152a1a4ba56 --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/Pose2D.h @@ -0,0 +1,134 @@ +#ifndef _ROS_geometry_msgs_Pose2D_h +#define _ROS_geometry_msgs_Pose2D_h + +#include +#include +#include +#include "ros/msg.h" + +namespace geometry_msgs +{ + + class Pose2D : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _theta_type; + _theta_type theta; + + Pose2D(): + x(0), + y(0), + theta(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_theta; + u_theta.real = this->theta; + *(outbuffer + offset + 0) = (u_theta.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_theta.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_theta.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_theta.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_theta.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_theta.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_theta.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_theta.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->theta); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_theta; + u_theta.base = 0; + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->theta = u_theta.real; + offset += sizeof(this->theta); + return offset; + } + + const char * getType(){ return "geometry_msgs/Pose2D"; }; + const char * getMD5(){ return "938fa65709584ad8e77d238529be13b8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/PoseArray.h b/source/ros-max-lib/ros_lib/geometry_msgs/PoseArray.h new file mode 100644 index 0000000000000000000000000000000000000000..9e6a89e0ce2071b01bdbe85351dc0b9cb0a84146 --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/PoseArray.h @@ -0,0 +1,70 @@ +#ifndef _ROS_geometry_msgs_PoseArray_h +#define _ROS_geometry_msgs_PoseArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" + +namespace geometry_msgs +{ + + class PoseArray : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t poses_length; + typedef geometry_msgs::Pose _poses_type; + _poses_type st_poses; + _poses_type * poses; + + PoseArray(): + header(), + poses_length(0), poses(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->poses_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->poses_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->poses_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->poses_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->poses_length); + for( uint32_t i = 0; i < poses_length; i++){ + offset += this->poses[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t poses_lengthT = ((uint32_t) (*(inbuffer + offset))); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->poses_length); + if(poses_lengthT > poses_length) + this->poses = (geometry_msgs::Pose*)realloc(this->poses, poses_lengthT * sizeof(geometry_msgs::Pose)); + poses_length = poses_lengthT; + for( uint32_t i = 0; i < poses_length; i++){ + offset += this->st_poses.deserialize(inbuffer + offset); + memcpy( &(this->poses[i]), &(this->st_poses), sizeof(geometry_msgs::Pose)); + } + return offset; + } + + const char * getType(){ return "geometry_msgs/PoseArray"; }; + const char * getMD5(){ return "916c28c5764443f268b296bb671b9d97"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/PoseStamped.h b/source/ros-max-lib/ros_lib/geometry_msgs/PoseStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..cb79251f2fe602474ecacae4f5f28884e114d046 --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/PoseStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_PoseStamped_h +#define _ROS_geometry_msgs_PoseStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" + +namespace geometry_msgs +{ + + class PoseStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + + PoseStamped(): + header(), + pose() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->pose.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->pose.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/PoseStamped"; }; + const char * getMD5(){ return "d3812c3cbc69362b77dc0b19b345f8f5"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/PoseWithCovariance.h b/source/ros-max-lib/ros_lib/geometry_msgs/PoseWithCovariance.h new file mode 100644 index 0000000000000000000000000000000000000000..92cb1cea9f049e310fad593f4d535800b2d1bc9e --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/PoseWithCovariance.h @@ -0,0 +1,79 @@ +#ifndef _ROS_geometry_msgs_PoseWithCovariance_h +#define _ROS_geometry_msgs_PoseWithCovariance_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../geometry_msgs/Pose.h" + +namespace geometry_msgs +{ + + class PoseWithCovariance : public ros::Msg + { + public: + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + double covariance[36]; + + PoseWithCovariance(): + pose(), + covariance() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->pose.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.real = this->covariance[i]; + *(outbuffer + offset + 0) = (u_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->pose.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.base = 0; + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->covariance[i] = u_covariancei.real; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + const char * getType(){ return "geometry_msgs/PoseWithCovariance"; }; + const char * getMD5(){ return "c23e848cf1b7533a8d7c259073a97e6f"; }; + + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/PoseWithCovarianceStamped.h b/source/ros-max-lib/ros_lib/geometry_msgs/PoseWithCovarianceStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..db623cda0de35053b2576af258b9ad8f53de320a --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/PoseWithCovarianceStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_PoseWithCovarianceStamped_h +#define _ROS_geometry_msgs_PoseWithCovarianceStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/PoseWithCovariance.h" + +namespace geometry_msgs +{ + + class PoseWithCovarianceStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::PoseWithCovariance _pose_type; + _pose_type pose; + + PoseWithCovarianceStamped(): + header(), + pose() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->pose.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->pose.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/PoseWithCovarianceStamped"; }; + const char * getMD5(){ return "953b798c0f514ff060a53a3498ce6246"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/Quaternion.h b/source/ros-max-lib/ros_lib/geometry_msgs/Quaternion.h new file mode 100644 index 0000000000000000000000000000000000000000..19f4bb8d721c67a354bab4ce3e0cdcc30a29105d --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/Quaternion.h @@ -0,0 +1,166 @@ +#ifndef _ROS_geometry_msgs_Quaternion_h +#define _ROS_geometry_msgs_Quaternion_h + +#include +#include +#include +#include "../ros/msg.h" + +namespace geometry_msgs +{ + + class Quaternion : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _z_type; + _z_type z; + typedef double _w_type; + _w_type w; + + Quaternion(): + x(0), + y(0), + z(0), + w(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.real = this->z; + *(outbuffer + offset + 0) = (u_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->z); + union { + double real; + uint64_t base; + } u_w; + u_w.real = this->w; + *(outbuffer + offset + 0) = (u_w.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_w.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_w.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_w.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_w.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_w.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_w.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_w.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->w); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.base = 0; + u_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->z = u_z.real; + offset += sizeof(this->z); + union { + double real; + uint64_t base; + } u_w; + u_w.base = 0; + u_w.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->w = u_w.real; + offset += sizeof(this->w); + return offset; + } + + const char * getType(){ return "geometry_msgs/Quaternion"; }; + const char * getMD5(){ return "a779879fadf0160734f906b8c19c7004"; }; + + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/QuaternionStamped.h b/source/ros-max-lib/ros_lib/geometry_msgs/QuaternionStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..626358d0bd362808056532e586ec17a3e4052271 --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/QuaternionStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_QuaternionStamped_h +#define _ROS_geometry_msgs_QuaternionStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Quaternion.h" + +namespace geometry_msgs +{ + + class QuaternionStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Quaternion _quaternion_type; + _quaternion_type quaternion; + + QuaternionStamped(): + header(), + quaternion() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->quaternion.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->quaternion.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/QuaternionStamped"; }; + const char * getMD5(){ return "e57f1e547e0e1fd13504588ffc8334e2"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/Transform.h b/source/ros-max-lib/ros_lib/geometry_msgs/Transform.h new file mode 100644 index 0000000000000000000000000000000000000000..967eabb4b32cc0a2e01c62f9ee13394c8c46270f --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/Transform.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_Transform_h +#define _ROS_geometry_msgs_Transform_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../geometry_msgs/Vector3.h" +#include "../geometry_msgs/Quaternion.h" + +namespace geometry_msgs +{ + + class Transform : public ros::Msg + { + public: + typedef geometry_msgs::Vector3 _translation_type; + _translation_type translation; + typedef geometry_msgs::Quaternion _rotation_type; + _rotation_type rotation; + + Transform(): + translation(), + rotation() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->translation.serialize(outbuffer + offset); + offset += this->rotation.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->translation.deserialize(inbuffer + offset); + offset += this->rotation.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Transform"; }; + const char * getMD5(){ return "ac9eff44abf714214112b05d54a3cf9b"; }; + + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/TransformStamped.h b/source/ros-max-lib/ros_lib/geometry_msgs/TransformStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..ef3f7a8039281c2607f412f2c5e21bc4cd2653fd --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/TransformStamped.h @@ -0,0 +1,67 @@ +#ifndef _ROS_geometry_msgs_TransformStamped_h +#define _ROS_geometry_msgs_TransformStamped_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../std_msgs/Header.h" +#include "../geometry_msgs/Transform.h" + +namespace geometry_msgs +{ + + class TransformStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _child_frame_id_type; + _child_frame_id_type child_frame_id; + typedef geometry_msgs::Transform _transform_type; + _transform_type transform; + + TransformStamped(): + header(), + child_frame_id(""), + transform() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_child_frame_id = strlen(this->child_frame_id); + varToArr(outbuffer + offset, length_child_frame_id); + offset += 4; + memcpy(outbuffer + offset, this->child_frame_id, length_child_frame_id); + offset += length_child_frame_id; + offset += this->transform.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_child_frame_id; + arrToVar(length_child_frame_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_child_frame_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_child_frame_id-1]=0; + this->child_frame_id = (char *)(inbuffer + offset-1); + offset += length_child_frame_id; + offset += this->transform.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/TransformStamped"; }; + const char * getMD5(){ return "b5764a33bfeb3588febc2682852579b0"; }; + + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/Twist.h b/source/ros-max-lib/ros_lib/geometry_msgs/Twist.h new file mode 100644 index 0000000000000000000000000000000000000000..a6f980ad9c1c6250fc94580dfe1ad4c0d1f67116 --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/Twist.h @@ -0,0 +1,51 @@ +#ifndef _ROS_geometry_msgs_Twist_h +#define _ROS_geometry_msgs_Twist_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../geometry_msgs/Vector3.h" + +namespace geometry_msgs +{ + + class Twist : public ros::Msg + { + public: + typedef geometry_msgs::Vector3 _linear_type; + _linear_type linear; + typedef geometry_msgs::Vector3 _angular_type; + _angular_type angular; + + Twist(): + linear(), + angular() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->linear.serialize(outbuffer + offset); + offset += this->angular.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->linear.deserialize(inbuffer + offset); + offset += this->angular.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Twist"; }; + const char * getMD5(){ return "9f195f881246fdfa2798d1d3eebca84a"; }; + + }; + +} + + +#endif diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/TwistStamped.h b/source/ros-max-lib/ros_lib/geometry_msgs/TwistStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..40143c8cdedc200190e27b62a4b3c04d2e34542e --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/TwistStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_TwistStamped_h +#define _ROS_geometry_msgs_TwistStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Twist.h" + +namespace geometry_msgs +{ + + class TwistStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Twist _twist_type; + _twist_type twist; + + TwistStamped(): + header(), + twist() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->twist.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->twist.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/TwistStamped"; }; + const char * getMD5(){ return "98d34b0043a2093cf9d9345ab6eef12e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/TwistWithCovariance.h b/source/ros-max-lib/ros_lib/geometry_msgs/TwistWithCovariance.h new file mode 100644 index 0000000000000000000000000000000000000000..ab6fb611fe058aff897c7b6dcdc50d36434c16d4 --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/TwistWithCovariance.h @@ -0,0 +1,79 @@ +#ifndef _ROS_geometry_msgs_TwistWithCovariance_h +#define _ROS_geometry_msgs_TwistWithCovariance_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../geometry_msgs/Twist.h" + +namespace geometry_msgs +{ + + class TwistWithCovariance : public ros::Msg + { + public: + typedef geometry_msgs::Twist _twist_type; + _twist_type twist; + double covariance[36]; + + TwistWithCovariance(): + twist(), + covariance() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->twist.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.real = this->covariance[i]; + *(outbuffer + offset + 0) = (u_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->twist.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.base = 0; + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->covariance[i] = u_covariancei.real; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + const char * getType(){ return "geometry_msgs/TwistWithCovariance"; }; + const char * getMD5(){ return "1fe8a28e6890a4cc3ae4c3ca5c7d82e6"; }; + + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/TwistWithCovarianceStamped.h b/source/ros-max-lib/ros_lib/geometry_msgs/TwistWithCovarianceStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..701edff536c9d742e891c7e57338b5f947bc08ab --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/TwistWithCovarianceStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_TwistWithCovarianceStamped_h +#define _ROS_geometry_msgs_TwistWithCovarianceStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/TwistWithCovariance.h" + +namespace geometry_msgs +{ + + class TwistWithCovarianceStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::TwistWithCovariance _twist_type; + _twist_type twist; + + TwistWithCovarianceStamped(): + header(), + twist() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->twist.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->twist.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/TwistWithCovarianceStamped"; }; + const char * getMD5(){ return "8927a1a12fb2607ceea095b2dc440a96"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/Vector3.h b/source/ros-max-lib/ros_lib/geometry_msgs/Vector3.h new file mode 100644 index 0000000000000000000000000000000000000000..efbab98d71b75e3a1c5f250cb2a59ca31afaf8b4 --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/Vector3.h @@ -0,0 +1,134 @@ +#ifndef _ROS_geometry_msgs_Vector3_h +#define _ROS_geometry_msgs_Vector3_h + +#include +#include +#include +#include "../ros/msg.h" + +namespace geometry_msgs +{ + + class Vector3 : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _z_type; + _z_type z; + + Vector3(): + x(0), + y(0), + z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.real = this->z; + *(outbuffer + offset + 0) = (u_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.base = 0; + u_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->z = u_z.real; + offset += sizeof(this->z); + return offset; + } + + const char * getType(){ return "geometry_msgs/Vector3"; }; + const char * getMD5(){ return "4a842b65f413084dc2b10fb484ea7f17"; }; + + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/Vector3Stamped.h b/source/ros-max-lib/ros_lib/geometry_msgs/Vector3Stamped.h new file mode 100644 index 0000000000000000000000000000000000000000..9032066eb078f2e0df2b0a345582df7234af39ed --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/Vector3Stamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_Vector3Stamped_h +#define _ROS_geometry_msgs_Vector3Stamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Vector3.h" + +namespace geometry_msgs +{ + + class Vector3Stamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Vector3 _vector_type; + _vector_type vector; + + Vector3Stamped(): + header(), + vector() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->vector.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->vector.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Vector3Stamped"; }; + const char * getMD5(){ return "7b324c7325e683bf02a9b14b01090ec7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/Wrench.h b/source/ros-max-lib/ros_lib/geometry_msgs/Wrench.h new file mode 100644 index 0000000000000000000000000000000000000000..52e5934188f6f24363bb3ace2e2709aaaff1b9c9 --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/Wrench.h @@ -0,0 +1,49 @@ +#ifndef _ROS_geometry_msgs_Wrench_h +#define _ROS_geometry_msgs_Wrench_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Vector3.h" + +namespace geometry_msgs +{ + + class Wrench : public ros::Msg + { + public: + typedef geometry_msgs::Vector3 _force_type; + _force_type force; + typedef geometry_msgs::Vector3 _torque_type; + _torque_type torque; + + Wrench(): + force(), + torque() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->force.serialize(outbuffer + offset); + offset += this->torque.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->force.deserialize(inbuffer + offset); + offset += this->torque.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Wrench"; }; + const char * getMD5(){ return "4f539cf138b23283b520fd271b567936"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/geometry_msgs/WrenchStamped.h b/source/ros-max-lib/ros_lib/geometry_msgs/WrenchStamped.h new file mode 100644 index 0000000000000000000000000000000000000000..41b82f90bc6336c84443730f3e1211f1f58e0368 --- /dev/null +++ b/source/ros-max-lib/ros_lib/geometry_msgs/WrenchStamped.h @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_WrenchStamped_h +#define _ROS_geometry_msgs_WrenchStamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Wrench.h" + +namespace geometry_msgs +{ + + class WrenchStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Wrench _wrench_type; + _wrench_type wrench; + + WrenchStamped(): + header(), + wrench() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->wrench.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->wrench.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/WrenchStamped"; }; + const char * getMD5(){ return "d78d3cb249ce23087ade7e7d0c40cfa7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/image_exposure_msgs/ExposureSequence.h b/source/ros-max-lib/ros_lib/image_exposure_msgs/ExposureSequence.h new file mode 100644 index 0000000000000000000000000000000000000000..7cbcdf73e91b347ddf6f64883c4048f5f98519d0 --- /dev/null +++ b/source/ros-max-lib/ros_lib/image_exposure_msgs/ExposureSequence.h @@ -0,0 +1,119 @@ +#ifndef _ROS_image_exposure_msgs_ExposureSequence_h +#define _ROS_image_exposure_msgs_ExposureSequence_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace image_exposure_msgs +{ + + class ExposureSequence : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t shutter_length; + typedef uint32_t _shutter_type; + _shutter_type st_shutter; + _shutter_type * shutter; + typedef float _gain_type; + _gain_type gain; + typedef uint16_t _white_balance_blue_type; + _white_balance_blue_type white_balance_blue; + typedef uint16_t _white_balance_red_type; + _white_balance_red_type white_balance_red; + + ExposureSequence(): + header(), + shutter_length(0), shutter(NULL), + gain(0), + white_balance_blue(0), + white_balance_red(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->shutter_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->shutter_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->shutter_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->shutter_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->shutter_length); + for( uint32_t i = 0; i < shutter_length; i++){ + *(outbuffer + offset + 0) = (this->shutter[i] >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->shutter[i] >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->shutter[i] >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->shutter[i] >> (8 * 3)) & 0xFF; + offset += sizeof(this->shutter[i]); + } + union { + float real; + uint32_t base; + } u_gain; + u_gain.real = this->gain; + *(outbuffer + offset + 0) = (u_gain.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_gain.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_gain.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_gain.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->gain); + *(outbuffer + offset + 0) = (this->white_balance_blue >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->white_balance_blue >> (8 * 1)) & 0xFF; + offset += sizeof(this->white_balance_blue); + *(outbuffer + offset + 0) = (this->white_balance_red >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->white_balance_red >> (8 * 1)) & 0xFF; + offset += sizeof(this->white_balance_red); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t shutter_lengthT = ((uint32_t) (*(inbuffer + offset))); + shutter_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + shutter_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + shutter_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->shutter_length); + if(shutter_lengthT > shutter_length) + this->shutter = (uint32_t*)realloc(this->shutter, shutter_lengthT * sizeof(uint32_t)); + shutter_length = shutter_lengthT; + for( uint32_t i = 0; i < shutter_length; i++){ + this->st_shutter = ((uint32_t) (*(inbuffer + offset))); + this->st_shutter |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->st_shutter |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->st_shutter |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->st_shutter); + memcpy( &(this->shutter[i]), &(this->st_shutter), sizeof(uint32_t)); + } + union { + float real; + uint32_t base; + } u_gain; + u_gain.base = 0; + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->gain = u_gain.real; + offset += sizeof(this->gain); + this->white_balance_blue = ((uint16_t) (*(inbuffer + offset))); + this->white_balance_blue |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->white_balance_blue); + this->white_balance_red = ((uint16_t) (*(inbuffer + offset))); + this->white_balance_red |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->white_balance_red); + return offset; + } + + const char * getType(){ return "image_exposure_msgs/ExposureSequence"; }; + const char * getMD5(){ return "81d98e1e20eab8beb4bd07beeba6a398"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/image_exposure_msgs/ImageExposureStatistics.h b/source/ros-max-lib/ros_lib/image_exposure_msgs/ImageExposureStatistics.h new file mode 100644 index 0000000000000000000000000000000000000000..2c366c3ad961b9c2ee2800451b72d4b607db042d --- /dev/null +++ b/source/ros-max-lib/ros_lib/image_exposure_msgs/ImageExposureStatistics.h @@ -0,0 +1,324 @@ +#ifndef _ROS_image_exposure_msgs_ImageExposureStatistics_h +#define _ROS_image_exposure_msgs_ImageExposureStatistics_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" +#include "statistics_msgs/Stats1D.h" + +namespace image_exposure_msgs +{ + + class ImageExposureStatistics : public ros::Msg + { + public: + typedef ros::Time _stamp_type; + _stamp_type stamp; + typedef const char* _time_reference_type; + _time_reference_type time_reference; + typedef float _shutterms_type; + _shutterms_type shutterms; + typedef float _gaindb_type; + _gaindb_type gaindb; + typedef uint32_t _underExposed_type; + _underExposed_type underExposed; + typedef uint32_t _overExposed_type; + _overExposed_type overExposed; + typedef statistics_msgs::Stats1D _pixelVal_type; + _pixelVal_type pixelVal; + typedef statistics_msgs::Stats1D _pixelAge_type; + _pixelAge_type pixelAge; + typedef double _meanIrradiance_type; + _meanIrradiance_type meanIrradiance; + typedef double _minMeasurableIrradiance_type; + _minMeasurableIrradiance_type minMeasurableIrradiance; + typedef double _maxMeasurableIrradiance_type; + _maxMeasurableIrradiance_type maxMeasurableIrradiance; + typedef double _minObservedIrradiance_type; + _minObservedIrradiance_type minObservedIrradiance; + typedef double _maxObservedIrradiance_type; + _maxObservedIrradiance_type maxObservedIrradiance; + + ImageExposureStatistics(): + stamp(), + time_reference(""), + shutterms(0), + gaindb(0), + underExposed(0), + overExposed(0), + pixelVal(), + pixelAge(), + meanIrradiance(0), + minMeasurableIrradiance(0), + maxMeasurableIrradiance(0), + minObservedIrradiance(0), + maxObservedIrradiance(0) + { + } + + 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_time_reference = strlen(this->time_reference); + varToArr(outbuffer + offset, length_time_reference); + offset += 4; + memcpy(outbuffer + offset, this->time_reference, length_time_reference); + offset += length_time_reference; + union { + float real; + uint32_t base; + } u_shutterms; + u_shutterms.real = this->shutterms; + *(outbuffer + offset + 0) = (u_shutterms.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_shutterms.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_shutterms.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_shutterms.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->shutterms); + union { + float real; + uint32_t base; + } u_gaindb; + u_gaindb.real = this->gaindb; + *(outbuffer + offset + 0) = (u_gaindb.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_gaindb.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_gaindb.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_gaindb.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->gaindb); + *(outbuffer + offset + 0) = (this->underExposed >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->underExposed >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->underExposed >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->underExposed >> (8 * 3)) & 0xFF; + offset += sizeof(this->underExposed); + *(outbuffer + offset + 0) = (this->overExposed >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->overExposed >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->overExposed >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->overExposed >> (8 * 3)) & 0xFF; + offset += sizeof(this->overExposed); + offset += this->pixelVal.serialize(outbuffer + offset); + offset += this->pixelAge.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_meanIrradiance; + u_meanIrradiance.real = this->meanIrradiance; + *(outbuffer + offset + 0) = (u_meanIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_meanIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_meanIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_meanIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_meanIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_meanIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_meanIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_meanIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->meanIrradiance); + union { + double real; + uint64_t base; + } u_minMeasurableIrradiance; + u_minMeasurableIrradiance.real = this->minMeasurableIrradiance; + *(outbuffer + offset + 0) = (u_minMeasurableIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_minMeasurableIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_minMeasurableIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_minMeasurableIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_minMeasurableIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_minMeasurableIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_minMeasurableIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_minMeasurableIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->minMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_maxMeasurableIrradiance; + u_maxMeasurableIrradiance.real = this->maxMeasurableIrradiance; + *(outbuffer + offset + 0) = (u_maxMeasurableIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_maxMeasurableIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_maxMeasurableIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_maxMeasurableIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_maxMeasurableIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_maxMeasurableIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_maxMeasurableIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_maxMeasurableIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->maxMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_minObservedIrradiance; + u_minObservedIrradiance.real = this->minObservedIrradiance; + *(outbuffer + offset + 0) = (u_minObservedIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_minObservedIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_minObservedIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_minObservedIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_minObservedIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_minObservedIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_minObservedIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_minObservedIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->minObservedIrradiance); + union { + double real; + uint64_t base; + } u_maxObservedIrradiance; + u_maxObservedIrradiance.real = this->maxObservedIrradiance; + *(outbuffer + offset + 0) = (u_maxObservedIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_maxObservedIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_maxObservedIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_maxObservedIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_maxObservedIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_maxObservedIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_maxObservedIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_maxObservedIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->maxObservedIrradiance); + 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_time_reference; + arrToVar(length_time_reference, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_time_reference; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_time_reference-1]=0; + this->time_reference = (char *)(inbuffer + offset-1); + offset += length_time_reference; + union { + float real; + uint32_t base; + } u_shutterms; + u_shutterms.base = 0; + u_shutterms.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_shutterms.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_shutterms.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_shutterms.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->shutterms = u_shutterms.real; + offset += sizeof(this->shutterms); + union { + float real; + uint32_t base; + } u_gaindb; + u_gaindb.base = 0; + u_gaindb.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_gaindb.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_gaindb.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_gaindb.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->gaindb = u_gaindb.real; + offset += sizeof(this->gaindb); + this->underExposed = ((uint32_t) (*(inbuffer + offset))); + this->underExposed |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->underExposed |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->underExposed |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->underExposed); + this->overExposed = ((uint32_t) (*(inbuffer + offset))); + this->overExposed |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->overExposed |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->overExposed |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->overExposed); + offset += this->pixelVal.deserialize(inbuffer + offset); + offset += this->pixelAge.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_meanIrradiance; + u_meanIrradiance.base = 0; + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->meanIrradiance = u_meanIrradiance.real; + offset += sizeof(this->meanIrradiance); + union { + double real; + uint64_t base; + } u_minMeasurableIrradiance; + u_minMeasurableIrradiance.base = 0; + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->minMeasurableIrradiance = u_minMeasurableIrradiance.real; + offset += sizeof(this->minMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_maxMeasurableIrradiance; + u_maxMeasurableIrradiance.base = 0; + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->maxMeasurableIrradiance = u_maxMeasurableIrradiance.real; + offset += sizeof(this->maxMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_minObservedIrradiance; + u_minObservedIrradiance.base = 0; + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->minObservedIrradiance = u_minObservedIrradiance.real; + offset += sizeof(this->minObservedIrradiance); + union { + double real; + uint64_t base; + } u_maxObservedIrradiance; + u_maxObservedIrradiance.base = 0; + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->maxObservedIrradiance = u_maxObservedIrradiance.real; + offset += sizeof(this->maxObservedIrradiance); + return offset; + } + + const char * getType(){ return "image_exposure_msgs/ImageExposureStatistics"; }; + const char * getMD5(){ return "334dc170ce6287d1de470f25be78dd9e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/image_exposure_msgs/SequenceExposureStatistics.h b/source/ros-max-lib/ros_lib/image_exposure_msgs/SequenceExposureStatistics.h new file mode 100644 index 0000000000000000000000000000000000000000..2ba1b3176fdf70f05af219d2bbefec116c965096 --- /dev/null +++ b/source/ros-max-lib/ros_lib/image_exposure_msgs/SequenceExposureStatistics.h @@ -0,0 +1,250 @@ +#ifndef _ROS_image_exposure_msgs_SequenceExposureStatistics_h +#define _ROS_image_exposure_msgs_SequenceExposureStatistics_h + +#include +#include +#include +#include "ros/msg.h" +#include "image_exposure_msgs/ImageExposureStatistics.h" + +namespace image_exposure_msgs +{ + + class SequenceExposureStatistics : public ros::Msg + { + public: + uint32_t exposures_length; + typedef image_exposure_msgs::ImageExposureStatistics _exposures_type; + _exposures_type st_exposures; + _exposures_type * exposures; + typedef uint32_t _underExposed_type; + _underExposed_type underExposed; + typedef uint32_t _overExposed_type; + _overExposed_type overExposed; + typedef double _meanIrradiance_type; + _meanIrradiance_type meanIrradiance; + typedef double _minMeasurableIrradiance_type; + _minMeasurableIrradiance_type minMeasurableIrradiance; + typedef double _maxMeasurableIrradiance_type; + _maxMeasurableIrradiance_type maxMeasurableIrradiance; + typedef double _minObservedIrradiance_type; + _minObservedIrradiance_type minObservedIrradiance; + typedef double _maxObservedIrradiance_type; + _maxObservedIrradiance_type maxObservedIrradiance; + + SequenceExposureStatistics(): + exposures_length(0), exposures(NULL), + underExposed(0), + overExposed(0), + meanIrradiance(0), + minMeasurableIrradiance(0), + maxMeasurableIrradiance(0), + minObservedIrradiance(0), + maxObservedIrradiance(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->exposures_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->exposures_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->exposures_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->exposures_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->exposures_length); + for( uint32_t i = 0; i < exposures_length; i++){ + offset += this->exposures[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->underExposed >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->underExposed >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->underExposed >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->underExposed >> (8 * 3)) & 0xFF; + offset += sizeof(this->underExposed); + *(outbuffer + offset + 0) = (this->overExposed >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->overExposed >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->overExposed >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->overExposed >> (8 * 3)) & 0xFF; + offset += sizeof(this->overExposed); + union { + double real; + uint64_t base; + } u_meanIrradiance; + u_meanIrradiance.real = this->meanIrradiance; + *(outbuffer + offset + 0) = (u_meanIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_meanIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_meanIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_meanIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_meanIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_meanIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_meanIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_meanIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->meanIrradiance); + union { + double real; + uint64_t base; + } u_minMeasurableIrradiance; + u_minMeasurableIrradiance.real = this->minMeasurableIrradiance; + *(outbuffer + offset + 0) = (u_minMeasurableIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_minMeasurableIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_minMeasurableIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_minMeasurableIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_minMeasurableIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_minMeasurableIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_minMeasurableIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_minMeasurableIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->minMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_maxMeasurableIrradiance; + u_maxMeasurableIrradiance.real = this->maxMeasurableIrradiance; + *(outbuffer + offset + 0) = (u_maxMeasurableIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_maxMeasurableIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_maxMeasurableIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_maxMeasurableIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_maxMeasurableIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_maxMeasurableIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_maxMeasurableIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_maxMeasurableIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->maxMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_minObservedIrradiance; + u_minObservedIrradiance.real = this->minObservedIrradiance; + *(outbuffer + offset + 0) = (u_minObservedIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_minObservedIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_minObservedIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_minObservedIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_minObservedIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_minObservedIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_minObservedIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_minObservedIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->minObservedIrradiance); + union { + double real; + uint64_t base; + } u_maxObservedIrradiance; + u_maxObservedIrradiance.real = this->maxObservedIrradiance; + *(outbuffer + offset + 0) = (u_maxObservedIrradiance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_maxObservedIrradiance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_maxObservedIrradiance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_maxObservedIrradiance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_maxObservedIrradiance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_maxObservedIrradiance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_maxObservedIrradiance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_maxObservedIrradiance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->maxObservedIrradiance); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t exposures_lengthT = ((uint32_t) (*(inbuffer + offset))); + exposures_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + exposures_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + exposures_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->exposures_length); + if(exposures_lengthT > exposures_length) + this->exposures = (image_exposure_msgs::ImageExposureStatistics*)realloc(this->exposures, exposures_lengthT * sizeof(image_exposure_msgs::ImageExposureStatistics)); + exposures_length = exposures_lengthT; + for( uint32_t i = 0; i < exposures_length; i++){ + offset += this->st_exposures.deserialize(inbuffer + offset); + memcpy( &(this->exposures[i]), &(this->st_exposures), sizeof(image_exposure_msgs::ImageExposureStatistics)); + } + this->underExposed = ((uint32_t) (*(inbuffer + offset))); + this->underExposed |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->underExposed |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->underExposed |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->underExposed); + this->overExposed = ((uint32_t) (*(inbuffer + offset))); + this->overExposed |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->overExposed |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->overExposed |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->overExposed); + union { + double real; + uint64_t base; + } u_meanIrradiance; + u_meanIrradiance.base = 0; + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_meanIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->meanIrradiance = u_meanIrradiance.real; + offset += sizeof(this->meanIrradiance); + union { + double real; + uint64_t base; + } u_minMeasurableIrradiance; + u_minMeasurableIrradiance.base = 0; + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_minMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->minMeasurableIrradiance = u_minMeasurableIrradiance.real; + offset += sizeof(this->minMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_maxMeasurableIrradiance; + u_maxMeasurableIrradiance.base = 0; + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_maxMeasurableIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->maxMeasurableIrradiance = u_maxMeasurableIrradiance.real; + offset += sizeof(this->maxMeasurableIrradiance); + union { + double real; + uint64_t base; + } u_minObservedIrradiance; + u_minObservedIrradiance.base = 0; + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_minObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->minObservedIrradiance = u_minObservedIrradiance.real; + offset += sizeof(this->minObservedIrradiance); + union { + double real; + uint64_t base; + } u_maxObservedIrradiance; + u_maxObservedIrradiance.base = 0; + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_maxObservedIrradiance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->maxObservedIrradiance = u_maxObservedIrradiance.real; + offset += sizeof(this->maxObservedIrradiance); + return offset; + } + + const char * getType(){ return "image_exposure_msgs/SequenceExposureStatistics"; }; + const char * getMD5(){ return "2a4f3187c50e7b3544984e9e28ce4328"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/laser_assembler/AssembleScans.h b/source/ros-max-lib/ros_lib/laser_assembler/AssembleScans.h new file mode 100644 index 0000000000000000000000000000000000000000..7aa87458fff78542655b53691a234de11ad69a12 --- /dev/null +++ b/source/ros-max-lib/ros_lib/laser_assembler/AssembleScans.h @@ -0,0 +1,123 @@ +#ifndef _ROS_SERVICE_AssembleScans_h +#define _ROS_SERVICE_AssembleScans_h +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" +#include "sensor_msgs/PointCloud.h" + +namespace laser_assembler +{ + +static const char ASSEMBLESCANS[] = "laser_assembler/AssembleScans"; + + class AssembleScansRequest : public ros::Msg + { + public: + typedef ros::Time _begin_type; + _begin_type begin; + typedef ros::Time _end_type; + _end_type end; + + AssembleScansRequest(): + begin(), + end() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->begin.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->begin.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->begin.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->begin.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->begin.sec); + *(outbuffer + offset + 0) = (this->begin.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->begin.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->begin.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->begin.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->begin.nsec); + *(outbuffer + offset + 0) = (this->end.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->end.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->end.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->end.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->end.sec); + *(outbuffer + offset + 0) = (this->end.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->end.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->end.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->end.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->end.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->begin.sec = ((uint32_t) (*(inbuffer + offset))); + this->begin.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->begin.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->begin.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->begin.sec); + this->begin.nsec = ((uint32_t) (*(inbuffer + offset))); + this->begin.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->begin.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->begin.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->begin.nsec); + this->end.sec = ((uint32_t) (*(inbuffer + offset))); + this->end.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->end.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->end.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->end.sec); + this->end.nsec = ((uint32_t) (*(inbuffer + offset))); + this->end.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->end.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->end.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->end.nsec); + return offset; + } + + const char * getType(){ return ASSEMBLESCANS; }; + const char * getMD5(){ return "b341004f74e15bf5e1b2053a9183bdc7"; }; + + }; + + class AssembleScansResponse : public ros::Msg + { + public: + typedef sensor_msgs::PointCloud _cloud_type; + _cloud_type cloud; + + AssembleScansResponse(): + cloud() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->cloud.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->cloud.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return ASSEMBLESCANS; }; + const char * getMD5(){ return "4217b28a903e4ad7869a83b3653110ff"; }; + + }; + + class AssembleScans { + public: + typedef AssembleScansRequest Request; + typedef AssembleScansResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/laser_assembler/AssembleScans2.h b/source/ros-max-lib/ros_lib/laser_assembler/AssembleScans2.h new file mode 100644 index 0000000000000000000000000000000000000000..ae2f6b74f5ae57cde6d0b50a8b13dbde47fe227e --- /dev/null +++ b/source/ros-max-lib/ros_lib/laser_assembler/AssembleScans2.h @@ -0,0 +1,123 @@ +#ifndef _ROS_SERVICE_AssembleScans2_h +#define _ROS_SERVICE_AssembleScans2_h +#include +#include +#include +#include "ros/msg.h" +#include "sensor_msgs/PointCloud2.h" +#include "ros/time.h" + +namespace laser_assembler +{ + +static const char ASSEMBLESCANS2[] = "laser_assembler/AssembleScans2"; + + class AssembleScans2Request : public ros::Msg + { + public: + typedef ros::Time _begin_type; + _begin_type begin; + typedef ros::Time _end_type; + _end_type end; + + AssembleScans2Request(): + begin(), + end() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->begin.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->begin.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->begin.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->begin.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->begin.sec); + *(outbuffer + offset + 0) = (this->begin.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->begin.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->begin.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->begin.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->begin.nsec); + *(outbuffer + offset + 0) = (this->end.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->end.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->end.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->end.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->end.sec); + *(outbuffer + offset + 0) = (this->end.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->end.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->end.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->end.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->end.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->begin.sec = ((uint32_t) (*(inbuffer + offset))); + this->begin.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->begin.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->begin.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->begin.sec); + this->begin.nsec = ((uint32_t) (*(inbuffer + offset))); + this->begin.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->begin.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->begin.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->begin.nsec); + this->end.sec = ((uint32_t) (*(inbuffer + offset))); + this->end.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->end.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->end.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->end.sec); + this->end.nsec = ((uint32_t) (*(inbuffer + offset))); + this->end.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->end.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->end.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->end.nsec); + return offset; + } + + const char * getType(){ return ASSEMBLESCANS2; }; + const char * getMD5(){ return "b341004f74e15bf5e1b2053a9183bdc7"; }; + + }; + + class AssembleScans2Response : public ros::Msg + { + public: + typedef sensor_msgs::PointCloud2 _cloud_type; + _cloud_type cloud; + + AssembleScans2Response(): + cloud() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->cloud.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->cloud.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return ASSEMBLESCANS2; }; + const char * getMD5(){ return "96cec5374164b3b3d1d7ef5d7628a7ed"; }; + + }; + + class AssembleScans2 { + public: + typedef AssembleScans2Request Request; + typedef AssembleScans2Response Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/main.cpp b/source/ros-max-lib/ros_lib/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1e769e43080d7a6cc8f08dc4c238e4157de4dd77 --- /dev/null +++ b/source/ros-max-lib/ros_lib/main.cpp @@ -0,0 +1,118 @@ +// +// main.cpp +// ros_test +// +// Created by Orly Natan on 13/4/18. +// Copyright © 2018 Orly Natan. All rights reserved. +// + +/* (1) +#include + +int main(int argc, const char * argv[]) { + // insert code here... + std::cout << "Hello, World!\n"; + return 0; +} +*/ + +/* (2) + * rosserial Publisher Example + * Prints "hello ROS!" + */ + + +/* +#include "wrapper.h" + +char rosSrvrIp[] = "149.171.153.49"; +char hello[] = "Hello ROS From C/XCode!"; + + + int main() + { + ros_init_pub(rosSrvrIp); + ros_pub(hello); + } + + +*/ + + + + + + + + + + + + + + + + + +/* +#include "ros.h" +#include "std_msgs/String.h" +#include + +ros::NodeHandle nh; + +std_msgs::String str_msg; +ros::Publisher chatter("chatter", &str_msg); + +char rosSrvrIp[] = "149.171.153.49"; //192.168.15.121"; +char hello[] = "Hello ROS!"; + +int main() +{ + //nh.initNode(); + + + nh.initNode(rosSrvrIp); + nh.advertise(chatter); + + while(1) { + str_msg.data = hello; + chatter.publish( &str_msg ); + nh.spinOnce(); + printf("chattered\n"); + sleep(1); + } + +}*/ + +/* (3) + * rosserial_embeddedlinux subscriber example + * + * Prints a string sent on a subscribed ros topic. + * The string can be sent with e.g. + * $ rostopic pub chatter std_msgs/String -- "Hello Embedded Linux" + */ +/* +#include "ros.h" +#include "std_msgs/String.h" +#include + +ros::NodeHandle nh; +char rosSrvrIp[] = "149.171.153.52"; + +void messageCb(const std_msgs::String& received_msg){ + printf("Received subscribed chatter message: %s\n", received_msg.data); +} +ros::Subscriber sub("chatter", messageCb ); + +int main() +{ + //nh.initNode(); + nh.initNode(rosSrvrIp); + nh.subscribe(sub); + + while(1) { + sleep(1); + nh.spinOnce(); + } +}*/ diff --git a/source/ros-max-lib/ros_lib/map_msgs/GetMapROI.h b/source/ros-max-lib/ros_lib/map_msgs/GetMapROI.h new file mode 100644 index 0000000000000000000000000000000000000000..3d39495f973df2a91eb44da11a95baf934ea6c65 --- /dev/null +++ b/source/ros-max-lib/ros_lib/map_msgs/GetMapROI.h @@ -0,0 +1,204 @@ +#ifndef _ROS_SERVICE_GetMapROI_h +#define _ROS_SERVICE_GetMapROI_h +#include +#include +#include +#include "ros/msg.h" +#include "nav_msgs/OccupancyGrid.h" + +namespace map_msgs +{ + +static const char GETMAPROI[] = "map_msgs/GetMapROI"; + + class GetMapROIRequest : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _l_x_type; + _l_x_type l_x; + typedef double _l_y_type; + _l_y_type l_y; + + GetMapROIRequest(): + x(0), + y(0), + l_x(0), + l_y(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_l_x; + u_l_x.real = this->l_x; + *(outbuffer + offset + 0) = (u_l_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_l_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_l_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_l_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_l_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_l_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_l_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_l_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->l_x); + union { + double real; + uint64_t base; + } u_l_y; + u_l_y.real = this->l_y; + *(outbuffer + offset + 0) = (u_l_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_l_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_l_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_l_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_l_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_l_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_l_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_l_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->l_y); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_l_x; + u_l_x.base = 0; + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->l_x = u_l_x.real; + offset += sizeof(this->l_x); + union { + double real; + uint64_t base; + } u_l_y; + u_l_y.base = 0; + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->l_y = u_l_y.real; + offset += sizeof(this->l_y); + return offset; + } + + const char * getType(){ return GETMAPROI; }; + const char * getMD5(){ return "43c2ff8f45af555c0eaf070c401e9a47"; }; + + }; + + class GetMapROIResponse : public ros::Msg + { + public: + typedef nav_msgs::OccupancyGrid _sub_map_type; + _sub_map_type sub_map; + + GetMapROIResponse(): + sub_map() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->sub_map.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->sub_map.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return GETMAPROI; }; + const char * getMD5(){ return "4d1986519c00d81967d2891a606b234c"; }; + + }; + + class GetMapROI { + public: + typedef GetMapROIRequest Request; + typedef GetMapROIResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/map_msgs/GetPointMap.h b/source/ros-max-lib/ros_lib/map_msgs/GetPointMap.h new file mode 100644 index 0000000000000000000000000000000000000000..3da8ab148d43352a03ec437fbe58b84f7f847b8c --- /dev/null +++ b/source/ros-max-lib/ros_lib/map_msgs/GetPointMap.h @@ -0,0 +1,76 @@ +#ifndef _ROS_SERVICE_GetPointMap_h +#define _ROS_SERVICE_GetPointMap_h +#include +#include +#include +#include "ros/msg.h" +#include "sensor_msgs/PointCloud2.h" + +namespace map_msgs +{ + +static const char GETPOINTMAP[] = "map_msgs/GetPointMap"; + + class GetPointMapRequest : public ros::Msg + { + public: + + GetPointMapRequest() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return GETPOINTMAP; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetPointMapResponse : public ros::Msg + { + public: + typedef sensor_msgs::PointCloud2 _map_type; + _map_type map; + + GetPointMapResponse(): + map() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->map.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->map.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return GETPOINTMAP; }; + const char * getMD5(){ return "b84fbb39505086eb6a62d933c75cb7b4"; }; + + }; + + class GetPointMap { + public: + typedef GetPointMapRequest Request; + typedef GetPointMapResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/map_msgs/GetPointMapROI.h b/source/ros-max-lib/ros_lib/map_msgs/GetPointMapROI.h new file mode 100644 index 0000000000000000000000000000000000000000..b7c4cdad600370769ef51f1bf9cf7842e7efb2e1 --- /dev/null +++ b/source/ros-max-lib/ros_lib/map_msgs/GetPointMapROI.h @@ -0,0 +1,300 @@ +#ifndef _ROS_SERVICE_GetPointMapROI_h +#define _ROS_SERVICE_GetPointMapROI_h +#include +#include +#include +#include "ros/msg.h" +#include "sensor_msgs/PointCloud2.h" + +namespace map_msgs +{ + +static const char GETPOINTMAPROI[] = "map_msgs/GetPointMapROI"; + + class GetPointMapROIRequest : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _z_type; + _z_type z; + typedef double _r_type; + _r_type r; + typedef double _l_x_type; + _l_x_type l_x; + typedef double _l_y_type; + _l_y_type l_y; + typedef double _l_z_type; + _l_z_type l_z; + + GetPointMapROIRequest(): + x(0), + y(0), + z(0), + r(0), + l_x(0), + l_y(0), + l_z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.real = this->z; + *(outbuffer + offset + 0) = (u_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->z); + union { + double real; + uint64_t base; + } u_r; + u_r.real = this->r; + *(outbuffer + offset + 0) = (u_r.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_r.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_r.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_r.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_r.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_r.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_r.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_r.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->r); + union { + double real; + uint64_t base; + } u_l_x; + u_l_x.real = this->l_x; + *(outbuffer + offset + 0) = (u_l_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_l_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_l_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_l_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_l_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_l_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_l_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_l_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->l_x); + union { + double real; + uint64_t base; + } u_l_y; + u_l_y.real = this->l_y; + *(outbuffer + offset + 0) = (u_l_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_l_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_l_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_l_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_l_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_l_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_l_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_l_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->l_y); + union { + double real; + uint64_t base; + } u_l_z; + u_l_z.real = this->l_z; + *(outbuffer + offset + 0) = (u_l_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_l_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_l_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_l_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_l_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_l_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_l_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_l_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->l_z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.base = 0; + u_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->z = u_z.real; + offset += sizeof(this->z); + union { + double real; + uint64_t base; + } u_r; + u_r.base = 0; + u_r.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_r.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_r.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_r.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_r.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_r.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_r.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_r.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->r = u_r.real; + offset += sizeof(this->r); + union { + double real; + uint64_t base; + } u_l_x; + u_l_x.base = 0; + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_l_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->l_x = u_l_x.real; + offset += sizeof(this->l_x); + union { + double real; + uint64_t base; + } u_l_y; + u_l_y.base = 0; + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_l_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->l_y = u_l_y.real; + offset += sizeof(this->l_y); + union { + double real; + uint64_t base; + } u_l_z; + u_l_z.base = 0; + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_l_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->l_z = u_l_z.real; + offset += sizeof(this->l_z); + return offset; + } + + const char * getType(){ return GETPOINTMAPROI; }; + const char * getMD5(){ return "895f7e437a9a6dd225316872b187a303"; }; + + }; + + class GetPointMapROIResponse : public ros::Msg + { + public: + typedef sensor_msgs::PointCloud2 _sub_map_type; + _sub_map_type sub_map; + + GetPointMapROIResponse(): + sub_map() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->sub_map.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->sub_map.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return GETPOINTMAPROI; }; + const char * getMD5(){ return "313769f8b0e724525c6463336cbccd63"; }; + + }; + + class GetPointMapROI { + public: + typedef GetPointMapROIRequest Request; + typedef GetPointMapROIResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/map_msgs/OccupancyGridUpdate.h b/source/ros-max-lib/ros_lib/map_msgs/OccupancyGridUpdate.h new file mode 100644 index 0000000000000000000000000000000000000000..23590d28e90491bda7026c05be1e691a1d5e6c1c --- /dev/null +++ b/source/ros-max-lib/ros_lib/map_msgs/OccupancyGridUpdate.h @@ -0,0 +1,156 @@ +#ifndef _ROS_map_msgs_OccupancyGridUpdate_h +#define _ROS_map_msgs_OccupancyGridUpdate_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace map_msgs +{ + + class OccupancyGridUpdate : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef int32_t _x_type; + _x_type x; + typedef int32_t _y_type; + _y_type y; + typedef uint32_t _width_type; + _width_type width; + typedef uint32_t _height_type; + _height_type height; + uint32_t data_length; + typedef int8_t _data_type; + _data_type st_data; + _data_type * data; + + OccupancyGridUpdate(): + header(), + x(0), + y(0), + width(0), + height(0), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + int32_t real; + uint32_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->x); + union { + int32_t real; + uint32_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->y); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF; + offset += sizeof(this->width); + *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF; + offset += sizeof(this->height); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + int32_t real; + uint32_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->x = u_x.real; + offset += sizeof(this->x); + union { + int32_t real; + uint32_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->y = u_y.real; + offset += sizeof(this->y); + this->width = ((uint32_t) (*(inbuffer + offset))); + this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->width); + this->height = ((uint32_t) (*(inbuffer + offset))); + this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->height); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (int8_t*)realloc(this->data, data_lengthT * sizeof(int8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(int8_t)); + } + return offset; + } + + const char * getType(){ return "map_msgs/OccupancyGridUpdate"; }; + const char * getMD5(){ return "b295be292b335c34718bd939deebe1c9"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/map_msgs/PointCloud2Update.h b/source/ros-max-lib/ros_lib/map_msgs/PointCloud2Update.h new file mode 100644 index 0000000000000000000000000000000000000000..eee4cb176bcbc82e895b6db59d6b6b2ece1f84b7 --- /dev/null +++ b/source/ros-max-lib/ros_lib/map_msgs/PointCloud2Update.h @@ -0,0 +1,65 @@ +#ifndef _ROS_map_msgs_PointCloud2Update_h +#define _ROS_map_msgs_PointCloud2Update_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/PointCloud2.h" + +namespace map_msgs +{ + + class PointCloud2Update : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef uint32_t _type_type; + _type_type type; + typedef sensor_msgs::PointCloud2 _points_type; + _points_type points; + enum { ADD = 0 }; + enum { DELETE = 1 }; + + PointCloud2Update(): + header(), + type(0), + points() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->type >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->type >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->type >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->type >> (8 * 3)) & 0xFF; + offset += sizeof(this->type); + offset += this->points.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->type = ((uint32_t) (*(inbuffer + offset))); + this->type |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->type |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->type |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->type); + offset += this->points.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "map_msgs/PointCloud2Update"; }; + const char * getMD5(){ return "6c58e4f249ae9cd2b24fb1ee0f99195e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/map_msgs/ProjectedMap.h b/source/ros-max-lib/ros_lib/map_msgs/ProjectedMap.h new file mode 100644 index 0000000000000000000000000000000000000000..84e5be55eb95d1c9023692c768aeda42012abbe4 --- /dev/null +++ b/source/ros-max-lib/ros_lib/map_msgs/ProjectedMap.h @@ -0,0 +1,108 @@ +#ifndef _ROS_map_msgs_ProjectedMap_h +#define _ROS_map_msgs_ProjectedMap_h + +#include +#include +#include +#include "ros/msg.h" +#include "nav_msgs/OccupancyGrid.h" + +namespace map_msgs +{ + + class ProjectedMap : public ros::Msg + { + public: + typedef nav_msgs::OccupancyGrid _map_type; + _map_type map; + typedef double _min_z_type; + _min_z_type min_z; + typedef double _max_z_type; + _max_z_type max_z; + + ProjectedMap(): + map(), + min_z(0), + max_z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->map.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_min_z; + u_min_z.real = this->min_z; + *(outbuffer + offset + 0) = (u_min_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_min_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_min_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_min_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_min_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_min_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_min_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_min_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->min_z); + union { + double real; + uint64_t base; + } u_max_z; + u_max_z.real = this->max_z; + *(outbuffer + offset + 0) = (u_max_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max_z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->map.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_min_z; + u_min_z.base = 0; + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->min_z = u_min_z.real; + offset += sizeof(this->min_z); + union { + double real; + uint64_t base; + } u_max_z; + u_max_z.base = 0; + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max_z = u_max_z.real; + offset += sizeof(this->max_z); + return offset; + } + + const char * getType(){ return "map_msgs/ProjectedMap"; }; + const char * getMD5(){ return "7bbe8f96e45089681dc1ea7d023cbfca"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/map_msgs/ProjectedMapInfo.h b/source/ros-max-lib/ros_lib/map_msgs/ProjectedMapInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..5c7456e4c7e90a2ceab22ba5c3c91e7e0be41451 --- /dev/null +++ b/source/ros-max-lib/ros_lib/map_msgs/ProjectedMapInfo.h @@ -0,0 +1,247 @@ +#ifndef _ROS_map_msgs_ProjectedMapInfo_h +#define _ROS_map_msgs_ProjectedMapInfo_h + +#include +#include +#include +#include "ros/msg.h" + +namespace map_msgs +{ + + class ProjectedMapInfo : public ros::Msg + { + public: + typedef const char* _frame_id_type; + _frame_id_type frame_id; + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _width_type; + _width_type width; + typedef double _height_type; + _height_type height; + typedef double _min_z_type; + _min_z_type min_z; + typedef double _max_z_type; + _max_z_type max_z; + + ProjectedMapInfo(): + frame_id(""), + x(0), + y(0), + width(0), + height(0), + min_z(0), + max_z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_frame_id = strlen(this->frame_id); + varToArr(outbuffer + offset, length_frame_id); + offset += 4; + memcpy(outbuffer + offset, this->frame_id, length_frame_id); + offset += length_frame_id; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_width; + u_width.real = this->width; + *(outbuffer + offset + 0) = (u_width.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_width.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_width.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_width.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_width.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_width.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_width.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_width.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->width); + union { + double real; + uint64_t base; + } u_height; + u_height.real = this->height; + *(outbuffer + offset + 0) = (u_height.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_height.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_height.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_height.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_height.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_height.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_height.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_height.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->height); + union { + double real; + uint64_t base; + } u_min_z; + u_min_z.real = this->min_z; + *(outbuffer + offset + 0) = (u_min_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_min_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_min_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_min_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_min_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_min_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_min_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_min_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->min_z); + union { + double real; + uint64_t base; + } u_max_z; + u_max_z.real = this->max_z; + *(outbuffer + offset + 0) = (u_max_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max_z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_frame_id; + arrToVar(length_frame_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_frame_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_frame_id-1]=0; + this->frame_id = (char *)(inbuffer + offset-1); + offset += length_frame_id; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_width; + u_width.base = 0; + u_width.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_width.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_width.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_width.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_width.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_width.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_width.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_width.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->width = u_width.real; + offset += sizeof(this->width); + union { + double real; + uint64_t base; + } u_height; + u_height.base = 0; + u_height.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_height.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_height.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_height.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_height.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_height.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_height.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_height.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->height = u_height.real; + offset += sizeof(this->height); + union { + double real; + uint64_t base; + } u_min_z; + u_min_z.base = 0; + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->min_z = u_min_z.real; + offset += sizeof(this->min_z); + union { + double real; + uint64_t base; + } u_max_z; + u_max_z.base = 0; + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max_z = u_max_z.real; + offset += sizeof(this->max_z); + return offset; + } + + const char * getType(){ return "map_msgs/ProjectedMapInfo"; }; + const char * getMD5(){ return "2dc10595ae94de23f22f8a6d2a0eef7a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/map_msgs/ProjectedMapsInfo.h b/source/ros-max-lib/ros_lib/map_msgs/ProjectedMapsInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..b515b94c87eb380b2052b71bb3e782e3c80700d2 --- /dev/null +++ b/source/ros-max-lib/ros_lib/map_msgs/ProjectedMapsInfo.h @@ -0,0 +1,96 @@ +#ifndef _ROS_SERVICE_ProjectedMapsInfo_h +#define _ROS_SERVICE_ProjectedMapsInfo_h +#include +#include +#include +#include "ros/msg.h" +#include "map_msgs/ProjectedMapInfo.h" + +namespace map_msgs +{ + +static const char PROJECTEDMAPSINFO[] = "map_msgs/ProjectedMapsInfo"; + + class ProjectedMapsInfoRequest : public ros::Msg + { + public: + uint32_t projected_maps_info_length; + typedef map_msgs::ProjectedMapInfo _projected_maps_info_type; + _projected_maps_info_type st_projected_maps_info; + _projected_maps_info_type * projected_maps_info; + + ProjectedMapsInfoRequest(): + projected_maps_info_length(0), projected_maps_info(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->projected_maps_info_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->projected_maps_info_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->projected_maps_info_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->projected_maps_info_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->projected_maps_info_length); + for( uint32_t i = 0; i < projected_maps_info_length; i++){ + offset += this->projected_maps_info[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t projected_maps_info_lengthT = ((uint32_t) (*(inbuffer + offset))); + projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->projected_maps_info_length); + if(projected_maps_info_lengthT > projected_maps_info_length) + this->projected_maps_info = (map_msgs::ProjectedMapInfo*)realloc(this->projected_maps_info, projected_maps_info_lengthT * sizeof(map_msgs::ProjectedMapInfo)); + projected_maps_info_length = projected_maps_info_lengthT; + for( uint32_t i = 0; i < projected_maps_info_length; i++){ + offset += this->st_projected_maps_info.deserialize(inbuffer + offset); + memcpy( &(this->projected_maps_info[i]), &(this->st_projected_maps_info), sizeof(map_msgs::ProjectedMapInfo)); + } + return offset; + } + + const char * getType(){ return PROJECTEDMAPSINFO; }; + const char * getMD5(){ return "d7980a33202421c8cd74565e57a4d229"; }; + + }; + + class ProjectedMapsInfoResponse : public ros::Msg + { + public: + + ProjectedMapsInfoResponse() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return PROJECTEDMAPSINFO; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class ProjectedMapsInfo { + public: + typedef ProjectedMapsInfoRequest Request; + typedef ProjectedMapsInfoResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/map_msgs/SaveMap.h b/source/ros-max-lib/ros_lib/map_msgs/SaveMap.h new file mode 100644 index 0000000000000000000000000000000000000000..c304c22f09a021a873b047ef84b095f12b058818 --- /dev/null +++ b/source/ros-max-lib/ros_lib/map_msgs/SaveMap.h @@ -0,0 +1,76 @@ +#ifndef _ROS_SERVICE_SaveMap_h +#define _ROS_SERVICE_SaveMap_h +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/String.h" + +namespace map_msgs +{ + +static const char SAVEMAP[] = "map_msgs/SaveMap"; + + class SaveMapRequest : public ros::Msg + { + public: + typedef std_msgs::String _filename_type; + _filename_type filename; + + SaveMapRequest(): + filename() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->filename.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->filename.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return SAVEMAP; }; + const char * getMD5(){ return "716e25f9d9dc76ceba197f93cbf05dc7"; }; + + }; + + class SaveMapResponse : public ros::Msg + { + public: + + SaveMapResponse() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return SAVEMAP; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class SaveMap { + public: + typedef SaveMapRequest Request; + typedef SaveMapResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/map_msgs/SetMapProjections.h b/source/ros-max-lib/ros_lib/map_msgs/SetMapProjections.h new file mode 100644 index 0000000000000000000000000000000000000000..1ead172a4701853d02dd25344ad618eeb5b0baa4 --- /dev/null +++ b/source/ros-max-lib/ros_lib/map_msgs/SetMapProjections.h @@ -0,0 +1,96 @@ +#ifndef _ROS_SERVICE_SetMapProjections_h +#define _ROS_SERVICE_SetMapProjections_h +#include +#include +#include +#include "ros/msg.h" +#include "map_msgs/ProjectedMapInfo.h" + +namespace map_msgs +{ + +static const char SETMAPPROJECTIONS[] = "map_msgs/SetMapProjections"; + + class SetMapProjectionsRequest : public ros::Msg + { + public: + + SetMapProjectionsRequest() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return SETMAPPROJECTIONS; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class SetMapProjectionsResponse : public ros::Msg + { + public: + uint32_t projected_maps_info_length; + typedef map_msgs::ProjectedMapInfo _projected_maps_info_type; + _projected_maps_info_type st_projected_maps_info; + _projected_maps_info_type * projected_maps_info; + + SetMapProjectionsResponse(): + projected_maps_info_length(0), projected_maps_info(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->projected_maps_info_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->projected_maps_info_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->projected_maps_info_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->projected_maps_info_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->projected_maps_info_length); + for( uint32_t i = 0; i < projected_maps_info_length; i++){ + offset += this->projected_maps_info[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t projected_maps_info_lengthT = ((uint32_t) (*(inbuffer + offset))); + projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->projected_maps_info_length); + if(projected_maps_info_lengthT > projected_maps_info_length) + this->projected_maps_info = (map_msgs::ProjectedMapInfo*)realloc(this->projected_maps_info, projected_maps_info_lengthT * sizeof(map_msgs::ProjectedMapInfo)); + projected_maps_info_length = projected_maps_info_lengthT; + for( uint32_t i = 0; i < projected_maps_info_length; i++){ + offset += this->st_projected_maps_info.deserialize(inbuffer + offset); + memcpy( &(this->projected_maps_info[i]), &(this->st_projected_maps_info), sizeof(map_msgs::ProjectedMapInfo)); + } + return offset; + } + + const char * getType(){ return SETMAPPROJECTIONS; }; + const char * getMD5(){ return "d7980a33202421c8cd74565e57a4d229"; }; + + }; + + class SetMapProjections { + public: + typedef SetMapProjectionsRequest Request; + typedef SetMapProjectionsResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/move_base_msgs/MoveBaseAction.h b/source/ros-max-lib/ros_lib/move_base_msgs/MoveBaseAction.h new file mode 100644 index 0000000000000000000000000000000000000000..ad79c6a59f7d95da4fe53724aa624930bba37fde --- /dev/null +++ b/source/ros-max-lib/ros_lib/move_base_msgs/MoveBaseAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_move_base_msgs_MoveBaseAction_h +#define _ROS_move_base_msgs_MoveBaseAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "move_base_msgs/MoveBaseActionGoal.h" +#include "move_base_msgs/MoveBaseActionResult.h" +#include "move_base_msgs/MoveBaseActionFeedback.h" + +namespace move_base_msgs +{ + + class MoveBaseAction : public ros::Msg + { + public: + typedef move_base_msgs::MoveBaseActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef move_base_msgs::MoveBaseActionResult _action_result_type; + _action_result_type action_result; + typedef move_base_msgs::MoveBaseActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + MoveBaseAction(): + 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 "move_base_msgs/MoveBaseAction"; }; + const char * getMD5(){ return "70b6aca7c7f7746d8d1609ad94c80bb8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/move_base_msgs/MoveBaseActionFeedback.h b/source/ros-max-lib/ros_lib/move_base_msgs/MoveBaseActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..1cfebc69b7ce76d37bdbc7c802a12949683568e2 --- /dev/null +++ b/source/ros-max-lib/ros_lib/move_base_msgs/MoveBaseActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_move_base_msgs_MoveBaseActionFeedback_h +#define _ROS_move_base_msgs_MoveBaseActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "move_base_msgs/MoveBaseFeedback.h" + +namespace move_base_msgs +{ + + class MoveBaseActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef move_base_msgs::MoveBaseFeedback _feedback_type; + _feedback_type feedback; + + MoveBaseActionFeedback(): + 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 "move_base_msgs/MoveBaseActionFeedback"; }; + const char * getMD5(){ return "7d1870ff6e0decea702b943b5af0b42e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/move_base_msgs/MoveBaseActionGoal.h b/source/ros-max-lib/ros_lib/move_base_msgs/MoveBaseActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..686c4960f6e73a359f2aa9247ea4392d2da5e38d --- /dev/null +++ b/source/ros-max-lib/ros_lib/move_base_msgs/MoveBaseActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_move_base_msgs_MoveBaseActionGoal_h +#define _ROS_move_base_msgs_MoveBaseActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "move_base_msgs/MoveBaseGoal.h" + +namespace move_base_msgs +{ + + class MoveBaseActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef move_base_msgs::MoveBaseGoal _goal_type; + _goal_type goal; + + MoveBaseActionGoal(): + 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 "move_base_msgs/MoveBaseActionGoal"; }; + const char * getMD5(){ return "660d6895a1b9a16dce51fbdd9a64a56b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/move_base_msgs/MoveBaseActionResult.h b/source/ros-max-lib/ros_lib/move_base_msgs/MoveBaseActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..b9614e5aae84d79bb2e71ff3b4b75ae599cbff4d --- /dev/null +++ b/source/ros-max-lib/ros_lib/move_base_msgs/MoveBaseActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_move_base_msgs_MoveBaseActionResult_h +#define _ROS_move_base_msgs_MoveBaseActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "move_base_msgs/MoveBaseResult.h" + +namespace move_base_msgs +{ + + class MoveBaseActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef move_base_msgs::MoveBaseResult _result_type; + _result_type result; + + MoveBaseActionResult(): + 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 "move_base_msgs/MoveBaseActionResult"; }; + const char * getMD5(){ return "1eb06eeff08fa7ea874431638cb52332"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/move_base_msgs/MoveBaseFeedback.h b/source/ros-max-lib/ros_lib/move_base_msgs/MoveBaseFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..09adc4f282c38789f9c46ffc7eb1bd65195e9faf --- /dev/null +++ b/source/ros-max-lib/ros_lib/move_base_msgs/MoveBaseFeedback.h @@ -0,0 +1,44 @@ +#ifndef _ROS_move_base_msgs_MoveBaseFeedback_h +#define _ROS_move_base_msgs_MoveBaseFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/PoseStamped.h" + +namespace move_base_msgs +{ + + class MoveBaseFeedback : public ros::Msg + { + public: + typedef geometry_msgs::PoseStamped _base_position_type; + _base_position_type base_position; + + MoveBaseFeedback(): + base_position() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->base_position.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->base_position.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "move_base_msgs/MoveBaseFeedback"; }; + const char * getMD5(){ return "3fb824c456a757373a226f6d08071bf0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/move_base_msgs/MoveBaseGoal.h b/source/ros-max-lib/ros_lib/move_base_msgs/MoveBaseGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..d2282173b32b178a8ad29671f28da68e8fa8eece --- /dev/null +++ b/source/ros-max-lib/ros_lib/move_base_msgs/MoveBaseGoal.h @@ -0,0 +1,44 @@ +#ifndef _ROS_move_base_msgs_MoveBaseGoal_h +#define _ROS_move_base_msgs_MoveBaseGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/PoseStamped.h" + +namespace move_base_msgs +{ + + class MoveBaseGoal : public ros::Msg + { + public: + typedef geometry_msgs::PoseStamped _target_pose_type; + _target_pose_type target_pose; + + MoveBaseGoal(): + target_pose() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->target_pose.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->target_pose.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "move_base_msgs/MoveBaseGoal"; }; + const char * getMD5(){ return "257d089627d7eb7136c24d3593d05a16"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/move_base_msgs/MoveBaseResult.h b/source/ros-max-lib/ros_lib/move_base_msgs/MoveBaseResult.h new file mode 100644 index 0000000000000000000000000000000000000000..c43c53635ee2aa65222c5de4c9091be703a6243c --- /dev/null +++ b/source/ros-max-lib/ros_lib/move_base_msgs/MoveBaseResult.h @@ -0,0 +1,38 @@ +#ifndef _ROS_move_base_msgs_MoveBaseResult_h +#define _ROS_move_base_msgs_MoveBaseResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace move_base_msgs +{ + + class MoveBaseResult : public ros::Msg + { + public: + + MoveBaseResult() + { + } + + 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 "move_base_msgs/MoveBaseResult"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/nav_msgs/GetMap.h b/source/ros-max-lib/ros_lib/nav_msgs/GetMap.h new file mode 100644 index 0000000000000000000000000000000000000000..ef7e3fa061e925bd2c2481bfff112214cf03ee66 --- /dev/null +++ b/source/ros-max-lib/ros_lib/nav_msgs/GetMap.h @@ -0,0 +1,76 @@ +#ifndef _ROS_SERVICE_GetMap_h +#define _ROS_SERVICE_GetMap_h +#include +#include +#include +#include "ros/msg.h" +#include "nav_msgs/OccupancyGrid.h" + +namespace nav_msgs +{ + +static const char GETMAP[] = "nav_msgs/GetMap"; + + class GetMapRequest : public ros::Msg + { + public: + + GetMapRequest() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return GETMAP; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetMapResponse : public ros::Msg + { + public: + typedef nav_msgs::OccupancyGrid _map_type; + _map_type map; + + GetMapResponse(): + map() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->map.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->map.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return GETMAP; }; + const char * getMD5(){ return "6cdd0a18e0aff5b0a3ca2326a89b54ff"; }; + + }; + + class GetMap { + public: + typedef GetMapRequest Request; + typedef GetMapResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/nav_msgs/GetMapAction.h b/source/ros-max-lib/ros_lib/nav_msgs/GetMapAction.h new file mode 100644 index 0000000000000000000000000000000000000000..56e82996b630e087630d1189ba7306e73947f9af --- /dev/null +++ b/source/ros-max-lib/ros_lib/nav_msgs/GetMapAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_nav_msgs_GetMapAction_h +#define _ROS_nav_msgs_GetMapAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "nav_msgs/GetMapActionGoal.h" +#include "nav_msgs/GetMapActionResult.h" +#include "nav_msgs/GetMapActionFeedback.h" + +namespace nav_msgs +{ + + class GetMapAction : public ros::Msg + { + public: + typedef nav_msgs::GetMapActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef nav_msgs::GetMapActionResult _action_result_type; + _action_result_type action_result; + typedef nav_msgs::GetMapActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + GetMapAction(): + action_goal(), + action_result(), + action_feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->action_goal.serialize(outbuffer + offset); + offset += this->action_result.serialize(outbuffer + offset); + offset += this->action_feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->action_goal.deserialize(inbuffer + offset); + offset += this->action_result.deserialize(inbuffer + offset); + offset += this->action_feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "nav_msgs/GetMapAction"; }; + const char * getMD5(){ return "e611ad23fbf237c031b7536416dc7cd7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/nav_msgs/GetMapActionFeedback.h b/source/ros-max-lib/ros_lib/nav_msgs/GetMapActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..fb60003a1d35b41690069023c5832247c04fb96e --- /dev/null +++ b/source/ros-max-lib/ros_lib/nav_msgs/GetMapActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_nav_msgs_GetMapActionFeedback_h +#define _ROS_nav_msgs_GetMapActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "nav_msgs/GetMapFeedback.h" + +namespace nav_msgs +{ + + class GetMapActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef nav_msgs::GetMapFeedback _feedback_type; + _feedback_type feedback; + + GetMapActionFeedback(): + header(), + status(), + feedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->feedback.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->feedback.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "nav_msgs/GetMapActionFeedback"; }; + const char * getMD5(){ return "aae20e09065c3809e8a8e87c4c8953fd"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/nav_msgs/GetMapActionGoal.h b/source/ros-max-lib/ros_lib/nav_msgs/GetMapActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..da4244a675c0d8570234e22b651fe7ebf37de2ef --- /dev/null +++ b/source/ros-max-lib/ros_lib/nav_msgs/GetMapActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_nav_msgs_GetMapActionGoal_h +#define _ROS_nav_msgs_GetMapActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "nav_msgs/GetMapGoal.h" + +namespace nav_msgs +{ + + class GetMapActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef nav_msgs::GetMapGoal _goal_type; + _goal_type goal; + + GetMapActionGoal(): + header(), + goal_id(), + goal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->goal_id.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->goal_id.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "nav_msgs/GetMapActionGoal"; }; + const char * getMD5(){ return "4b30be6cd12b9e72826df56b481f40e0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/nav_msgs/GetMapActionResult.h b/source/ros-max-lib/ros_lib/nav_msgs/GetMapActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..f614a35aa85b334160f59aa75af30c11571201bd --- /dev/null +++ b/source/ros-max-lib/ros_lib/nav_msgs/GetMapActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_nav_msgs_GetMapActionResult_h +#define _ROS_nav_msgs_GetMapActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "nav_msgs/GetMapResult.h" + +namespace nav_msgs +{ + + class GetMapActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef nav_msgs::GetMapResult _result_type; + _result_type result; + + GetMapActionResult(): + header(), + status(), + result() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + offset += this->result.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + offset += this->result.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "nav_msgs/GetMapActionResult"; }; + const char * getMD5(){ return "ac66e5b9a79bb4bbd33dab245236c892"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/nav_msgs/GetMapFeedback.h b/source/ros-max-lib/ros_lib/nav_msgs/GetMapFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..e3b4560abd6c8e6fdec156e71ef420bb4397b232 --- /dev/null +++ b/source/ros-max-lib/ros_lib/nav_msgs/GetMapFeedback.h @@ -0,0 +1,38 @@ +#ifndef _ROS_nav_msgs_GetMapFeedback_h +#define _ROS_nav_msgs_GetMapFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace nav_msgs +{ + + class GetMapFeedback : public ros::Msg + { + public: + + GetMapFeedback() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return "nav_msgs/GetMapFeedback"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/nav_msgs/GetMapGoal.h b/source/ros-max-lib/ros_lib/nav_msgs/GetMapGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..88a17c5edb5e2e96076e7dbceba8f87a5cb4c6a8 --- /dev/null +++ b/source/ros-max-lib/ros_lib/nav_msgs/GetMapGoal.h @@ -0,0 +1,38 @@ +#ifndef _ROS_nav_msgs_GetMapGoal_h +#define _ROS_nav_msgs_GetMapGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace nav_msgs +{ + + class GetMapGoal : public ros::Msg + { + public: + + GetMapGoal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + return offset; + } + + const char * getType(){ return "nav_msgs/GetMapGoal"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/nav_msgs/GetMapResult.h b/source/ros-max-lib/ros_lib/nav_msgs/GetMapResult.h new file mode 100644 index 0000000000000000000000000000000000000000..1ef8fbd4d2df6cdaf7764ff6836156837f8e6791 --- /dev/null +++ b/source/ros-max-lib/ros_lib/nav_msgs/GetMapResult.h @@ -0,0 +1,44 @@ +#ifndef _ROS_nav_msgs_GetMapResult_h +#define _ROS_nav_msgs_GetMapResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "nav_msgs/OccupancyGrid.h" + +namespace nav_msgs +{ + + class GetMapResult : public ros::Msg + { + public: + typedef nav_msgs::OccupancyGrid _map_type; + _map_type map; + + GetMapResult(): + map() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->map.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->map.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "nav_msgs/GetMapResult"; }; + const char * getMD5(){ return "6cdd0a18e0aff5b0a3ca2326a89b54ff"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/nav_msgs/GetPlan.h b/source/ros-max-lib/ros_lib/nav_msgs/GetPlan.h new file mode 100644 index 0000000000000000000000000000000000000000..fe312b2ca9c0434749007302d951567710f23712 --- /dev/null +++ b/source/ros-max-lib/ros_lib/nav_msgs/GetPlan.h @@ -0,0 +1,111 @@ +#ifndef _ROS_SERVICE_GetPlan_h +#define _ROS_SERVICE_GetPlan_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/PoseStamped.h" +#include "nav_msgs/Path.h" + +namespace nav_msgs +{ + +static const char GETPLAN[] = "nav_msgs/GetPlan"; + + class GetPlanRequest : public ros::Msg + { + public: + typedef geometry_msgs::PoseStamped _start_type; + _start_type start; + typedef geometry_msgs::PoseStamped _goal_type; + _goal_type goal; + typedef float _tolerance_type; + _tolerance_type tolerance; + + GetPlanRequest(): + start(), + goal(), + tolerance(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->start.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_tolerance; + u_tolerance.real = this->tolerance; + *(outbuffer + offset + 0) = (u_tolerance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_tolerance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_tolerance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_tolerance.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->tolerance); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->start.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_tolerance; + u_tolerance.base = 0; + u_tolerance.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_tolerance.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_tolerance.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_tolerance.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->tolerance = u_tolerance.real; + offset += sizeof(this->tolerance); + return offset; + } + + const char * getType(){ return GETPLAN; }; + const char * getMD5(){ return "e25a43e0752bcca599a8c2eef8282df8"; }; + + }; + + class GetPlanResponse : public ros::Msg + { + public: + typedef nav_msgs::Path _plan_type; + _plan_type plan; + + GetPlanResponse(): + plan() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->plan.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->plan.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return GETPLAN; }; + const char * getMD5(){ return "0002bc113c0259d71f6cf8cbc9430e18"; }; + + }; + + class GetPlan { + public: + typedef GetPlanRequest Request; + typedef GetPlanResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/nav_msgs/GridCells.h b/source/ros-max-lib/ros_lib/nav_msgs/GridCells.h new file mode 100644 index 0000000000000000000000000000000000000000..6c41cc669551b82b0e5a88b472e0f0df845be182 --- /dev/null +++ b/source/ros-max-lib/ros_lib/nav_msgs/GridCells.h @@ -0,0 +1,118 @@ +#ifndef _ROS_nav_msgs_GridCells_h +#define _ROS_nav_msgs_GridCells_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Point.h" + +namespace nav_msgs +{ + + class GridCells : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef float _cell_width_type; + _cell_width_type cell_width; + typedef float _cell_height_type; + _cell_height_type cell_height; + uint32_t cells_length; + typedef geometry_msgs::Point _cells_type; + _cells_type st_cells; + _cells_type * cells; + + GridCells(): + header(), + cell_width(0), + cell_height(0), + cells_length(0), cells(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_cell_width; + u_cell_width.real = this->cell_width; + *(outbuffer + offset + 0) = (u_cell_width.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_cell_width.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_cell_width.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_cell_width.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->cell_width); + union { + float real; + uint32_t base; + } u_cell_height; + u_cell_height.real = this->cell_height; + *(outbuffer + offset + 0) = (u_cell_height.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_cell_height.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_cell_height.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_cell_height.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->cell_height); + *(outbuffer + offset + 0) = (this->cells_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->cells_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->cells_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->cells_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->cells_length); + for( uint32_t i = 0; i < cells_length; i++){ + offset += this->cells[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_cell_width; + u_cell_width.base = 0; + u_cell_width.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_cell_width.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_cell_width.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_cell_width.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->cell_width = u_cell_width.real; + offset += sizeof(this->cell_width); + union { + float real; + uint32_t base; + } u_cell_height; + u_cell_height.base = 0; + u_cell_height.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_cell_height.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_cell_height.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_cell_height.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->cell_height = u_cell_height.real; + offset += sizeof(this->cell_height); + uint32_t cells_lengthT = ((uint32_t) (*(inbuffer + offset))); + cells_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + cells_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + cells_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->cells_length); + if(cells_lengthT > cells_length) + this->cells = (geometry_msgs::Point*)realloc(this->cells, cells_lengthT * sizeof(geometry_msgs::Point)); + cells_length = cells_lengthT; + for( uint32_t i = 0; i < cells_length; i++){ + offset += this->st_cells.deserialize(inbuffer + offset); + memcpy( &(this->cells[i]), &(this->st_cells), sizeof(geometry_msgs::Point)); + } + return offset; + } + + const char * getType(){ return "nav_msgs/GridCells"; }; + const char * getMD5(){ return "b9e4f5df6d28e272ebde00a3994830f5"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/nav_msgs/MapMetaData.h b/source/ros-max-lib/ros_lib/nav_msgs/MapMetaData.h new file mode 100644 index 0000000000000000000000000000000000000000..47733d907c058a9a84a3ec82a92adacb365f726b --- /dev/null +++ b/source/ros-max-lib/ros_lib/nav_msgs/MapMetaData.h @@ -0,0 +1,118 @@ +#ifndef _ROS_nav_msgs_MapMetaData_h +#define _ROS_nav_msgs_MapMetaData_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" +#include "geometry_msgs/Pose.h" + +namespace nav_msgs +{ + + class MapMetaData : public ros::Msg + { + public: + typedef ros::Time _map_load_time_type; + _map_load_time_type map_load_time; + typedef float _resolution_type; + _resolution_type resolution; + typedef uint32_t _width_type; + _width_type width; + typedef uint32_t _height_type; + _height_type height; + typedef geometry_msgs::Pose _origin_type; + _origin_type origin; + + MapMetaData(): + map_load_time(), + resolution(0), + width(0), + height(0), + origin() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->map_load_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->map_load_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->map_load_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->map_load_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->map_load_time.sec); + *(outbuffer + offset + 0) = (this->map_load_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->map_load_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->map_load_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->map_load_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->map_load_time.nsec); + union { + float real; + uint32_t base; + } u_resolution; + u_resolution.real = this->resolution; + *(outbuffer + offset + 0) = (u_resolution.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_resolution.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_resolution.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_resolution.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->resolution); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF; + offset += sizeof(this->width); + *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF; + offset += sizeof(this->height); + offset += this->origin.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->map_load_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->map_load_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->map_load_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->map_load_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->map_load_time.sec); + this->map_load_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->map_load_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->map_load_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->map_load_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->map_load_time.nsec); + union { + float real; + uint32_t base; + } u_resolution; + u_resolution.base = 0; + u_resolution.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_resolution.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_resolution.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_resolution.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->resolution = u_resolution.real; + offset += sizeof(this->resolution); + this->width = ((uint32_t) (*(inbuffer + offset))); + this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->width); + this->height = ((uint32_t) (*(inbuffer + offset))); + this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->height); + offset += this->origin.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "nav_msgs/MapMetaData"; }; + const char * getMD5(){ return "10cfc8a2818024d3248802c00c95f11b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/nav_msgs/OccupancyGrid.h b/source/ros-max-lib/ros_lib/nav_msgs/OccupancyGrid.h new file mode 100644 index 0000000000000000000000000000000000000000..4205f43e26d0dfb119a56296d1ed474a16c435f7 --- /dev/null +++ b/source/ros-max-lib/ros_lib/nav_msgs/OccupancyGrid.h @@ -0,0 +1,88 @@ +#ifndef _ROS_nav_msgs_OccupancyGrid_h +#define _ROS_nav_msgs_OccupancyGrid_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "nav_msgs/MapMetaData.h" + +namespace nav_msgs +{ + + class OccupancyGrid : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef nav_msgs::MapMetaData _info_type; + _info_type info; + uint32_t data_length; + typedef int8_t _data_type; + _data_type st_data; + _data_type * data; + + OccupancyGrid(): + header(), + info(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->info.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->info.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (int8_t*)realloc(this->data, data_lengthT * sizeof(int8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(int8_t)); + } + return offset; + } + + const char * getType(){ return "nav_msgs/OccupancyGrid"; }; + const char * getMD5(){ return "3381f2d731d4076ec5c71b0759edbe4e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/nav_msgs/Odometry.h b/source/ros-max-lib/ros_lib/nav_msgs/Odometry.h new file mode 100644 index 0000000000000000000000000000000000000000..e8eaca598658db00830457e01f52cd466bbd47d6 --- /dev/null +++ b/source/ros-max-lib/ros_lib/nav_msgs/Odometry.h @@ -0,0 +1,73 @@ +#ifndef _ROS_nav_msgs_Odometry_h +#define _ROS_nav_msgs_Odometry_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../std_msgs/Header.h" +#include "../geometry_msgs/PoseWithCovariance.h" +#include "../geometry_msgs/TwistWithCovariance.h" + +namespace nav_msgs +{ + + class Odometry : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _child_frame_id_type; + _child_frame_id_type child_frame_id; + typedef geometry_msgs::PoseWithCovariance _pose_type; + _pose_type pose; + typedef geometry_msgs::TwistWithCovariance _twist_type; + _twist_type twist; + + Odometry(): + header(), + child_frame_id(""), + pose(), + twist() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_child_frame_id = strlen(this->child_frame_id); + varToArr(outbuffer + offset, length_child_frame_id); + offset += 4; + memcpy(outbuffer + offset, this->child_frame_id, length_child_frame_id); + offset += length_child_frame_id; + offset += this->pose.serialize(outbuffer + offset); + offset += this->twist.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_child_frame_id; + arrToVar(length_child_frame_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_child_frame_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_child_frame_id-1]=0; + this->child_frame_id = (char *)(inbuffer + offset-1); + offset += length_child_frame_id; + offset += this->pose.deserialize(inbuffer + offset); + offset += this->twist.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "nav_msgs/Odometry"; }; + const char * getMD5(){ return "cd5e73d190d741a2f92e81eda573aca7"; }; + + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/nav_msgs/Path.h b/source/ros-max-lib/ros_lib/nav_msgs/Path.h new file mode 100644 index 0000000000000000000000000000000000000000..858770643a6517d6e09dcaea4a6a7653d7a9e34e --- /dev/null +++ b/source/ros-max-lib/ros_lib/nav_msgs/Path.h @@ -0,0 +1,70 @@ +#ifndef _ROS_nav_msgs_Path_h +#define _ROS_nav_msgs_Path_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/PoseStamped.h" + +namespace nav_msgs +{ + + class Path : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t poses_length; + typedef geometry_msgs::PoseStamped _poses_type; + _poses_type st_poses; + _poses_type * poses; + + Path(): + header(), + poses_length(0), poses(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->poses_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->poses_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->poses_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->poses_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->poses_length); + for( uint32_t i = 0; i < poses_length; i++){ + offset += this->poses[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t poses_lengthT = ((uint32_t) (*(inbuffer + offset))); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->poses_length); + if(poses_lengthT > poses_length) + this->poses = (geometry_msgs::PoseStamped*)realloc(this->poses, poses_lengthT * sizeof(geometry_msgs::PoseStamped)); + poses_length = poses_lengthT; + for( uint32_t i = 0; i < poses_length; i++){ + offset += this->st_poses.deserialize(inbuffer + offset); + memcpy( &(this->poses[i]), &(this->st_poses), sizeof(geometry_msgs::PoseStamped)); + } + return offset; + } + + const char * getType(){ return "nav_msgs/Path"; }; + const char * getMD5(){ return "6227e2b7e9cce15051f669a5e197bbf7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/nav_msgs/SetMap.h b/source/ros-max-lib/ros_lib/nav_msgs/SetMap.h new file mode 100644 index 0000000000000000000000000000000000000000..717cead99266b467a6146fbd76039a66b069759f --- /dev/null +++ b/source/ros-max-lib/ros_lib/nav_msgs/SetMap.h @@ -0,0 +1,100 @@ +#ifndef _ROS_SERVICE_SetMap_h +#define _ROS_SERVICE_SetMap_h +#include +#include +#include +#include "ros/msg.h" +#include "nav_msgs/OccupancyGrid.h" +#include "geometry_msgs/PoseWithCovarianceStamped.h" + +namespace nav_msgs +{ + +static const char SETMAP[] = "nav_msgs/SetMap"; + + class SetMapRequest : public ros::Msg + { + public: + typedef nav_msgs::OccupancyGrid _map_type; + _map_type map; + typedef geometry_msgs::PoseWithCovarianceStamped _initial_pose_type; + _initial_pose_type initial_pose; + + SetMapRequest(): + map(), + initial_pose() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->map.serialize(outbuffer + offset); + offset += this->initial_pose.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->map.deserialize(inbuffer + offset); + offset += this->initial_pose.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return SETMAP; }; + const char * getMD5(){ return "91149a20d7be299b87c340df8cc94fd4"; }; + + }; + + class SetMapResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + + SetMapResponse(): + success(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + return offset; + } + + const char * getType(){ return SETMAP; }; + const char * getMD5(){ return "358e233cde0c8a8bcfea4ce193f8fc15"; }; + + }; + + class SetMap { + public: + typedef SetMapRequest Request; + typedef SetMapResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/navfn/MakeNavPlan.h b/source/ros-max-lib/ros_lib/navfn/MakeNavPlan.h new file mode 100644 index 0000000000000000000000000000000000000000..787905bd58e46393062a179e820284d59ba02568 --- /dev/null +++ b/source/ros-max-lib/ros_lib/navfn/MakeNavPlan.h @@ -0,0 +1,130 @@ +#ifndef _ROS_SERVICE_MakeNavPlan_h +#define _ROS_SERVICE_MakeNavPlan_h +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/PoseStamped.h" + +namespace navfn +{ + +static const char MAKENAVPLAN[] = "navfn/MakeNavPlan"; + + class MakeNavPlanRequest : public ros::Msg + { + public: + typedef geometry_msgs::PoseStamped _start_type; + _start_type start; + typedef geometry_msgs::PoseStamped _goal_type; + _goal_type goal; + + MakeNavPlanRequest(): + start(), + goal() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->start.serialize(outbuffer + offset); + offset += this->goal.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->start.deserialize(inbuffer + offset); + offset += this->goal.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return MAKENAVPLAN; }; + const char * getMD5(){ return "2fe3126bd5b2d56edd5005220333d4fd"; }; + + }; + + class MakeNavPlanResponse : public ros::Msg + { + public: + typedef uint8_t _plan_found_type; + _plan_found_type plan_found; + typedef const char* _error_message_type; + _error_message_type error_message; + uint32_t path_length; + typedef geometry_msgs::PoseStamped _path_type; + _path_type st_path; + _path_type * path; + + MakeNavPlanResponse(): + plan_found(0), + error_message(""), + path_length(0), path(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->plan_found >> (8 * 0)) & 0xFF; + offset += sizeof(this->plan_found); + uint32_t length_error_message = strlen(this->error_message); + varToArr(outbuffer + offset, length_error_message); + offset += 4; + memcpy(outbuffer + offset, this->error_message, length_error_message); + offset += length_error_message; + *(outbuffer + offset + 0) = (this->path_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->path_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->path_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->path_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->path_length); + for( uint32_t i = 0; i < path_length; i++){ + offset += this->path[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->plan_found = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->plan_found); + uint32_t length_error_message; + arrToVar(length_error_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_error_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_error_message-1]=0; + this->error_message = (char *)(inbuffer + offset-1); + offset += length_error_message; + uint32_t path_lengthT = ((uint32_t) (*(inbuffer + offset))); + path_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + path_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + path_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->path_length); + if(path_lengthT > path_length) + this->path = (geometry_msgs::PoseStamped*)realloc(this->path, path_lengthT * sizeof(geometry_msgs::PoseStamped)); + path_length = path_lengthT; + for( uint32_t i = 0; i < path_length; i++){ + offset += this->st_path.deserialize(inbuffer + offset); + memcpy( &(this->path[i]), &(this->st_path), sizeof(geometry_msgs::PoseStamped)); + } + return offset; + } + + const char * getType(){ return MAKENAVPLAN; }; + const char * getMD5(){ return "8b8ed7edf1b237dc9ddda8c8ffed5d3a"; }; + + }; + + class MakeNavPlan { + public: + typedef MakeNavPlanRequest Request; + typedef MakeNavPlanResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/navfn/SetCostmap.h b/source/ros-max-lib/ros_lib/navfn/SetCostmap.h new file mode 100644 index 0000000000000000000000000000000000000000..8f746c5082e795f1d1d86c26ebdc9c5e06f15e0b --- /dev/null +++ b/source/ros-max-lib/ros_lib/navfn/SetCostmap.h @@ -0,0 +1,115 @@ +#ifndef _ROS_SERVICE_SetCostmap_h +#define _ROS_SERVICE_SetCostmap_h +#include +#include +#include +#include "ros/msg.h" + +namespace navfn +{ + +static const char SETCOSTMAP[] = "navfn/SetCostmap"; + + class SetCostmapRequest : public ros::Msg + { + public: + uint32_t costs_length; + typedef uint8_t _costs_type; + _costs_type st_costs; + _costs_type * costs; + typedef uint16_t _height_type; + _height_type height; + typedef uint16_t _width_type; + _width_type width; + + SetCostmapRequest(): + costs_length(0), costs(NULL), + height(0), + width(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->costs_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->costs_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->costs_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->costs_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->costs_length); + for( uint32_t i = 0; i < costs_length; i++){ + *(outbuffer + offset + 0) = (this->costs[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->costs[i]); + } + *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; + offset += sizeof(this->height); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; + offset += sizeof(this->width); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t costs_lengthT = ((uint32_t) (*(inbuffer + offset))); + costs_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + costs_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + costs_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->costs_length); + if(costs_lengthT > costs_length) + this->costs = (uint8_t*)realloc(this->costs, costs_lengthT * sizeof(uint8_t)); + costs_length = costs_lengthT; + for( uint32_t i = 0; i < costs_length; i++){ + this->st_costs = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_costs); + memcpy( &(this->costs[i]), &(this->st_costs), sizeof(uint8_t)); + } + this->height = ((uint16_t) (*(inbuffer + offset))); + this->height |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->height); + this->width = ((uint16_t) (*(inbuffer + offset))); + this->width |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->width); + return offset; + } + + const char * getType(){ return SETCOSTMAP; }; + const char * getMD5(){ return "370ec969cdb71f9cde7c7cbe0d752308"; }; + + }; + + class SetCostmapResponse : public ros::Msg + { + public: + + SetCostmapResponse() + { + } + + 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 SETCOSTMAP; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class SetCostmap { + public: + typedef SetCostmapRequest Request; + typedef SetCostmapResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/nodelet/NodeletList.h b/source/ros-max-lib/ros_lib/nodelet/NodeletList.h new file mode 100644 index 0000000000000000000000000000000000000000..6210fa0386bd053540d41974a8d1cae2654eca12 --- /dev/null +++ b/source/ros-max-lib/ros_lib/nodelet/NodeletList.h @@ -0,0 +1,107 @@ +#ifndef _ROS_SERVICE_NodeletList_h +#define _ROS_SERVICE_NodeletList_h +#include +#include +#include +#include "ros/msg.h" + +namespace nodelet +{ + +static const char NODELETLIST[] = "nodelet/NodeletList"; + + class NodeletListRequest : public ros::Msg + { + public: + + NodeletListRequest() + { + } + + 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 NODELETLIST; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class NodeletListResponse : public ros::Msg + { + public: + uint32_t nodelets_length; + typedef char* _nodelets_type; + _nodelets_type st_nodelets; + _nodelets_type * nodelets; + + NodeletListResponse(): + nodelets_length(0), nodelets(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->nodelets_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->nodelets_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->nodelets_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->nodelets_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->nodelets_length); + for( uint32_t i = 0; i < nodelets_length; i++){ + uint32_t length_nodeletsi = strlen(this->nodelets[i]); + varToArr(outbuffer + offset, length_nodeletsi); + offset += 4; + memcpy(outbuffer + offset, this->nodelets[i], length_nodeletsi); + offset += length_nodeletsi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t nodelets_lengthT = ((uint32_t) (*(inbuffer + offset))); + nodelets_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + nodelets_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + nodelets_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->nodelets_length); + if(nodelets_lengthT > nodelets_length) + this->nodelets = (char**)realloc(this->nodelets, nodelets_lengthT * sizeof(char*)); + nodelets_length = nodelets_lengthT; + for( uint32_t i = 0; i < nodelets_length; i++){ + uint32_t length_st_nodelets; + arrToVar(length_st_nodelets, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_nodelets; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_nodelets-1]=0; + this->st_nodelets = (char *)(inbuffer + offset-1); + offset += length_st_nodelets; + memcpy( &(this->nodelets[i]), &(this->st_nodelets), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return NODELETLIST; }; + const char * getMD5(){ return "99c7b10e794f5600b8030e697e946ca7"; }; + + }; + + class NodeletList { + public: + typedef NodeletListRequest Request; + typedef NodeletListResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/nodelet/NodeletLoad.h b/source/ros-max-lib/ros_lib/nodelet/NodeletLoad.h new file mode 100644 index 0000000000000000000000000000000000000000..e7a9c5c76f0dac758b6666d02c01f19d4b6d0fba --- /dev/null +++ b/source/ros-max-lib/ros_lib/nodelet/NodeletLoad.h @@ -0,0 +1,250 @@ +#ifndef _ROS_SERVICE_NodeletLoad_h +#define _ROS_SERVICE_NodeletLoad_h +#include +#include +#include +#include "ros/msg.h" + +namespace nodelet +{ + +static const char NODELETLOAD[] = "nodelet/NodeletLoad"; + + class NodeletLoadRequest : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _type_type; + _type_type type; + uint32_t remap_source_args_length; + typedef char* _remap_source_args_type; + _remap_source_args_type st_remap_source_args; + _remap_source_args_type * remap_source_args; + uint32_t remap_target_args_length; + typedef char* _remap_target_args_type; + _remap_target_args_type st_remap_target_args; + _remap_target_args_type * remap_target_args; + uint32_t my_argv_length; + typedef char* _my_argv_type; + _my_argv_type st_my_argv; + _my_argv_type * my_argv; + typedef const char* _bond_id_type; + _bond_id_type bond_id; + + NodeletLoadRequest(): + name(""), + type(""), + remap_source_args_length(0), remap_source_args(NULL), + remap_target_args_length(0), remap_target_args(NULL), + my_argv_length(0), my_argv(NULL), + bond_id("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_type = strlen(this->type); + varToArr(outbuffer + offset, length_type); + offset += 4; + memcpy(outbuffer + offset, this->type, length_type); + offset += length_type; + *(outbuffer + offset + 0) = (this->remap_source_args_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->remap_source_args_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->remap_source_args_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->remap_source_args_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->remap_source_args_length); + for( uint32_t i = 0; i < remap_source_args_length; i++){ + uint32_t length_remap_source_argsi = strlen(this->remap_source_args[i]); + varToArr(outbuffer + offset, length_remap_source_argsi); + offset += 4; + memcpy(outbuffer + offset, this->remap_source_args[i], length_remap_source_argsi); + offset += length_remap_source_argsi; + } + *(outbuffer + offset + 0) = (this->remap_target_args_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->remap_target_args_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->remap_target_args_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->remap_target_args_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->remap_target_args_length); + for( uint32_t i = 0; i < remap_target_args_length; i++){ + uint32_t length_remap_target_argsi = strlen(this->remap_target_args[i]); + varToArr(outbuffer + offset, length_remap_target_argsi); + offset += 4; + memcpy(outbuffer + offset, this->remap_target_args[i], length_remap_target_argsi); + offset += length_remap_target_argsi; + } + *(outbuffer + offset + 0) = (this->my_argv_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->my_argv_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->my_argv_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->my_argv_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->my_argv_length); + for( uint32_t i = 0; i < my_argv_length; i++){ + uint32_t length_my_argvi = strlen(this->my_argv[i]); + varToArr(outbuffer + offset, length_my_argvi); + offset += 4; + memcpy(outbuffer + offset, this->my_argv[i], length_my_argvi); + offset += length_my_argvi; + } + uint32_t length_bond_id = strlen(this->bond_id); + varToArr(outbuffer + offset, length_bond_id); + offset += 4; + memcpy(outbuffer + offset, this->bond_id, length_bond_id); + offset += length_bond_id; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_type; + arrToVar(length_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type-1]=0; + this->type = (char *)(inbuffer + offset-1); + offset += length_type; + uint32_t remap_source_args_lengthT = ((uint32_t) (*(inbuffer + offset))); + remap_source_args_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + remap_source_args_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + remap_source_args_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->remap_source_args_length); + if(remap_source_args_lengthT > remap_source_args_length) + this->remap_source_args = (char**)realloc(this->remap_source_args, remap_source_args_lengthT * sizeof(char*)); + remap_source_args_length = remap_source_args_lengthT; + for( uint32_t i = 0; i < remap_source_args_length; i++){ + uint32_t length_st_remap_source_args; + arrToVar(length_st_remap_source_args, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_remap_source_args; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_remap_source_args-1]=0; + this->st_remap_source_args = (char *)(inbuffer + offset-1); + offset += length_st_remap_source_args; + memcpy( &(this->remap_source_args[i]), &(this->st_remap_source_args), sizeof(char*)); + } + uint32_t remap_target_args_lengthT = ((uint32_t) (*(inbuffer + offset))); + remap_target_args_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + remap_target_args_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + remap_target_args_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->remap_target_args_length); + if(remap_target_args_lengthT > remap_target_args_length) + this->remap_target_args = (char**)realloc(this->remap_target_args, remap_target_args_lengthT * sizeof(char*)); + remap_target_args_length = remap_target_args_lengthT; + for( uint32_t i = 0; i < remap_target_args_length; i++){ + uint32_t length_st_remap_target_args; + arrToVar(length_st_remap_target_args, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_remap_target_args; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_remap_target_args-1]=0; + this->st_remap_target_args = (char *)(inbuffer + offset-1); + offset += length_st_remap_target_args; + memcpy( &(this->remap_target_args[i]), &(this->st_remap_target_args), sizeof(char*)); + } + uint32_t my_argv_lengthT = ((uint32_t) (*(inbuffer + offset))); + my_argv_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + my_argv_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + my_argv_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->my_argv_length); + if(my_argv_lengthT > my_argv_length) + this->my_argv = (char**)realloc(this->my_argv, my_argv_lengthT * sizeof(char*)); + my_argv_length = my_argv_lengthT; + for( uint32_t i = 0; i < my_argv_length; i++){ + uint32_t length_st_my_argv; + arrToVar(length_st_my_argv, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_my_argv; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_my_argv-1]=0; + this->st_my_argv = (char *)(inbuffer + offset-1); + offset += length_st_my_argv; + memcpy( &(this->my_argv[i]), &(this->st_my_argv), sizeof(char*)); + } + uint32_t length_bond_id; + arrToVar(length_bond_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_bond_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_bond_id-1]=0; + this->bond_id = (char *)(inbuffer + offset-1); + offset += length_bond_id; + return offset; + } + + const char * getType(){ return NODELETLOAD; }; + const char * getMD5(){ return "c6e28cc4d2e259249d96cfb50658fbec"; }; + + }; + + class NodeletLoadResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + + NodeletLoadResponse(): + success(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + return offset; + } + + const char * getType(){ return NODELETLOAD; }; + const char * getMD5(){ return "358e233cde0c8a8bcfea4ce193f8fc15"; }; + + }; + + class NodeletLoad { + public: + typedef NodeletLoadRequest Request; + typedef NodeletLoadResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/nodelet/NodeletUnload.h b/source/ros-max-lib/ros_lib/nodelet/NodeletUnload.h new file mode 100644 index 0000000000000000000000000000000000000000..bc865b484c324627c098b7f29ceada5dc18c4dcf --- /dev/null +++ b/source/ros-max-lib/ros_lib/nodelet/NodeletUnload.h @@ -0,0 +1,105 @@ +#ifndef _ROS_SERVICE_NodeletUnload_h +#define _ROS_SERVICE_NodeletUnload_h +#include +#include +#include +#include "ros/msg.h" + +namespace nodelet +{ + +static const char NODELETUNLOAD[] = "nodelet/NodeletUnload"; + + class NodeletUnloadRequest : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + + NodeletUnloadRequest(): + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return NODELETUNLOAD; }; + const char * getMD5(){ return "c1f3d28f1b044c871e6eff2e9fc3c667"; }; + + }; + + class NodeletUnloadResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + + NodeletUnloadResponse(): + success(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + return offset; + } + + const char * getType(){ return NODELETUNLOAD; }; + const char * getMD5(){ return "358e233cde0c8a8bcfea4ce193f8fc15"; }; + + }; + + class NodeletUnload { + public: + typedef NodeletUnloadRequest Request; + typedef NodeletUnloadResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/openni2_camera/GetSerial.h b/source/ros-max-lib/ros_lib/openni2_camera/GetSerial.h new file mode 100644 index 0000000000000000000000000000000000000000..c0f1cdf6ace0963aa4697f4ed9e675a76c87fa89 --- /dev/null +++ b/source/ros-max-lib/ros_lib/openni2_camera/GetSerial.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_GetSerial_h +#define _ROS_SERVICE_GetSerial_h +#include +#include +#include +#include "ros/msg.h" + +namespace openni2_camera +{ + +static const char GETSERIAL[] = "openni2_camera/GetSerial"; + + class GetSerialRequest : public ros::Msg + { + public: + + GetSerialRequest() + { + } + + 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 GETSERIAL; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetSerialResponse : public ros::Msg + { + public: + typedef const char* _serial_type; + _serial_type serial; + + GetSerialResponse(): + serial("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_serial = strlen(this->serial); + varToArr(outbuffer + offset, length_serial); + offset += 4; + memcpy(outbuffer + offset, this->serial, length_serial); + offset += length_serial; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_serial; + arrToVar(length_serial, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_serial; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_serial-1]=0; + this->serial = (char *)(inbuffer + offset-1); + offset += length_serial; + return offset; + } + + const char * getType(){ return GETSERIAL; }; + const char * getMD5(){ return "fca40cf463282a80db4e2037c8a61741"; }; + + }; + + class GetSerial { + public: + typedef GetSerialRequest Request; + typedef GetSerialResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/pcl_msgs/ModelCoefficients.h b/source/ros-max-lib/ros_lib/pcl_msgs/ModelCoefficients.h new file mode 100644 index 0000000000000000000000000000000000000000..3256a94821720456308306b84670a142b476e4a2 --- /dev/null +++ b/source/ros-max-lib/ros_lib/pcl_msgs/ModelCoefficients.h @@ -0,0 +1,88 @@ +#ifndef _ROS_pcl_msgs_ModelCoefficients_h +#define _ROS_pcl_msgs_ModelCoefficients_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace pcl_msgs +{ + + class ModelCoefficients : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t values_length; + typedef float _values_type; + _values_type st_values; + _values_type * values; + + ModelCoefficients(): + header(), + values_length(0), values(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->values_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->values_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->values_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->values_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->values_length); + for( uint32_t i = 0; i < values_length; i++){ + union { + float real; + uint32_t base; + } u_valuesi; + u_valuesi.real = this->values[i]; + *(outbuffer + offset + 0) = (u_valuesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_valuesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_valuesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_valuesi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->values[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t values_lengthT = ((uint32_t) (*(inbuffer + offset))); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->values_length); + if(values_lengthT > values_length) + this->values = (float*)realloc(this->values, values_lengthT * sizeof(float)); + values_length = values_lengthT; + for( uint32_t i = 0; i < values_length; i++){ + union { + float real; + uint32_t base; + } u_st_values; + u_st_values.base = 0; + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_values = u_st_values.real; + offset += sizeof(this->st_values); + memcpy( &(this->values[i]), &(this->st_values), sizeof(float)); + } + return offset; + } + + const char * getType(){ return "pcl_msgs/ModelCoefficients"; }; + const char * getMD5(){ return "ca27dea75e72cb894cd36f9e5005e93e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/pcl_msgs/PointIndices.h b/source/ros-max-lib/ros_lib/pcl_msgs/PointIndices.h new file mode 100644 index 0000000000000000000000000000000000000000..56feb9b428ad535b79ca0be1e1e8adb3abcffba4 --- /dev/null +++ b/source/ros-max-lib/ros_lib/pcl_msgs/PointIndices.h @@ -0,0 +1,88 @@ +#ifndef _ROS_pcl_msgs_PointIndices_h +#define _ROS_pcl_msgs_PointIndices_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace pcl_msgs +{ + + class PointIndices : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t indices_length; + typedef int32_t _indices_type; + _indices_type st_indices; + _indices_type * indices; + + PointIndices(): + header(), + indices_length(0), indices(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->indices_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->indices_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->indices_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->indices_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->indices_length); + for( uint32_t i = 0; i < indices_length; i++){ + union { + int32_t real; + uint32_t base; + } u_indicesi; + u_indicesi.real = this->indices[i]; + *(outbuffer + offset + 0) = (u_indicesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_indicesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_indicesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_indicesi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->indices[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t indices_lengthT = ((uint32_t) (*(inbuffer + offset))); + indices_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + indices_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + indices_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->indices_length); + if(indices_lengthT > indices_length) + this->indices = (int32_t*)realloc(this->indices, indices_lengthT * sizeof(int32_t)); + indices_length = indices_lengthT; + for( uint32_t i = 0; i < indices_length; i++){ + union { + int32_t real; + uint32_t base; + } u_st_indices; + u_st_indices.base = 0; + u_st_indices.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_indices.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_indices.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_indices.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_indices = u_st_indices.real; + offset += sizeof(this->st_indices); + memcpy( &(this->indices[i]), &(this->st_indices), sizeof(int32_t)); + } + return offset; + } + + const char * getType(){ return "pcl_msgs/PointIndices"; }; + const char * getMD5(){ return "458c7998b7eaf99908256472e273b3d4"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/pcl_msgs/PolygonMesh.h b/source/ros-max-lib/ros_lib/pcl_msgs/PolygonMesh.h new file mode 100644 index 0000000000000000000000000000000000000000..d98e4c15539d6d2ca6cf0367547c6dbe170bda0f --- /dev/null +++ b/source/ros-max-lib/ros_lib/pcl_msgs/PolygonMesh.h @@ -0,0 +1,76 @@ +#ifndef _ROS_pcl_msgs_PolygonMesh_h +#define _ROS_pcl_msgs_PolygonMesh_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/PointCloud2.h" +#include "pcl_msgs/Vertices.h" + +namespace pcl_msgs +{ + + class PolygonMesh : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef sensor_msgs::PointCloud2 _cloud_type; + _cloud_type cloud; + uint32_t polygons_length; + typedef pcl_msgs::Vertices _polygons_type; + _polygons_type st_polygons; + _polygons_type * polygons; + + PolygonMesh(): + header(), + cloud(), + polygons_length(0), polygons(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->cloud.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->polygons_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->polygons_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->polygons_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->polygons_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->polygons_length); + for( uint32_t i = 0; i < polygons_length; i++){ + offset += this->polygons[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->cloud.deserialize(inbuffer + offset); + uint32_t polygons_lengthT = ((uint32_t) (*(inbuffer + offset))); + polygons_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + polygons_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + polygons_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->polygons_length); + if(polygons_lengthT > polygons_length) + this->polygons = (pcl_msgs::Vertices*)realloc(this->polygons, polygons_lengthT * sizeof(pcl_msgs::Vertices)); + polygons_length = polygons_lengthT; + for( uint32_t i = 0; i < polygons_length; i++){ + offset += this->st_polygons.deserialize(inbuffer + offset); + memcpy( &(this->polygons[i]), &(this->st_polygons), sizeof(pcl_msgs::Vertices)); + } + return offset; + } + + const char * getType(){ return "pcl_msgs/PolygonMesh"; }; + const char * getMD5(){ return "45a5fc6ad2cde8489600a790acc9a38a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/pcl_msgs/Vertices.h b/source/ros-max-lib/ros_lib/pcl_msgs/Vertices.h new file mode 100644 index 0000000000000000000000000000000000000000..55a67045605dc403395107815dacb5b4da59f44b --- /dev/null +++ b/source/ros-max-lib/ros_lib/pcl_msgs/Vertices.h @@ -0,0 +1,71 @@ +#ifndef _ROS_pcl_msgs_Vertices_h +#define _ROS_pcl_msgs_Vertices_h + +#include +#include +#include +#include "ros/msg.h" + +namespace pcl_msgs +{ + + class Vertices : public ros::Msg + { + public: + uint32_t vertices_length; + typedef uint32_t _vertices_type; + _vertices_type st_vertices; + _vertices_type * vertices; + + Vertices(): + vertices_length(0), vertices(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->vertices_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->vertices_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->vertices_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->vertices_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->vertices_length); + for( uint32_t i = 0; i < vertices_length; i++){ + *(outbuffer + offset + 0) = (this->vertices[i] >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->vertices[i] >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->vertices[i] >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->vertices[i] >> (8 * 3)) & 0xFF; + offset += sizeof(this->vertices[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t vertices_lengthT = ((uint32_t) (*(inbuffer + offset))); + vertices_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + vertices_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + vertices_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->vertices_length); + if(vertices_lengthT > vertices_length) + this->vertices = (uint32_t*)realloc(this->vertices, vertices_lengthT * sizeof(uint32_t)); + vertices_length = vertices_lengthT; + for( uint32_t i = 0; i < vertices_length; i++){ + this->st_vertices = ((uint32_t) (*(inbuffer + offset))); + this->st_vertices |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->st_vertices |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->st_vertices |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->st_vertices); + memcpy( &(this->vertices[i]), &(this->st_vertices), sizeof(uint32_t)); + } + return offset; + } + + const char * getType(){ return "pcl_msgs/Vertices"; }; + const char * getMD5(){ return "39bd7b1c23763ddd1b882b97cb7cfe11"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/polled_camera/GetPolledImage.h b/source/ros-max-lib/ros_lib/polled_camera/GetPolledImage.h new file mode 100644 index 0000000000000000000000000000000000000000..b06240573d3c8944191f7ae26e3ed3a91a24ae94 --- /dev/null +++ b/source/ros-max-lib/ros_lib/polled_camera/GetPolledImage.h @@ -0,0 +1,202 @@ +#ifndef _ROS_SERVICE_GetPolledImage_h +#define _ROS_SERVICE_GetPolledImage_h +#include +#include +#include +#include "ros/msg.h" +#include "sensor_msgs/RegionOfInterest.h" +#include "ros/duration.h" +#include "ros/time.h" + +namespace polled_camera +{ + +static const char GETPOLLEDIMAGE[] = "polled_camera/GetPolledImage"; + + class GetPolledImageRequest : public ros::Msg + { + public: + typedef const char* _response_namespace_type; + _response_namespace_type response_namespace; + typedef ros::Duration _timeout_type; + _timeout_type timeout; + typedef uint32_t _binning_x_type; + _binning_x_type binning_x; + typedef uint32_t _binning_y_type; + _binning_y_type binning_y; + typedef sensor_msgs::RegionOfInterest _roi_type; + _roi_type roi; + + GetPolledImageRequest(): + response_namespace(""), + timeout(), + binning_x(0), + binning_y(0), + roi() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_response_namespace = strlen(this->response_namespace); + varToArr(outbuffer + offset, length_response_namespace); + offset += 4; + memcpy(outbuffer + offset, this->response_namespace, length_response_namespace); + offset += length_response_namespace; + *(outbuffer + offset + 0) = (this->timeout.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timeout.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timeout.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timeout.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timeout.sec); + *(outbuffer + offset + 0) = (this->timeout.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timeout.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timeout.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timeout.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timeout.nsec); + *(outbuffer + offset + 0) = (this->binning_x >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->binning_x >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->binning_x >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->binning_x >> (8 * 3)) & 0xFF; + offset += sizeof(this->binning_x); + *(outbuffer + offset + 0) = (this->binning_y >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->binning_y >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->binning_y >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->binning_y >> (8 * 3)) & 0xFF; + offset += sizeof(this->binning_y); + offset += this->roi.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_response_namespace; + arrToVar(length_response_namespace, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_response_namespace; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_response_namespace-1]=0; + this->response_namespace = (char *)(inbuffer + offset-1); + offset += length_response_namespace; + this->timeout.sec = ((uint32_t) (*(inbuffer + offset))); + this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timeout.sec); + this->timeout.nsec = ((uint32_t) (*(inbuffer + offset))); + this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timeout.nsec); + this->binning_x = ((uint32_t) (*(inbuffer + offset))); + this->binning_x |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->binning_x |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->binning_x |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->binning_x); + this->binning_y = ((uint32_t) (*(inbuffer + offset))); + this->binning_y |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->binning_y |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->binning_y |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->binning_y); + offset += this->roi.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return GETPOLLEDIMAGE; }; + const char * getMD5(){ return "c77ed43e530fd48e9e7a2a93845e154c"; }; + + }; + + class GetPolledImageResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + typedef ros::Time _stamp_type; + _stamp_type stamp; + + GetPolledImageResponse(): + success(0), + status_message(""), + stamp() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + *(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); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + 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); + return offset; + } + + const char * getType(){ return GETPOLLEDIMAGE; }; + const char * getMD5(){ return "dbf1f851bc511800e6129ccd5a3542ab"; }; + + }; + + class GetPolledImage { + public: + typedef GetPolledImageRequest Request; + typedef GetPolledImageResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/py_trees_msgs/Behaviour.h b/source/ros-max-lib/ros_lib/py_trees_msgs/Behaviour.h new file mode 100644 index 0000000000000000000000000000000000000000..04c5d8ad267bab1b743a790279c50d22526e3987 --- /dev/null +++ b/source/ros-max-lib/ros_lib/py_trees_msgs/Behaviour.h @@ -0,0 +1,183 @@ +#ifndef _ROS_py_trees_msgs_Behaviour_h +#define _ROS_py_trees_msgs_Behaviour_h + +#include +#include +#include +#include "ros/msg.h" +#include "uuid_msgs/UniqueID.h" + +namespace py_trees_msgs +{ + + class Behaviour : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _class_name_type; + _class_name_type class_name; + typedef uuid_msgs::UniqueID _own_id_type; + _own_id_type own_id; + typedef uuid_msgs::UniqueID _parent_id_type; + _parent_id_type parent_id; + typedef uuid_msgs::UniqueID _tip_id_type; + _tip_id_type tip_id; + uint32_t child_ids_length; + typedef uuid_msgs::UniqueID _child_ids_type; + _child_ids_type st_child_ids; + _child_ids_type * child_ids; + typedef uint8_t _type_type; + _type_type type; + typedef uint8_t _blackbox_level_type; + _blackbox_level_type blackbox_level; + typedef uint8_t _status_type; + _status_type status; + typedef const char* _message_type; + _message_type message; + typedef bool _is_active_type; + _is_active_type is_active; + enum { INVALID = 1 }; + enum { RUNNING = 2 }; + enum { SUCCESS = 3 }; + enum { FAILURE = 4 }; + enum { UNKNOWN_TYPE = 0 }; + enum { BEHAVIOUR = 1 }; + enum { SEQUENCE = 2 }; + enum { SELECTOR = 3 }; + enum { PARALLEL = 4 }; + enum { CHOOSER = 5 }; + enum { BLACKBOX_LEVEL_DETAIL = 1 }; + enum { BLACKBOX_LEVEL_COMPONENT = 2 }; + enum { BLACKBOX_LEVEL_BIG_PICTURE = 3 }; + enum { BLACKBOX_LEVEL_NOT_A_BLACKBOX = 4 }; + + Behaviour(): + name(""), + class_name(""), + own_id(), + parent_id(), + tip_id(), + child_ids_length(0), child_ids(NULL), + type(0), + blackbox_level(0), + status(0), + message(""), + is_active(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_class_name = strlen(this->class_name); + varToArr(outbuffer + offset, length_class_name); + offset += 4; + memcpy(outbuffer + offset, this->class_name, length_class_name); + offset += length_class_name; + offset += this->own_id.serialize(outbuffer + offset); + offset += this->parent_id.serialize(outbuffer + offset); + offset += this->tip_id.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->child_ids_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->child_ids_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->child_ids_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->child_ids_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->child_ids_length); + for( uint32_t i = 0; i < child_ids_length; i++){ + offset += this->child_ids[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->type >> (8 * 0)) & 0xFF; + offset += sizeof(this->type); + *(outbuffer + offset + 0) = (this->blackbox_level >> (8 * 0)) & 0xFF; + offset += sizeof(this->blackbox_level); + *(outbuffer + offset + 0) = (this->status >> (8 * 0)) & 0xFF; + offset += sizeof(this->status); + uint32_t length_message = strlen(this->message); + varToArr(outbuffer + offset, length_message); + offset += 4; + memcpy(outbuffer + offset, this->message, length_message); + offset += length_message; + union { + bool real; + uint8_t base; + } u_is_active; + u_is_active.real = this->is_active; + *(outbuffer + offset + 0) = (u_is_active.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->is_active); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_class_name; + arrToVar(length_class_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_class_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_class_name-1]=0; + this->class_name = (char *)(inbuffer + offset-1); + offset += length_class_name; + offset += this->own_id.deserialize(inbuffer + offset); + offset += this->parent_id.deserialize(inbuffer + offset); + offset += this->tip_id.deserialize(inbuffer + offset); + uint32_t child_ids_lengthT = ((uint32_t) (*(inbuffer + offset))); + child_ids_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + child_ids_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + child_ids_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->child_ids_length); + if(child_ids_lengthT > child_ids_length) + this->child_ids = (uuid_msgs::UniqueID*)realloc(this->child_ids, child_ids_lengthT * sizeof(uuid_msgs::UniqueID)); + child_ids_length = child_ids_lengthT; + for( uint32_t i = 0; i < child_ids_length; i++){ + offset += this->st_child_ids.deserialize(inbuffer + offset); + memcpy( &(this->child_ids[i]), &(this->st_child_ids), sizeof(uuid_msgs::UniqueID)); + } + this->type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->type); + this->blackbox_level = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->blackbox_level); + this->status = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->status); + uint32_t length_message; + arrToVar(length_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message-1]=0; + this->message = (char *)(inbuffer + offset-1); + offset += length_message; + union { + bool real; + uint8_t base; + } u_is_active; + u_is_active.base = 0; + u_is_active.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->is_active = u_is_active.real; + offset += sizeof(this->is_active); + return offset; + } + + const char * getType(){ return "py_trees_msgs/Behaviour"; }; + const char * getMD5(){ return "88ddda148fc81f5dc402f56e3e333222"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/py_trees_msgs/BehaviourTree.h b/source/ros-max-lib/ros_lib/py_trees_msgs/BehaviourTree.h new file mode 100644 index 0000000000000000000000000000000000000000..33bfd19c52655c242834aa35a8b1a0689ee1a932 --- /dev/null +++ b/source/ros-max-lib/ros_lib/py_trees_msgs/BehaviourTree.h @@ -0,0 +1,70 @@ +#ifndef _ROS_py_trees_msgs_BehaviourTree_h +#define _ROS_py_trees_msgs_BehaviourTree_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "py_trees_msgs/Behaviour.h" + +namespace py_trees_msgs +{ + + class BehaviourTree : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t behaviours_length; + typedef py_trees_msgs::Behaviour _behaviours_type; + _behaviours_type st_behaviours; + _behaviours_type * behaviours; + + BehaviourTree(): + header(), + behaviours_length(0), behaviours(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->behaviours_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->behaviours_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->behaviours_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->behaviours_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->behaviours_length); + for( uint32_t i = 0; i < behaviours_length; i++){ + offset += this->behaviours[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t behaviours_lengthT = ((uint32_t) (*(inbuffer + offset))); + behaviours_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + behaviours_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + behaviours_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->behaviours_length); + if(behaviours_lengthT > behaviours_length) + this->behaviours = (py_trees_msgs::Behaviour*)realloc(this->behaviours, behaviours_lengthT * sizeof(py_trees_msgs::Behaviour)); + behaviours_length = behaviours_lengthT; + for( uint32_t i = 0; i < behaviours_length; i++){ + offset += this->st_behaviours.deserialize(inbuffer + offset); + memcpy( &(this->behaviours[i]), &(this->st_behaviours), sizeof(py_trees_msgs::Behaviour)); + } + return offset; + } + + const char * getType(){ return "py_trees_msgs/BehaviourTree"; }; + const char * getMD5(){ return "239023f5538cba34a10a3a5cd6610fa0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/py_trees_msgs/CloseBlackboardWatcher.h b/source/ros-max-lib/ros_lib/py_trees_msgs/CloseBlackboardWatcher.h new file mode 100644 index 0000000000000000000000000000000000000000..5c6d3922acfb310aa0753bdf63451342a00573fe --- /dev/null +++ b/source/ros-max-lib/ros_lib/py_trees_msgs/CloseBlackboardWatcher.h @@ -0,0 +1,105 @@ +#ifndef _ROS_SERVICE_CloseBlackboardWatcher_h +#define _ROS_SERVICE_CloseBlackboardWatcher_h +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + +static const char CLOSEBLACKBOARDWATCHER[] = "py_trees_msgs/CloseBlackboardWatcher"; + + class CloseBlackboardWatcherRequest : public ros::Msg + { + public: + typedef const char* _topic_name_type; + _topic_name_type topic_name; + + CloseBlackboardWatcherRequest(): + topic_name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic_name = strlen(this->topic_name); + varToArr(outbuffer + offset, length_topic_name); + offset += 4; + memcpy(outbuffer + offset, this->topic_name, length_topic_name); + offset += length_topic_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic_name; + arrToVar(length_topic_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic_name-1]=0; + this->topic_name = (char *)(inbuffer + offset-1); + offset += length_topic_name; + return offset; + } + + const char * getType(){ return CLOSEBLACKBOARDWATCHER; }; + const char * getMD5(){ return "b38cc2f19f45368c2db7867751ce95a9"; }; + + }; + + class CloseBlackboardWatcherResponse : public ros::Msg + { + public: + typedef bool _result_type; + _result_type result; + + CloseBlackboardWatcherResponse(): + result(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_result; + u_result.real = this->result; + *(outbuffer + offset + 0) = (u_result.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->result); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_result; + u_result.base = 0; + u_result.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->result = u_result.real; + offset += sizeof(this->result); + return offset; + } + + const char * getType(){ return CLOSEBLACKBOARDWATCHER; }; + const char * getMD5(){ return "eb13ac1f1354ccecb7941ee8fa2192e8"; }; + + }; + + class CloseBlackboardWatcher { + public: + typedef CloseBlackboardWatcherRequest Request; + typedef CloseBlackboardWatcherResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/py_trees_msgs/DockAction.h b/source/ros-max-lib/ros_lib/py_trees_msgs/DockAction.h new file mode 100644 index 0000000000000000000000000000000000000000..d9945d023e8243937a54ebd9db130197da19c45e --- /dev/null +++ b/source/ros-max-lib/ros_lib/py_trees_msgs/DockAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_DockAction_h +#define _ROS_py_trees_msgs_DockAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "py_trees_msgs/DockActionGoal.h" +#include "py_trees_msgs/DockActionResult.h" +#include "py_trees_msgs/DockActionFeedback.h" + +namespace py_trees_msgs +{ + + class DockAction : public ros::Msg + { + public: + typedef py_trees_msgs::DockActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef py_trees_msgs::DockActionResult _action_result_type; + _action_result_type action_result; + typedef py_trees_msgs::DockActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + DockAction(): + 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 "py_trees_msgs/DockAction"; }; + const char * getMD5(){ return "1487f2ccdee1636e3fa5ee088040ee3a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/py_trees_msgs/DockActionFeedback.h b/source/ros-max-lib/ros_lib/py_trees_msgs/DockActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..f485e2bf2f330fa39b3fd7c909598b4427608134 --- /dev/null +++ b/source/ros-max-lib/ros_lib/py_trees_msgs/DockActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_DockActionFeedback_h +#define _ROS_py_trees_msgs_DockActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "py_trees_msgs/DockFeedback.h" + +namespace py_trees_msgs +{ + + class DockActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef py_trees_msgs::DockFeedback _feedback_type; + _feedback_type feedback; + + DockActionFeedback(): + 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 "py_trees_msgs/DockActionFeedback"; }; + const char * getMD5(){ return "2ff213e56f8a13eff9119a87d46f6e06"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/py_trees_msgs/DockActionGoal.h b/source/ros-max-lib/ros_lib/py_trees_msgs/DockActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..e90092988579600144b8c9679681107aad69146d --- /dev/null +++ b/source/ros-max-lib/ros_lib/py_trees_msgs/DockActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_DockActionGoal_h +#define _ROS_py_trees_msgs_DockActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "py_trees_msgs/DockGoal.h" + +namespace py_trees_msgs +{ + + class DockActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef py_trees_msgs::DockGoal _goal_type; + _goal_type goal; + + DockActionGoal(): + 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 "py_trees_msgs/DockActionGoal"; }; + const char * getMD5(){ return "792a8f48465c33ddc8270c5f2a92be76"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/py_trees_msgs/DockActionResult.h b/source/ros-max-lib/ros_lib/py_trees_msgs/DockActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..622b6665d7871ba7940c0cc787a8790fc8c2548c --- /dev/null +++ b/source/ros-max-lib/ros_lib/py_trees_msgs/DockActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_DockActionResult_h +#define _ROS_py_trees_msgs_DockActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "py_trees_msgs/DockResult.h" + +namespace py_trees_msgs +{ + + class DockActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef py_trees_msgs::DockResult _result_type; + _result_type result; + + DockActionResult(): + 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 "py_trees_msgs/DockActionResult"; }; + const char * getMD5(){ return "4eda63f75c02197dafd2a62a0d413ab0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/py_trees_msgs/DockFeedback.h b/source/ros-max-lib/ros_lib/py_trees_msgs/DockFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..8f6e2a1f598cd25fb6a3442f20c82d55be4003b2 --- /dev/null +++ b/source/ros-max-lib/ros_lib/py_trees_msgs/DockFeedback.h @@ -0,0 +1,62 @@ +#ifndef _ROS_py_trees_msgs_DockFeedback_h +#define _ROS_py_trees_msgs_DockFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + + class DockFeedback : public ros::Msg + { + public: + typedef float _percentage_completed_type; + _percentage_completed_type percentage_completed; + + DockFeedback(): + percentage_completed(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_percentage_completed; + u_percentage_completed.real = this->percentage_completed; + *(outbuffer + offset + 0) = (u_percentage_completed.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_percentage_completed.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_percentage_completed.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_percentage_completed.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->percentage_completed); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_percentage_completed; + u_percentage_completed.base = 0; + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->percentage_completed = u_percentage_completed.real; + offset += sizeof(this->percentage_completed); + return offset; + } + + const char * getType(){ return "py_trees_msgs/DockFeedback"; }; + const char * getMD5(){ return "26e2c7154b190781742892deccb6c8f0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/py_trees_msgs/DockGoal.h b/source/ros-max-lib/ros_lib/py_trees_msgs/DockGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..ac04af8ea1ba1cb169a39a9c89e515a30d6a4983 --- /dev/null +++ b/source/ros-max-lib/ros_lib/py_trees_msgs/DockGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_DockGoal_h +#define _ROS_py_trees_msgs_DockGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + + class DockGoal : public ros::Msg + { + public: + typedef bool _dock_type; + _dock_type dock; + + DockGoal(): + dock(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_dock; + u_dock.real = this->dock; + *(outbuffer + offset + 0) = (u_dock.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->dock); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_dock; + u_dock.base = 0; + u_dock.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->dock = u_dock.real; + offset += sizeof(this->dock); + return offset; + } + + const char * getType(){ return "py_trees_msgs/DockGoal"; }; + const char * getMD5(){ return "035360b0bb03f7f742a0b2d734a3a660"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/py_trees_msgs/DockResult.h b/source/ros-max-lib/ros_lib/py_trees_msgs/DockResult.h new file mode 100644 index 0000000000000000000000000000000000000000..685ba137251b2b04811050a30c57ba134bb2680a --- /dev/null +++ b/source/ros-max-lib/ros_lib/py_trees_msgs/DockResult.h @@ -0,0 +1,75 @@ +#ifndef _ROS_py_trees_msgs_DockResult_h +#define _ROS_py_trees_msgs_DockResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + + class DockResult : public ros::Msg + { + public: + typedef int8_t _value_type; + _value_type value; + typedef const char* _message_type; + _message_type message; + enum { SUCCESS = 0 }; + enum { ERROR = 1 }; + + DockResult(): + value(0), + message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_value; + u_value.real = this->value; + *(outbuffer + offset + 0) = (u_value.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->value); + uint32_t length_message = strlen(this->message); + varToArr(outbuffer + offset, length_message); + offset += 4; + memcpy(outbuffer + offset, this->message, length_message); + offset += length_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_value; + u_value.base = 0; + u_value.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->value = u_value.real; + offset += sizeof(this->value); + uint32_t length_message; + arrToVar(length_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message-1]=0; + this->message = (char *)(inbuffer + offset-1); + offset += length_message; + return offset; + } + + const char * getType(){ return "py_trees_msgs/DockResult"; }; + const char * getMD5(){ return "7e3448b3518ac363f90f534593733372"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/py_trees_msgs/GetBlackboardVariables.h b/source/ros-max-lib/ros_lib/py_trees_msgs/GetBlackboardVariables.h new file mode 100644 index 0000000000000000000000000000000000000000..cd90747425dedcd77baf86916c341a5de93b3993 --- /dev/null +++ b/source/ros-max-lib/ros_lib/py_trees_msgs/GetBlackboardVariables.h @@ -0,0 +1,107 @@ +#ifndef _ROS_SERVICE_GetBlackboardVariables_h +#define _ROS_SERVICE_GetBlackboardVariables_h +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + +static const char GETBLACKBOARDVARIABLES[] = "py_trees_msgs/GetBlackboardVariables"; + + class GetBlackboardVariablesRequest : public ros::Msg + { + public: + + GetBlackboardVariablesRequest() + { + } + + 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 GETBLACKBOARDVARIABLES; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetBlackboardVariablesResponse : public ros::Msg + { + public: + uint32_t variables_length; + typedef char* _variables_type; + _variables_type st_variables; + _variables_type * variables; + + GetBlackboardVariablesResponse(): + variables_length(0), variables(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->variables_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->variables_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->variables_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->variables_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->variables_length); + for( uint32_t i = 0; i < variables_length; i++){ + uint32_t length_variablesi = strlen(this->variables[i]); + varToArr(outbuffer + offset, length_variablesi); + offset += 4; + memcpy(outbuffer + offset, this->variables[i], length_variablesi); + offset += length_variablesi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t variables_lengthT = ((uint32_t) (*(inbuffer + offset))); + variables_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + variables_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + variables_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->variables_length); + if(variables_lengthT > variables_length) + this->variables = (char**)realloc(this->variables, variables_lengthT * sizeof(char*)); + variables_length = variables_lengthT; + for( uint32_t i = 0; i < variables_length; i++){ + uint32_t length_st_variables; + arrToVar(length_st_variables, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_variables; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_variables-1]=0; + this->st_variables = (char *)(inbuffer + offset-1); + offset += length_st_variables; + memcpy( &(this->variables[i]), &(this->st_variables), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return GETBLACKBOARDVARIABLES; }; + const char * getMD5(){ return "8f184382c36d538fab610317191b119e"; }; + + }; + + class GetBlackboardVariables { + public: + typedef GetBlackboardVariablesRequest Request; + typedef GetBlackboardVariablesResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/py_trees_msgs/OpenBlackboardWatcher.h b/source/ros-max-lib/ros_lib/py_trees_msgs/OpenBlackboardWatcher.h new file mode 100644 index 0000000000000000000000000000000000000000..e4fb7633ed794a72f4cb29d07ac472c363254f4f --- /dev/null +++ b/source/ros-max-lib/ros_lib/py_trees_msgs/OpenBlackboardWatcher.h @@ -0,0 +1,124 @@ +#ifndef _ROS_SERVICE_OpenBlackboardWatcher_h +#define _ROS_SERVICE_OpenBlackboardWatcher_h +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + +static const char OPENBLACKBOARDWATCHER[] = "py_trees_msgs/OpenBlackboardWatcher"; + + class OpenBlackboardWatcherRequest : public ros::Msg + { + public: + uint32_t variables_length; + typedef char* _variables_type; + _variables_type st_variables; + _variables_type * variables; + + OpenBlackboardWatcherRequest(): + variables_length(0), variables(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->variables_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->variables_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->variables_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->variables_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->variables_length); + for( uint32_t i = 0; i < variables_length; i++){ + uint32_t length_variablesi = strlen(this->variables[i]); + varToArr(outbuffer + offset, length_variablesi); + offset += 4; + memcpy(outbuffer + offset, this->variables[i], length_variablesi); + offset += length_variablesi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t variables_lengthT = ((uint32_t) (*(inbuffer + offset))); + variables_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + variables_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + variables_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->variables_length); + if(variables_lengthT > variables_length) + this->variables = (char**)realloc(this->variables, variables_lengthT * sizeof(char*)); + variables_length = variables_lengthT; + for( uint32_t i = 0; i < variables_length; i++){ + uint32_t length_st_variables; + arrToVar(length_st_variables, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_variables; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_variables-1]=0; + this->st_variables = (char *)(inbuffer + offset-1); + offset += length_st_variables; + memcpy( &(this->variables[i]), &(this->st_variables), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return OPENBLACKBOARDWATCHER; }; + const char * getMD5(){ return "8f184382c36d538fab610317191b119e"; }; + + }; + + class OpenBlackboardWatcherResponse : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + + OpenBlackboardWatcherResponse(): + topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + return offset; + } + + const char * getType(){ return OPENBLACKBOARDWATCHER; }; + const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; }; + + }; + + class OpenBlackboardWatcher { + public: + typedef OpenBlackboardWatcherRequest Request; + typedef OpenBlackboardWatcherResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/py_trees_msgs/RotateAction.h b/source/ros-max-lib/ros_lib/py_trees_msgs/RotateAction.h new file mode 100644 index 0000000000000000000000000000000000000000..dda6c2f17acccc74eeca287f78067ae8319a2562 --- /dev/null +++ b/source/ros-max-lib/ros_lib/py_trees_msgs/RotateAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_RotateAction_h +#define _ROS_py_trees_msgs_RotateAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "py_trees_msgs/RotateActionGoal.h" +#include "py_trees_msgs/RotateActionResult.h" +#include "py_trees_msgs/RotateActionFeedback.h" + +namespace py_trees_msgs +{ + + class RotateAction : public ros::Msg + { + public: + typedef py_trees_msgs::RotateActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef py_trees_msgs::RotateActionResult _action_result_type; + _action_result_type action_result; + typedef py_trees_msgs::RotateActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + RotateAction(): + 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 "py_trees_msgs/RotateAction"; }; + const char * getMD5(){ return "c68d9e0a719660a32868a081a56942db"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/py_trees_msgs/RotateActionFeedback.h b/source/ros-max-lib/ros_lib/py_trees_msgs/RotateActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..e1a7f5bf88549af58d4fac0f2defa7ba0e8752c9 --- /dev/null +++ b/source/ros-max-lib/ros_lib/py_trees_msgs/RotateActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_RotateActionFeedback_h +#define _ROS_py_trees_msgs_RotateActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "py_trees_msgs/RotateFeedback.h" + +namespace py_trees_msgs +{ + + class RotateActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef py_trees_msgs::RotateFeedback _feedback_type; + _feedback_type feedback; + + RotateActionFeedback(): + 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 "py_trees_msgs/RotateActionFeedback"; }; + const char * getMD5(){ return "344ed0daa120e01d5801edcb980cf618"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/py_trees_msgs/RotateActionGoal.h b/source/ros-max-lib/ros_lib/py_trees_msgs/RotateActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..1afb37b85cf212f6cb4b200830bd01f08983edbb --- /dev/null +++ b/source/ros-max-lib/ros_lib/py_trees_msgs/RotateActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_RotateActionGoal_h +#define _ROS_py_trees_msgs_RotateActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "py_trees_msgs/RotateGoal.h" + +namespace py_trees_msgs +{ + + class RotateActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef py_trees_msgs::RotateGoal _goal_type; + _goal_type goal; + + RotateActionGoal(): + 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 "py_trees_msgs/RotateActionGoal"; }; + const char * getMD5(){ return "4b30be6cd12b9e72826df56b481f40e0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/py_trees_msgs/RotateActionResult.h b/source/ros-max-lib/ros_lib/py_trees_msgs/RotateActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..72914314140d4fe2d2430f981536cba4382c30d6 --- /dev/null +++ b/source/ros-max-lib/ros_lib/py_trees_msgs/RotateActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_py_trees_msgs_RotateActionResult_h +#define _ROS_py_trees_msgs_RotateActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "py_trees_msgs/RotateResult.h" + +namespace py_trees_msgs +{ + + class RotateActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef py_trees_msgs::RotateResult _result_type; + _result_type result; + + RotateActionResult(): + 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 "py_trees_msgs/RotateActionResult"; }; + const char * getMD5(){ return "4eda63f75c02197dafd2a62a0d413ab0"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/py_trees_msgs/RotateFeedback.h b/source/ros-max-lib/ros_lib/py_trees_msgs/RotateFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..52aa269941c973aff1c654fd862821079503533e --- /dev/null +++ b/source/ros-max-lib/ros_lib/py_trees_msgs/RotateFeedback.h @@ -0,0 +1,86 @@ +#ifndef _ROS_py_trees_msgs_RotateFeedback_h +#define _ROS_py_trees_msgs_RotateFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + + class RotateFeedback : public ros::Msg + { + public: + typedef float _percentage_completed_type; + _percentage_completed_type percentage_completed; + typedef float _angle_rotated_type; + _angle_rotated_type angle_rotated; + + RotateFeedback(): + percentage_completed(0), + angle_rotated(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_percentage_completed; + u_percentage_completed.real = this->percentage_completed; + *(outbuffer + offset + 0) = (u_percentage_completed.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_percentage_completed.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_percentage_completed.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_percentage_completed.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->percentage_completed); + union { + float real; + uint32_t base; + } u_angle_rotated; + u_angle_rotated.real = this->angle_rotated; + *(outbuffer + offset + 0) = (u_angle_rotated.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angle_rotated.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angle_rotated.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angle_rotated.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angle_rotated); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_percentage_completed; + u_percentage_completed.base = 0; + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_percentage_completed.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->percentage_completed = u_percentage_completed.real; + offset += sizeof(this->percentage_completed); + union { + float real; + uint32_t base; + } u_angle_rotated; + u_angle_rotated.base = 0; + u_angle_rotated.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angle_rotated.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angle_rotated.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angle_rotated.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angle_rotated = u_angle_rotated.real; + offset += sizeof(this->angle_rotated); + return offset; + } + + const char * getType(){ return "py_trees_msgs/RotateFeedback"; }; + const char * getMD5(){ return "f1088922e17b4a9f4319356ac8d99645"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/py_trees_msgs/RotateGoal.h b/source/ros-max-lib/ros_lib/py_trees_msgs/RotateGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..4d196edae8ec3ef76bcf8afa4625f23015095d3d --- /dev/null +++ b/source/ros-max-lib/ros_lib/py_trees_msgs/RotateGoal.h @@ -0,0 +1,38 @@ +#ifndef _ROS_py_trees_msgs_RotateGoal_h +#define _ROS_py_trees_msgs_RotateGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + + class RotateGoal : public ros::Msg + { + public: + + RotateGoal() + { + } + + 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 "py_trees_msgs/RotateGoal"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/py_trees_msgs/RotateResult.h b/source/ros-max-lib/ros_lib/py_trees_msgs/RotateResult.h new file mode 100644 index 0000000000000000000000000000000000000000..d84dc6125db11c09cd72f56013bbc66f706e3ad3 --- /dev/null +++ b/source/ros-max-lib/ros_lib/py_trees_msgs/RotateResult.h @@ -0,0 +1,75 @@ +#ifndef _ROS_py_trees_msgs_RotateResult_h +#define _ROS_py_trees_msgs_RotateResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace py_trees_msgs +{ + + class RotateResult : public ros::Msg + { + public: + typedef int8_t _value_type; + _value_type value; + typedef const char* _message_type; + _message_type message; + enum { SUCCESS = 0 }; + enum { ERROR = 1 }; + + RotateResult(): + value(0), + message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_value; + u_value.real = this->value; + *(outbuffer + offset + 0) = (u_value.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->value); + uint32_t length_message = strlen(this->message); + varToArr(outbuffer + offset, length_message); + offset += 4; + memcpy(outbuffer + offset, this->message, length_message); + offset += length_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_value; + u_value.base = 0; + u_value.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->value = u_value.real; + offset += sizeof(this->value); + uint32_t length_message; + arrToVar(length_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message-1]=0; + this->message = (char *)(inbuffer + offset-1); + offset += length_message; + return offset; + } + + const char * getType(){ return "py_trees_msgs/RotateResult"; }; + const char * getMD5(){ return "7e3448b3518ac363f90f534593733372"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/robot_pose_ekf/GetStatus.h b/source/ros-max-lib/ros_lib/robot_pose_ekf/GetStatus.h new file mode 100644 index 0000000000000000000000000000000000000000..155cde3422aec6a6f2d131d7573c06e6889ee279 --- /dev/null +++ b/source/ros-max-lib/ros_lib/robot_pose_ekf/GetStatus.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_GetStatus_h +#define _ROS_SERVICE_GetStatus_h +#include +#include +#include +#include "ros/msg.h" + +namespace robot_pose_ekf +{ + +static const char GETSTATUS[] = "robot_pose_ekf/GetStatus"; + + class GetStatusRequest : public ros::Msg + { + public: + + GetStatusRequest() + { + } + + 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 GETSTATUS; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetStatusResponse : public ros::Msg + { + public: + typedef const char* _status_type; + _status_type status; + + GetStatusResponse(): + status("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_status = strlen(this->status); + varToArr(outbuffer + offset, length_status); + offset += 4; + memcpy(outbuffer + offset, this->status, length_status); + offset += length_status; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_status; + arrToVar(length_status, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status-1]=0; + this->status = (char *)(inbuffer + offset-1); + offset += length_status; + return offset; + } + + const char * getType(){ return GETSTATUS; }; + const char * getMD5(){ return "4fe5af303955c287688e7347e9b00278"; }; + + }; + + class GetStatus { + public: + typedef GetStatusRequest Request; + typedef GetStatusResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/rocon_service_pair_msgs/TestiesPair.h b/source/ros-max-lib/ros_lib/rocon_service_pair_msgs/TestiesPair.h new file mode 100644 index 0000000000000000000000000000000000000000..4ea6cfdea2fc8f69281a83b2134d89ffc4793d69 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_service_pair_msgs/TestiesPair.h @@ -0,0 +1,50 @@ +#ifndef _ROS_rocon_service_pair_msgs_TestiesPair_h +#define _ROS_rocon_service_pair_msgs_TestiesPair_h + +#include +#include +#include +#include "ros/msg.h" +#include "rocon_service_pair_msgs/TestiesPairRequest.h" +#include "rocon_service_pair_msgs/TestiesPairResponse.h" + +namespace rocon_service_pair_msgs +{ + + class TestiesPair : public ros::Msg + { + public: + typedef rocon_service_pair_msgs::TestiesPairRequest _pair_request_type; + _pair_request_type pair_request; + typedef rocon_service_pair_msgs::TestiesPairResponse _pair_response_type; + _pair_response_type pair_response; + + TestiesPair(): + pair_request(), + pair_response() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->pair_request.serialize(outbuffer + offset); + offset += this->pair_response.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->pair_request.deserialize(inbuffer + offset); + offset += this->pair_response.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "rocon_service_pair_msgs/TestiesPair"; }; + const char * getMD5(){ return "7b5cb9b4ccdb74840ce04ea92d2a141d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rocon_service_pair_msgs/TestiesPairRequest.h b/source/ros-max-lib/ros_lib/rocon_service_pair_msgs/TestiesPairRequest.h new file mode 100644 index 0000000000000000000000000000000000000000..8da52e4bfb190b844885b8761e774a21601aaf75 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_service_pair_msgs/TestiesPairRequest.h @@ -0,0 +1,50 @@ +#ifndef _ROS_rocon_service_pair_msgs_TestiesPairRequest_h +#define _ROS_rocon_service_pair_msgs_TestiesPairRequest_h + +#include +#include +#include +#include "ros/msg.h" +#include "uuid_msgs/UniqueID.h" +#include "rocon_service_pair_msgs/TestiesRequest.h" + +namespace rocon_service_pair_msgs +{ + + class TestiesPairRequest : public ros::Msg + { + public: + typedef uuid_msgs::UniqueID _id_type; + _id_type id; + typedef rocon_service_pair_msgs::TestiesRequest _request_type; + _request_type request; + + TestiesPairRequest(): + id(), + request() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->id.serialize(outbuffer + offset); + offset += this->request.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->id.deserialize(inbuffer + offset); + offset += this->request.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "rocon_service_pair_msgs/TestiesPairRequest"; }; + const char * getMD5(){ return "71ec95e384ce52aa32491f3b69a62027"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rocon_service_pair_msgs/TestiesPairResponse.h b/source/ros-max-lib/ros_lib/rocon_service_pair_msgs/TestiesPairResponse.h new file mode 100644 index 0000000000000000000000000000000000000000..4fec039a918024d32c747d50156938adbc1c8df7 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_service_pair_msgs/TestiesPairResponse.h @@ -0,0 +1,50 @@ +#ifndef _ROS_rocon_service_pair_msgs_TestiesPairResponse_h +#define _ROS_rocon_service_pair_msgs_TestiesPairResponse_h + +#include +#include +#include +#include "ros/msg.h" +#include "uuid_msgs/UniqueID.h" +#include "rocon_service_pair_msgs/TestiesResponse.h" + +namespace rocon_service_pair_msgs +{ + + class TestiesPairResponse : public ros::Msg + { + public: + typedef uuid_msgs::UniqueID _id_type; + _id_type id; + typedef rocon_service_pair_msgs::TestiesResponse _response_type; + _response_type response; + + TestiesPairResponse(): + id(), + response() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->id.serialize(outbuffer + offset); + offset += this->response.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->id.deserialize(inbuffer + offset); + offset += this->response.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "rocon_service_pair_msgs/TestiesPairResponse"; }; + const char * getMD5(){ return "05404c9fe275eda57650fdfced8cf402"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rocon_service_pair_msgs/TestiesRequest.h b/source/ros-max-lib/ros_lib/rocon_service_pair_msgs/TestiesRequest.h new file mode 100644 index 0000000000000000000000000000000000000000..058b24d991059a3c14b3687cd12e00f04d917e83 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_service_pair_msgs/TestiesRequest.h @@ -0,0 +1,55 @@ +#ifndef _ROS_rocon_service_pair_msgs_TestiesRequest_h +#define _ROS_rocon_service_pair_msgs_TestiesRequest_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_service_pair_msgs +{ + + class TestiesRequest : public ros::Msg + { + public: + typedef const char* _data_type; + _data_type data; + + TestiesRequest(): + data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_data = strlen(this->data); + varToArr(outbuffer + offset, length_data); + offset += 4; + memcpy(outbuffer + offset, this->data, length_data); + offset += length_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_data; + arrToVar(length_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data-1]=0; + this->data = (char *)(inbuffer + offset-1); + offset += length_data; + return offset; + } + + const char * getType(){ return "rocon_service_pair_msgs/TestiesRequest"; }; + const char * getMD5(){ return "992ce8a1687cec8c8bd883ec73ca41d1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rocon_service_pair_msgs/TestiesResponse.h b/source/ros-max-lib/ros_lib/rocon_service_pair_msgs/TestiesResponse.h new file mode 100644 index 0000000000000000000000000000000000000000..3449e717c709e6359d624af30a96ef9a94b75b9d --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_service_pair_msgs/TestiesResponse.h @@ -0,0 +1,61 @@ +#ifndef _ROS_rocon_service_pair_msgs_TestiesResponse_h +#define _ROS_rocon_service_pair_msgs_TestiesResponse_h + +#include +#include +#include +#include "ros/msg.h" +#include "uuid_msgs/UniqueID.h" + +namespace rocon_service_pair_msgs +{ + + class TestiesResponse : public ros::Msg + { + public: + typedef uuid_msgs::UniqueID _id_type; + _id_type id; + typedef const char* _data_type; + _data_type data; + + TestiesResponse(): + id(), + data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->id.serialize(outbuffer + offset); + uint32_t length_data = strlen(this->data); + varToArr(outbuffer + offset, length_data); + offset += 4; + memcpy(outbuffer + offset, this->data, length_data); + offset += length_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->id.deserialize(inbuffer + offset); + uint32_t length_data; + arrToVar(length_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data-1]=0; + this->data = (char *)(inbuffer + offset-1); + offset += length_data; + return offset; + } + + const char * getType(){ return "rocon_service_pair_msgs/TestiesResponse"; }; + const char * getMD5(){ return "f2e0bb16a22dc66826bb64ac8b44aeb3"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rocon_std_msgs/Connection.h b/source/ros-max-lib/ros_lib/rocon_std_msgs/Connection.h new file mode 100644 index 0000000000000000000000000000000000000000..6b4ac1d7e91dce2526aa548cecb201859a090d64 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_std_msgs/Connection.h @@ -0,0 +1,146 @@ +#ifndef _ROS_rocon_std_msgs_Connection_h +#define _ROS_rocon_std_msgs_Connection_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class Connection : public ros::Msg + { + public: + typedef const char* _type_type; + _type_type type; + typedef const char* _name_type; + _name_type name; + typedef const char* _node_type; + _node_type node; + typedef const char* _type_msg_type; + _type_msg_type type_msg; + typedef const char* _type_info_type; + _type_info_type type_info; + typedef const char* _xmlrpc_uri_type; + _xmlrpc_uri_type xmlrpc_uri; + enum { PUBLISHER = publisher }; + enum { SUBSCRIBER = subscriber }; + enum { SERVICE = service }; + enum { ACTION_CLIENT = action_client }; + enum { ACTION_SERVER = action_server }; + enum { INVALID = invalid }; + + Connection(): + type(""), + name(""), + node(""), + type_msg(""), + type_info(""), + xmlrpc_uri("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_type = strlen(this->type); + varToArr(outbuffer + offset, length_type); + offset += 4; + memcpy(outbuffer + offset, this->type, length_type); + offset += length_type; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_node = strlen(this->node); + varToArr(outbuffer + offset, length_node); + offset += 4; + memcpy(outbuffer + offset, this->node, length_node); + offset += length_node; + uint32_t length_type_msg = strlen(this->type_msg); + varToArr(outbuffer + offset, length_type_msg); + offset += 4; + memcpy(outbuffer + offset, this->type_msg, length_type_msg); + offset += length_type_msg; + uint32_t length_type_info = strlen(this->type_info); + varToArr(outbuffer + offset, length_type_info); + offset += 4; + memcpy(outbuffer + offset, this->type_info, length_type_info); + offset += length_type_info; + uint32_t length_xmlrpc_uri = strlen(this->xmlrpc_uri); + varToArr(outbuffer + offset, length_xmlrpc_uri); + offset += 4; + memcpy(outbuffer + offset, this->xmlrpc_uri, length_xmlrpc_uri); + offset += length_xmlrpc_uri; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_type; + arrToVar(length_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type-1]=0; + this->type = (char *)(inbuffer + offset-1); + offset += length_type; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_node; + arrToVar(length_node, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_node; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_node-1]=0; + this->node = (char *)(inbuffer + offset-1); + offset += length_node; + uint32_t length_type_msg; + arrToVar(length_type_msg, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type_msg; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type_msg-1]=0; + this->type_msg = (char *)(inbuffer + offset-1); + offset += length_type_msg; + uint32_t length_type_info; + arrToVar(length_type_info, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type_info; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type_info-1]=0; + this->type_info = (char *)(inbuffer + offset-1); + offset += length_type_info; + uint32_t length_xmlrpc_uri; + arrToVar(length_xmlrpc_uri, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_xmlrpc_uri; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_xmlrpc_uri-1]=0; + this->xmlrpc_uri = (char *)(inbuffer + offset-1); + offset += length_xmlrpc_uri; + return offset; + } + + const char * getType(){ return "rocon_std_msgs/Connection"; }; + const char * getMD5(){ return "0dee991006513320090e2ee648136101"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rocon_std_msgs/ConnectionCacheSpin.h b/source/ros-max-lib/ros_lib/rocon_std_msgs/ConnectionCacheSpin.h new file mode 100644 index 0000000000000000000000000000000000000000..274a4527eb2f2d9cbbebc068127dec8142016db4 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_std_msgs/ConnectionCacheSpin.h @@ -0,0 +1,86 @@ +#ifndef _ROS_rocon_std_msgs_ConnectionCacheSpin_h +#define _ROS_rocon_std_msgs_ConnectionCacheSpin_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class ConnectionCacheSpin : public ros::Msg + { + public: + typedef float _spin_freq_type; + _spin_freq_type spin_freq; + typedef float _spin_timer_type; + _spin_timer_type spin_timer; + + ConnectionCacheSpin(): + spin_freq(0), + spin_timer(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_spin_freq; + u_spin_freq.real = this->spin_freq; + *(outbuffer + offset + 0) = (u_spin_freq.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_spin_freq.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_spin_freq.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_spin_freq.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->spin_freq); + union { + float real; + uint32_t base; + } u_spin_timer; + u_spin_timer.real = this->spin_timer; + *(outbuffer + offset + 0) = (u_spin_timer.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_spin_timer.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_spin_timer.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_spin_timer.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->spin_timer); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_spin_freq; + u_spin_freq.base = 0; + u_spin_freq.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_spin_freq.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_spin_freq.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_spin_freq.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->spin_freq = u_spin_freq.real; + offset += sizeof(this->spin_freq); + union { + float real; + uint32_t base; + } u_spin_timer; + u_spin_timer.base = 0; + u_spin_timer.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_spin_timer.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_spin_timer.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_spin_timer.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->spin_timer = u_spin_timer.real; + offset += sizeof(this->spin_timer); + return offset; + } + + const char * getType(){ return "rocon_std_msgs/ConnectionCacheSpin"; }; + const char * getMD5(){ return "b6c0b0ddb1d2a2de9918dc5f6d87680a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rocon_std_msgs/ConnectionsDiff.h b/source/ros-max-lib/ros_lib/rocon_std_msgs/ConnectionsDiff.h new file mode 100644 index 0000000000000000000000000000000000000000..f7848ac00914249f5873c06a10b9733fc029ef94 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_std_msgs/ConnectionsDiff.h @@ -0,0 +1,89 @@ +#ifndef _ROS_rocon_std_msgs_ConnectionsDiff_h +#define _ROS_rocon_std_msgs_ConnectionsDiff_h + +#include +#include +#include +#include "ros/msg.h" +#include "rocon_std_msgs/Connection.h" + +namespace rocon_std_msgs +{ + + class ConnectionsDiff : public ros::Msg + { + public: + uint32_t added_length; + typedef rocon_std_msgs::Connection _added_type; + _added_type st_added; + _added_type * added; + uint32_t lost_length; + typedef rocon_std_msgs::Connection _lost_type; + _lost_type st_lost; + _lost_type * lost; + + ConnectionsDiff(): + added_length(0), added(NULL), + lost_length(0), lost(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->added_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->added_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->added_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->added_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->added_length); + for( uint32_t i = 0; i < added_length; i++){ + offset += this->added[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->lost_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->lost_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->lost_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->lost_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->lost_length); + for( uint32_t i = 0; i < lost_length; i++){ + offset += this->lost[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t added_lengthT = ((uint32_t) (*(inbuffer + offset))); + added_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + added_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + added_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->added_length); + if(added_lengthT > added_length) + this->added = (rocon_std_msgs::Connection*)realloc(this->added, added_lengthT * sizeof(rocon_std_msgs::Connection)); + added_length = added_lengthT; + for( uint32_t i = 0; i < added_length; i++){ + offset += this->st_added.deserialize(inbuffer + offset); + memcpy( &(this->added[i]), &(this->st_added), sizeof(rocon_std_msgs::Connection)); + } + uint32_t lost_lengthT = ((uint32_t) (*(inbuffer + offset))); + lost_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + lost_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + lost_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->lost_length); + if(lost_lengthT > lost_length) + this->lost = (rocon_std_msgs::Connection*)realloc(this->lost, lost_lengthT * sizeof(rocon_std_msgs::Connection)); + lost_length = lost_lengthT; + for( uint32_t i = 0; i < lost_length; i++){ + offset += this->st_lost.deserialize(inbuffer + offset); + memcpy( &(this->lost[i]), &(this->st_lost), sizeof(rocon_std_msgs::Connection)); + } + return offset; + } + + const char * getType(){ return "rocon_std_msgs/ConnectionsDiff"; }; + const char * getMD5(){ return "19f9e3bef1153b4bc619ec3d21b94718"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rocon_std_msgs/ConnectionsList.h b/source/ros-max-lib/ros_lib/rocon_std_msgs/ConnectionsList.h new file mode 100644 index 0000000000000000000000000000000000000000..3d595df768ea4a55316afd74c181349bc3a59160 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_std_msgs/ConnectionsList.h @@ -0,0 +1,64 @@ +#ifndef _ROS_rocon_std_msgs_ConnectionsList_h +#define _ROS_rocon_std_msgs_ConnectionsList_h + +#include +#include +#include +#include "ros/msg.h" +#include "rocon_std_msgs/Connection.h" + +namespace rocon_std_msgs +{ + + class ConnectionsList : public ros::Msg + { + public: + uint32_t connections_length; + typedef rocon_std_msgs::Connection _connections_type; + _connections_type st_connections; + _connections_type * connections; + + ConnectionsList(): + connections_length(0), connections(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->connections_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->connections_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->connections_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->connections_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->connections_length); + for( uint32_t i = 0; i < connections_length; i++){ + offset += this->connections[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t connections_lengthT = ((uint32_t) (*(inbuffer + offset))); + connections_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + connections_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + connections_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->connections_length); + if(connections_lengthT > connections_length) + this->connections = (rocon_std_msgs::Connection*)realloc(this->connections, connections_lengthT * sizeof(rocon_std_msgs::Connection)); + connections_length = connections_lengthT; + for( uint32_t i = 0; i < connections_length; i++){ + offset += this->st_connections.deserialize(inbuffer + offset); + memcpy( &(this->connections[i]), &(this->st_connections), sizeof(rocon_std_msgs::Connection)); + } + return offset; + } + + const char * getType(){ return "rocon_std_msgs/ConnectionsList"; }; + const char * getMD5(){ return "672d6ad69b684884f8fb6f4acedbd39f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rocon_std_msgs/EmptyString.h b/source/ros-max-lib/ros_lib/rocon_std_msgs/EmptyString.h new file mode 100644 index 0000000000000000000000000000000000000000..a6d873352777b5e88765f613913e516144587d6b --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_std_msgs/EmptyString.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_EmptyString_h +#define _ROS_SERVICE_EmptyString_h +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + +static const char EMPTYSTRING[] = "rocon_std_msgs/EmptyString"; + + class EmptyStringRequest : public ros::Msg + { + public: + + EmptyStringRequest() + { + } + + 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 EMPTYSTRING; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class EmptyStringResponse : public ros::Msg + { + public: + typedef const char* _data_type; + _data_type data; + + EmptyStringResponse(): + data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_data = strlen(this->data); + varToArr(outbuffer + offset, length_data); + offset += 4; + memcpy(outbuffer + offset, this->data, length_data); + offset += length_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_data; + arrToVar(length_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data-1]=0; + this->data = (char *)(inbuffer + offset-1); + offset += length_data; + return offset; + } + + const char * getType(){ return EMPTYSTRING; }; + const char * getMD5(){ return "992ce8a1687cec8c8bd883ec73ca41d1"; }; + + }; + + class EmptyString { + public: + typedef EmptyStringRequest Request; + typedef EmptyStringResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/rocon_std_msgs/Float32Stamped.h b/source/ros-max-lib/ros_lib/rocon_std_msgs/Float32Stamped.h new file mode 100644 index 0000000000000000000000000000000000000000..fd8f5ffc8fc57fc6a6559993596960bcafd2a084 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_std_msgs/Float32Stamped.h @@ -0,0 +1,68 @@ +#ifndef _ROS_rocon_std_msgs_Float32Stamped_h +#define _ROS_rocon_std_msgs_Float32Stamped_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace rocon_std_msgs +{ + + class Float32Stamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef float _data_type; + _data_type data; + + Float32Stamped(): + header(), + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + 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); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + 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); + return offset; + } + + const char * getType(){ return "rocon_std_msgs/Float32Stamped"; }; + const char * getMD5(){ return "ef848af8cf12f6df11682cc76fba477b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rocon_std_msgs/Icon.h b/source/ros-max-lib/ros_lib/rocon_std_msgs/Icon.h new file mode 100644 index 0000000000000000000000000000000000000000..b30516e81ba691b26d6ce651df72041c98720cc7 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_std_msgs/Icon.h @@ -0,0 +1,99 @@ +#ifndef _ROS_rocon_std_msgs_Icon_h +#define _ROS_rocon_std_msgs_Icon_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class Icon : public ros::Msg + { + public: + typedef const char* _resource_name_type; + _resource_name_type resource_name; + typedef const char* _format_type; + _format_type format; + uint32_t data_length; + typedef uint8_t _data_type; + _data_type st_data; + _data_type * data; + + Icon(): + resource_name(""), + format(""), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_resource_name = strlen(this->resource_name); + varToArr(outbuffer + offset, length_resource_name); + offset += 4; + memcpy(outbuffer + offset, this->resource_name, length_resource_name); + offset += length_resource_name; + uint32_t length_format = strlen(this->format); + varToArr(outbuffer + offset, length_format); + offset += 4; + memcpy(outbuffer + offset, this->format, length_format); + offset += length_format; + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_resource_name; + arrToVar(length_resource_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_resource_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_resource_name-1]=0; + this->resource_name = (char *)(inbuffer + offset-1); + offset += length_resource_name; + uint32_t length_format; + arrToVar(length_format, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_format; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_format-1]=0; + this->format = (char *)(inbuffer + offset-1); + offset += length_format; + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint8_t*)realloc(this->data, data_lengthT * sizeof(uint8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint8_t)); + } + return offset; + } + + const char * getType(){ return "rocon_std_msgs/Icon"; }; + const char * getMD5(){ return "2ddacfedd31b6da3f723794afbd3b9de"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rocon_std_msgs/KeyValue.h b/source/ros-max-lib/ros_lib/rocon_std_msgs/KeyValue.h new file mode 100644 index 0000000000000000000000000000000000000000..980b1b5f3b837bca96ac40900f80dfa73781ee5d --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_std_msgs/KeyValue.h @@ -0,0 +1,72 @@ +#ifndef _ROS_rocon_std_msgs_KeyValue_h +#define _ROS_rocon_std_msgs_KeyValue_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class KeyValue : public ros::Msg + { + public: + typedef const char* _key_type; + _key_type key; + typedef const char* _value_type; + _value_type value; + + KeyValue(): + key(""), + value("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_key = strlen(this->key); + varToArr(outbuffer + offset, length_key); + offset += 4; + memcpy(outbuffer + offset, this->key, length_key); + offset += length_key; + uint32_t length_value = strlen(this->value); + varToArr(outbuffer + offset, length_value); + offset += 4; + memcpy(outbuffer + offset, this->value, length_value); + offset += length_value; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_key; + arrToVar(length_key, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_key; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_key-1]=0; + this->key = (char *)(inbuffer + offset-1); + offset += length_key; + uint32_t length_value; + arrToVar(length_value, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_value; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_value-1]=0; + this->value = (char *)(inbuffer + offset-1); + offset += length_value; + return offset; + } + + const char * getType(){ return "rocon_std_msgs/KeyValue"; }; + const char * getMD5(){ return "cf57fdc6617a881a88c16e768132149c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rocon_std_msgs/MasterInfo.h b/source/ros-max-lib/ros_lib/rocon_std_msgs/MasterInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..7cf4d4a95c41e39967d583b441ae44ef67c76785 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_std_msgs/MasterInfo.h @@ -0,0 +1,112 @@ +#ifndef _ROS_rocon_std_msgs_MasterInfo_h +#define _ROS_rocon_std_msgs_MasterInfo_h + +#include +#include +#include +#include "ros/msg.h" +#include "rocon_std_msgs/Icon.h" + +namespace rocon_std_msgs +{ + + class MasterInfo : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _rocon_uri_type; + _rocon_uri_type rocon_uri; + typedef const char* _description_type; + _description_type description; + typedef rocon_std_msgs::Icon _icon_type; + _icon_type icon; + typedef const char* _version_type; + _version_type version; + + MasterInfo(): + name(""), + rocon_uri(""), + description(""), + icon(), + version("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_rocon_uri = strlen(this->rocon_uri); + varToArr(outbuffer + offset, length_rocon_uri); + offset += 4; + memcpy(outbuffer + offset, this->rocon_uri, length_rocon_uri); + offset += length_rocon_uri; + uint32_t length_description = strlen(this->description); + varToArr(outbuffer + offset, length_description); + offset += 4; + memcpy(outbuffer + offset, this->description, length_description); + offset += length_description; + offset += this->icon.serialize(outbuffer + offset); + uint32_t length_version = strlen(this->version); + varToArr(outbuffer + offset, length_version); + offset += 4; + memcpy(outbuffer + offset, this->version, length_version); + offset += length_version; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_rocon_uri; + arrToVar(length_rocon_uri, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_rocon_uri; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_rocon_uri-1]=0; + this->rocon_uri = (char *)(inbuffer + offset-1); + offset += length_rocon_uri; + uint32_t length_description; + arrToVar(length_description, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_description; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_description-1]=0; + this->description = (char *)(inbuffer + offset-1); + offset += length_description; + offset += this->icon.deserialize(inbuffer + offset); + uint32_t length_version; + arrToVar(length_version, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_version; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_version-1]=0; + this->version = (char *)(inbuffer + offset-1); + offset += length_version; + return offset; + } + + const char * getType(){ return "rocon_std_msgs/MasterInfo"; }; + const char * getMD5(){ return "e85613ae2e3faade6b77d94b4e0bf4bf"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rocon_std_msgs/Remapping.h b/source/ros-max-lib/ros_lib/rocon_std_msgs/Remapping.h new file mode 100644 index 0000000000000000000000000000000000000000..5e94955524da6b93c5013fc59393ef62dd1e128a --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_std_msgs/Remapping.h @@ -0,0 +1,72 @@ +#ifndef _ROS_rocon_std_msgs_Remapping_h +#define _ROS_rocon_std_msgs_Remapping_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class Remapping : public ros::Msg + { + public: + typedef const char* _remap_from_type; + _remap_from_type remap_from; + typedef const char* _remap_to_type; + _remap_to_type remap_to; + + Remapping(): + remap_from(""), + remap_to("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_remap_from = strlen(this->remap_from); + varToArr(outbuffer + offset, length_remap_from); + offset += 4; + memcpy(outbuffer + offset, this->remap_from, length_remap_from); + offset += length_remap_from; + uint32_t length_remap_to = strlen(this->remap_to); + varToArr(outbuffer + offset, length_remap_to); + offset += 4; + memcpy(outbuffer + offset, this->remap_to, length_remap_to); + offset += length_remap_to; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_remap_from; + arrToVar(length_remap_from, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_remap_from; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_remap_from-1]=0; + this->remap_from = (char *)(inbuffer + offset-1); + offset += length_remap_from; + uint32_t length_remap_to; + arrToVar(length_remap_to, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_remap_to; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_remap_to-1]=0; + this->remap_to = (char *)(inbuffer + offset-1); + offset += length_remap_to; + return offset; + } + + const char * getType(){ return "rocon_std_msgs/Remapping"; }; + const char * getMD5(){ return "26f16c667d483280bc5d040bf2c0cd8d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rocon_std_msgs/StringArray.h b/source/ros-max-lib/ros_lib/rocon_std_msgs/StringArray.h new file mode 100644 index 0000000000000000000000000000000000000000..9beb93ab99b69fb28a07aad67e0974a23813ea4f --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_std_msgs/StringArray.h @@ -0,0 +1,75 @@ +#ifndef _ROS_rocon_std_msgs_StringArray_h +#define _ROS_rocon_std_msgs_StringArray_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class StringArray : public ros::Msg + { + public: + uint32_t strings_length; + typedef char* _strings_type; + _strings_type st_strings; + _strings_type * strings; + + StringArray(): + strings_length(0), strings(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->strings_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->strings_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->strings_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->strings_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->strings_length); + for( uint32_t i = 0; i < strings_length; i++){ + uint32_t length_stringsi = strlen(this->strings[i]); + varToArr(outbuffer + offset, length_stringsi); + offset += 4; + memcpy(outbuffer + offset, this->strings[i], length_stringsi); + offset += length_stringsi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t strings_lengthT = ((uint32_t) (*(inbuffer + offset))); + strings_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + strings_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + strings_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->strings_length); + if(strings_lengthT > strings_length) + this->strings = (char**)realloc(this->strings, strings_lengthT * sizeof(char*)); + strings_length = strings_lengthT; + for( uint32_t i = 0; i < strings_length; i++){ + uint32_t length_st_strings; + arrToVar(length_st_strings, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_strings; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_strings-1]=0; + this->st_strings = (char *)(inbuffer + offset-1); + offset += length_st_strings; + memcpy( &(this->strings[i]), &(this->st_strings), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return "rocon_std_msgs/StringArray"; }; + const char * getMD5(){ return "51789d20146e565223d0963361aecda1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rocon_std_msgs/Strings.h b/source/ros-max-lib/ros_lib/rocon_std_msgs/Strings.h new file mode 100644 index 0000000000000000000000000000000000000000..71f98091922e3e9728c845555a2df8b2dfac688d --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_std_msgs/Strings.h @@ -0,0 +1,83 @@ +#ifndef _ROS_rocon_std_msgs_Strings_h +#define _ROS_rocon_std_msgs_Strings_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class Strings : public ros::Msg + { + public: + enum { ROCON_VERSION = acdc }; + enum { URI_WILDCARD = * }; + enum { HW_PC = pc }; + enum { HW_TURTLEBOT2 = turtlebot2 }; + enum { HW_PR2 = pr2 }; + enum { HW_WAITERBOT = waiterbot }; + enum { HW_ROBOT_OTHER = robot_other }; + enum { HW_GALAXY = galaxy }; + enum { HW_MEGA = mega }; + enum { HW_NOTE3 = note3 }; + enum { HW_PHONE_OTHER = phone_other }; + enum { HW_XOOM = xoom }; + enum { HW_NOTE10 = note10 }; + enum { HW_TABLET_OTHER = tablet_other }; + enum { APPLICATION_FRAMEWORK_OTHER = application_framework_other }; + enum { APPLICATION_FRAMEWORK_OPROS = opros }; + enum { APPLICATION_FRAMEWORK_GROOVY = groovy }; + enum { APPLICATION_FRAMEWORK_HYDRO = hydro }; + enum { APPLICATION_FRAMEWORK_INDIGO = indigo }; + enum { APPLICATION_FRAMEWORK_ROS_OTHER = ros_other }; + enum { OS_OSX = osx }; + enum { OS_FREEBSD = freebsd }; + enum { OS_WINXP = winxp }; + enum { OS_WINDOWS7 = windows7 }; + enum { OS_ARCH = arch }; + enum { OS_DEBIAN = debian }; + enum { OS_FEDORA = fedora }; + enum { OS_GENTOO = gentoo }; + enum { OS_PRECISE = precise }; + enum { OS_QUANTAL = quantal }; + enum { OS_RARING = raring }; + enum { OS_SAUCY = saucy }; + enum { OS_HONEYCOMB = honeycomb }; + enum { OS_ICE_CREAM_SANDWICH = ice_cream_sandwich }; + enum { OS_JELLYBEAN = jellybean }; + enum { OS_KITKAT = kitkat }; + enum { OS_CHROME = chrome }; + enum { OS_FIREFOX = firefox }; + enum { OS_INTERNET_EXPLORER = internet_explorer }; + enum { OS_SAFARI = safari }; + enum { OS_OPERA = opera }; + enum { TAG_SERVICE = concert_service }; + enum { TAG_RAPP = rocon_app }; + enum { TAG_GAZEBO_ROBOT_TYPE = concert_gazebo }; + enum { TAG_SOFTWARE = software_farm }; + + Strings() + { + } + + 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 "rocon_std_msgs/Strings"; }; + const char * getMD5(){ return "58fa1e54e6c0338b3faebae82a13e892"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rocon_std_msgs/StringsPair.h b/source/ros-max-lib/ros_lib/rocon_std_msgs/StringsPair.h new file mode 100644 index 0000000000000000000000000000000000000000..1a8071601845057823ea959a48f1fb8e50210551 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_std_msgs/StringsPair.h @@ -0,0 +1,50 @@ +#ifndef _ROS_rocon_std_msgs_StringsPair_h +#define _ROS_rocon_std_msgs_StringsPair_h + +#include +#include +#include +#include "ros/msg.h" +#include "rocon_std_msgs/StringsPairRequest.h" +#include "rocon_std_msgs/StringsPairResponse.h" + +namespace rocon_std_msgs +{ + + class StringsPair : public ros::Msg + { + public: + typedef rocon_std_msgs::StringsPairRequest _pair_request_type; + _pair_request_type pair_request; + typedef rocon_std_msgs::StringsPairResponse _pair_response_type; + _pair_response_type pair_response; + + StringsPair(): + pair_request(), + pair_response() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->pair_request.serialize(outbuffer + offset); + offset += this->pair_response.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->pair_request.deserialize(inbuffer + offset); + offset += this->pair_response.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "rocon_std_msgs/StringsPair"; }; + const char * getMD5(){ return "d41c9071bd514be249c417a13ec83e65"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rocon_std_msgs/StringsPairRequest.h b/source/ros-max-lib/ros_lib/rocon_std_msgs/StringsPairRequest.h new file mode 100644 index 0000000000000000000000000000000000000000..ba892510b0fbda1c011ddd6f9b12b6319d590f6b --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_std_msgs/StringsPairRequest.h @@ -0,0 +1,50 @@ +#ifndef _ROS_rocon_std_msgs_StringsPairRequest_h +#define _ROS_rocon_std_msgs_StringsPairRequest_h + +#include +#include +#include +#include "ros/msg.h" +#include "uuid_msgs/UniqueID.h" +#include "rocon_std_msgs/StringsRequest.h" + +namespace rocon_std_msgs +{ + + class StringsPairRequest : public ros::Msg + { + public: + typedef uuid_msgs::UniqueID _id_type; + _id_type id; + typedef rocon_std_msgs::StringsRequest _request_type; + _request_type request; + + StringsPairRequest(): + id(), + request() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->id.serialize(outbuffer + offset); + offset += this->request.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->id.deserialize(inbuffer + offset); + offset += this->request.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "rocon_std_msgs/StringsPairRequest"; }; + const char * getMD5(){ return "71ec95e384ce52aa32491f3b69a62027"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rocon_std_msgs/StringsPairResponse.h b/source/ros-max-lib/ros_lib/rocon_std_msgs/StringsPairResponse.h new file mode 100644 index 0000000000000000000000000000000000000000..65e29cd1f446d0014ec2d65af22b01e8a4eb89d9 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_std_msgs/StringsPairResponse.h @@ -0,0 +1,50 @@ +#ifndef _ROS_rocon_std_msgs_StringsPairResponse_h +#define _ROS_rocon_std_msgs_StringsPairResponse_h + +#include +#include +#include +#include "ros/msg.h" +#include "uuid_msgs/UniqueID.h" +#include "rocon_std_msgs/StringsResponse.h" + +namespace rocon_std_msgs +{ + + class StringsPairResponse : public ros::Msg + { + public: + typedef uuid_msgs::UniqueID _id_type; + _id_type id; + typedef rocon_std_msgs::StringsResponse _response_type; + _response_type response; + + StringsPairResponse(): + id(), + response() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->id.serialize(outbuffer + offset); + offset += this->response.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->id.deserialize(inbuffer + offset); + offset += this->response.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "rocon_std_msgs/StringsPairResponse"; }; + const char * getMD5(){ return "7b20492548347a7692aa8c5680af8d1b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rocon_std_msgs/StringsRequest.h b/source/ros-max-lib/ros_lib/rocon_std_msgs/StringsRequest.h new file mode 100644 index 0000000000000000000000000000000000000000..ce30bde171dc96fe5b9c46383ff4ef5eee17a5c8 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_std_msgs/StringsRequest.h @@ -0,0 +1,55 @@ +#ifndef _ROS_rocon_std_msgs_StringsRequest_h +#define _ROS_rocon_std_msgs_StringsRequest_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class StringsRequest : public ros::Msg + { + public: + typedef const char* _data_type; + _data_type data; + + StringsRequest(): + data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_data = strlen(this->data); + varToArr(outbuffer + offset, length_data); + offset += 4; + memcpy(outbuffer + offset, this->data, length_data); + offset += length_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_data; + arrToVar(length_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data-1]=0; + this->data = (char *)(inbuffer + offset-1); + offset += length_data; + return offset; + } + + const char * getType(){ return "rocon_std_msgs/StringsRequest"; }; + const char * getMD5(){ return "992ce8a1687cec8c8bd883ec73ca41d1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rocon_std_msgs/StringsResponse.h b/source/ros-max-lib/ros_lib/rocon_std_msgs/StringsResponse.h new file mode 100644 index 0000000000000000000000000000000000000000..31a9bec25e0ce55de55fa1e5081890e85aa511b4 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rocon_std_msgs/StringsResponse.h @@ -0,0 +1,55 @@ +#ifndef _ROS_rocon_std_msgs_StringsResponse_h +#define _ROS_rocon_std_msgs_StringsResponse_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rocon_std_msgs +{ + + class StringsResponse : public ros::Msg + { + public: + typedef const char* _data_type; + _data_type data; + + StringsResponse(): + data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_data = strlen(this->data); + varToArr(outbuffer + offset, length_data); + offset += 4; + memcpy(outbuffer + offset, this->data, length_data); + offset += length_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_data; + arrToVar(length_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data-1]=0; + this->data = (char *)(inbuffer + offset-1); + offset += length_data; + return offset; + } + + const char * getType(){ return "rocon_std_msgs/StringsResponse"; }; + const char * getMD5(){ return "992ce8a1687cec8c8bd883ec73ca41d1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/ros.h b/source/ros-max-lib/ros_lib/ros.h new file mode 100644 index 0000000000000000000000000000000000000000..a81550b73005795f7d244d16991c0ecbdce1a4ed --- /dev/null +++ b/source/ros-max-lib/ros_lib/ros.h @@ -0,0 +1,52 @@ +/* + * 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_H_ +#define _ROS_H_ + +#ifndef BUILD_LIBROSSERIALEMBEDDEDLINUX +#include "embedded_linux_comms.c" +#include "duration.cpp" +#include "time.cpp" +#endif + +#include "ros/node_handle.h" +#include "embedded_linux_hardware.h" + +namespace ros +{ +typedef NodeHandle_ NodeHandle; +} + +#endif diff --git a/source/ros-max-lib/ros_lib/ros/duration.h b/source/ros-max-lib/ros_lib/ros/duration.h new file mode 100644 index 0000000000000000000000000000000000000000..5ec6d9003024b5e0077bebb1f61d80933f34862d --- /dev/null +++ b/source/ros-max-lib/ros_lib/ros/duration.h @@ -0,0 +1,75 @@ +/* + * 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_DURATION_H_ +#define _ROS_DURATION_H_ + +#include +#include + +namespace ros +{ + +void normalizeSecNSecSigned(int32_t& sec, int32_t& nsec); + +class Duration +{ +public: + int32_t sec, nsec; + + Duration() : sec(0), nsec(0) {} + Duration(int32_t _sec, int32_t _nsec) : sec(_sec), nsec(_nsec) + { + normalizeSecNSecSigned(sec, nsec); + } + + double toSec() const + { + return (double)sec + 1e-9 * (double)nsec; + }; + void fromSec(double t) + { + sec = (uint32_t) floor(t); + nsec = (uint32_t) round((t - sec) * 1e9); + }; + + Duration& operator+=(const Duration &rhs); + Duration& operator-=(const Duration &rhs); + Duration& operator*=(double scale); +}; + +} + +#endif + diff --git a/source/ros-max-lib/ros_lib/ros/msg.h b/source/ros-max-lib/ros_lib/ros/msg.h new file mode 100644 index 0000000000000000000000000000000000000000..aea0f6f0b506518ca9d2cffb94af57b84104e9a1 --- /dev/null +++ b/source/ros-max-lib/ros_lib/ros/msg.h @@ -0,0 +1,148 @@ +/* + * 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_MSG_H_ +#define _ROS_MSG_H_ + +#include +#include + +namespace ros +{ + +/* Base Message Type */ +class Msg +{ +public: + virtual int serialize(unsigned char *outbuffer) const = 0; + virtual int deserialize(unsigned char *data) = 0; + virtual const char * getType() = 0; + virtual const char * getMD5() = 0; + + /** + * @brief This tricky function handles promoting a 32bit float to a 64bit + * double, so that AVR can publish messages containing float64 + * fields, despite AVV having no native support for double. + * + * @param[out] outbuffer pointer for buffer to serialize to. + * @param[in] f value to serialize. + * + * @return number of bytes to advance the buffer pointer. + * + */ + static int serializeAvrFloat64(unsigned char* outbuffer, const float f) + { + const int32_t* val = (int32_t*) &f; + int32_t exp = ((*val >> 23) & 255); + if (exp != 0) + { + exp += 1023 - 127; + } + + int32_t sig = *val; + *(outbuffer++) = 0; + *(outbuffer++) = 0; + *(outbuffer++) = 0; + *(outbuffer++) = (sig << 5) & 0xff; + *(outbuffer++) = (sig >> 3) & 0xff; + *(outbuffer++) = (sig >> 11) & 0xff; + *(outbuffer++) = ((exp << 4) & 0xF0) | ((sig >> 19) & 0x0F); + *(outbuffer++) = (exp >> 4) & 0x7F; + + // Mark negative bit as necessary. + if (f < 0) + { + *(outbuffer - 1) |= 0x80; + } + + return 8; + } + + /** + * @brief This tricky function handles demoting a 64bit double to a + * 32bit float, so that AVR can understand messages containing + * float64 fields, despite AVR having no native support for double. + * + * @param[in] inbuffer pointer for buffer to deserialize from. + * @param[out] f pointer to place the deserialized value in. + * + * @return number of bytes to advance the buffer pointer. + */ + static int deserializeAvrFloat64(const unsigned char* inbuffer, float* f) + { + uint32_t* val = (uint32_t*)f; + inbuffer += 3; + + // Copy truncated mantissa. + *val = ((uint32_t)(*(inbuffer++)) >> 5 & 0x07); + *val |= ((uint32_t)(*(inbuffer++)) & 0xff) << 3; + *val |= ((uint32_t)(*(inbuffer++)) & 0xff) << 11; + *val |= ((uint32_t)(*inbuffer) & 0x0f) << 19; + + // Copy truncated exponent. + uint32_t exp = ((uint32_t)(*(inbuffer++)) & 0xf0) >> 4; + exp |= ((uint32_t)(*inbuffer) & 0x7f) << 4; + if (exp != 0) + { + *val |= ((exp) - 1023 + 127) << 23; + } + + // Copy negative sign. + *val |= ((uint32_t)(*(inbuffer++)) & 0x80) << 24; + + return 8; + } + + // Copy data from variable into a byte array + template + static void varToArr(A arr, const V var) + { + for (size_t i = 0; i < sizeof(V); i++) + arr[i] = (var >> (8 * i)); + } + + // Copy data from a byte array into variable + template + static void arrToVar(V& var, const A arr) + { + var = 0; + for (size_t i = 0; i < sizeof(V); i++) + var |= (arr[i] << (8 * i)); + } + +}; + +} // namespace ros + +#endif diff --git a/source/ros-max-lib/ros_lib/ros/node_handle.h b/source/ros-max-lib/ros_lib/ros/node_handle.h new file mode 100644 index 0000000000000000000000000000000000000000..9321ed75d4e5f1e93858812ba22e5b000c8dbdb6 --- /dev/null +++ b/source/ros-max-lib/ros_lib/ros/node_handle.h @@ -0,0 +1,668 @@ +/* + * 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_NODE_HANDLE_H_ +#define ROS_NODE_HANDLE_H_ + +#include + +#include "../std_msgs/Time.h" +#include "../rosserial_msgs/TopicInfo.h" +#include "../rosserial_msgs/Log.h" +#include "../rosserial_msgs/RequestParam.h" + +#include "../ros/msg.h" + +namespace ros +{ + +class NodeHandleBase_ +{ +public: + virtual int publish(int id, const Msg* msg) = 0; + virtual int spinOnce() = 0; + virtual bool connected() = 0; +}; +} + +#include "../ros/publisher.h" +#include "../ros/subscriber.h" +#include "../ros/service_server.h" +#include "../ros/service_client.h" + +namespace ros +{ + +const int SPIN_OK = 0; +const int SPIN_ERR = -1; +const int SPIN_TIMEOUT = -2; + +const uint8_t SYNC_SECONDS = 5; +const uint8_t MODE_FIRST_FF = 0; +/* + * The second sync byte is a protocol version. It's value is 0xff for the first + * version of the rosserial protocol (used up to hydro), 0xfe for the second version + * (introduced in hydro), 0xfd for the next, and so on. Its purpose is to enable + * detection of mismatched protocol versions (e.g. hydro rosserial_python with groovy + * rosserial_arduino. It must be changed in both this file and in + * rosserial_python/src/rosserial_python/SerialClient.py + */ +const uint8_t MODE_PROTOCOL_VER = 1; +const uint8_t PROTOCOL_VER1 = 0xff; // through groovy +const uint8_t PROTOCOL_VER2 = 0xfe; // in hydro +const uint8_t PROTOCOL_VER = PROTOCOL_VER2; +const uint8_t MODE_SIZE_L = 2; +const uint8_t MODE_SIZE_H = 3; +const uint8_t MODE_SIZE_CHECKSUM = 4; // checksum for msg size received from size L and H +const uint8_t MODE_TOPIC_L = 5; // waiting for topic id +const uint8_t MODE_TOPIC_H = 6; +const uint8_t MODE_MESSAGE = 7; +const uint8_t MODE_MSG_CHECKSUM = 8; // checksum for msg and topic id + + +const uint8_t SERIAL_MSG_TIMEOUT = 20; // 20 milliseconds to recieve all of message data + +using rosserial_msgs::TopicInfo; + +/* Node Handle */ +template +class NodeHandle_ : public NodeHandleBase_ +{ +protected: + Hardware hardware_; + + /* time used for syncing */ + uint32_t rt_time; + + /* used for computing current time */ + uint32_t sec_offset, nsec_offset; + + /* Spinonce maximum work timeout */ + uint32_t spin_timeout_; + + uint8_t message_in[INPUT_SIZE]; + uint8_t message_out[OUTPUT_SIZE]; + + Publisher * publishers[MAX_PUBLISHERS]; + Subscriber_ * subscribers[MAX_SUBSCRIBERS]; + + /* + * Setup Functions + */ +public: + NodeHandle_() : configured_(false) + { + + for (unsigned int i = 0; i < MAX_PUBLISHERS; i++) + publishers[i] = 0; + + for (unsigned int i = 0; i < MAX_SUBSCRIBERS; i++) + subscribers[i] = 0; + + for (unsigned int i = 0; i < INPUT_SIZE; i++) + message_in[i] = 0; + + for (unsigned int i = 0; i < OUTPUT_SIZE; i++) + message_out[i] = 0; + + req_param_resp.ints_length = 0; + req_param_resp.ints = NULL; + req_param_resp.floats_length = 0; + req_param_resp.floats = NULL; + req_param_resp.ints_length = 0; + req_param_resp.ints = NULL; + + spin_timeout_ = 0; + } + + Hardware* getHardware() + { + return &hardware_; + } + + /* Start serial, initialize buffers */ + void initNode() + { + hardware_.init(); + mode_ = 0; + bytes_ = 0; + index_ = 0; + topic_ = 0; + }; + + /* Start a named port, which may be network server IP, initialize buffers */ + void initNode(char *portName) + { + hardware_.init(portName); + mode_ = 0; + bytes_ = 0; + index_ = 0; + topic_ = 0; + }; + + /** + * @brief Sets the maximum time in millisconds that spinOnce() can work. + * This will not effect the processing of the buffer, as spinOnce processes + * one byte at a time. It simply sets the maximum time that one call can + * process for. You can choose to clear the buffer if that is beneficial if + * SPIN_TIMEOUT is returned from spinOnce(). + * @param timeout The timeout in milliseconds that spinOnce will function. + */ + void setSpinTimeout(const uint32_t& timeout) + { + spin_timeout_ = timeout; + } + +protected: + //State machine variables for spinOnce + int mode_; + int bytes_; + int topic_; + int index_; + int checksum_; + + bool configured_; + + /* used for syncing the time */ + uint32_t last_sync_time; + uint32_t last_sync_receive_time; + uint32_t last_msg_timeout_time; + +public: + /* This function goes in your loop() function, it handles + * serial input and callbacks for subscribers. + */ + + + virtual int spinOnce() + { + /* restart if timed out */ + uint32_t c_time = hardware_.time(); + if ((c_time - last_sync_receive_time) > (SYNC_SECONDS * 2200)) + { + configured_ = false; + } + + /* reset if message has timed out */ + if (mode_ != MODE_FIRST_FF) + { + if (c_time > last_msg_timeout_time) + { + mode_ = MODE_FIRST_FF; + } + } + + /* while available buffer, read data */ + while (true) + { + // If a timeout has been specified, check how long spinOnce has been running. + if (spin_timeout_ > 0) + { + // If the maximum processing timeout has been exceeded, exit with error. + // The next spinOnce can continue where it left off, or optionally + // based on the application in use, the hardware buffer could be flushed + // and start fresh. + if ((hardware_.time() - c_time) > spin_timeout_) + { + // Exit the spin, processing timeout exceeded. + return SPIN_TIMEOUT; + } + } + int data = hardware_.read(); + if (data < 0) + break; + checksum_ += data; + if (mode_ == MODE_MESSAGE) /* message data being recieved */ + { + message_in[index_++] = data; + bytes_--; + if (bytes_ == 0) /* is message complete? if so, checksum */ + mode_ = MODE_MSG_CHECKSUM; + } + else if (mode_ == MODE_FIRST_FF) + { + if (data == 0xff) + { + mode_++; + last_msg_timeout_time = c_time + SERIAL_MSG_TIMEOUT; + } + else if (hardware_.time() - c_time > (SYNC_SECONDS * 1000)) + { + /* We have been stuck in spinOnce too long, return error */ + configured_ = false; + return SPIN_TIMEOUT; + } + } + else if (mode_ == MODE_PROTOCOL_VER) + { + if (data == PROTOCOL_VER) + { + mode_++; + } + else + { + mode_ = MODE_FIRST_FF; + if (configured_ == false) + requestSyncTime(); /* send a msg back showing our protocol version */ + } + } + else if (mode_ == MODE_SIZE_L) /* bottom half of message size */ + { + bytes_ = data; + index_ = 0; + mode_++; + checksum_ = data; /* first byte for calculating size checksum */ + } + else if (mode_ == MODE_SIZE_H) /* top half of message size */ + { + bytes_ += data << 8; + mode_++; + } + else if (mode_ == MODE_SIZE_CHECKSUM) + { + if ((checksum_ % 256) == 255) + mode_++; + else + mode_ = MODE_FIRST_FF; /* Abandon the frame if the msg len is wrong */ + } + else if (mode_ == MODE_TOPIC_L) /* bottom half of topic id */ + { + topic_ = data; + mode_++; + checksum_ = data; /* first byte included in checksum */ + } + else if (mode_ == MODE_TOPIC_H) /* top half of topic id */ + { + topic_ += data << 8; + mode_ = MODE_MESSAGE; + if (bytes_ == 0) + mode_ = MODE_MSG_CHECKSUM; + } + else if (mode_ == MODE_MSG_CHECKSUM) /* do checksum */ + { + mode_ = MODE_FIRST_FF; + if ((checksum_ % 256) == 255) + { + if (topic_ == TopicInfo::ID_PUBLISHER) + { + requestSyncTime(); + negotiateTopics(); + last_sync_time = c_time; + last_sync_receive_time = c_time; + return SPIN_ERR; + } + else if (topic_ == TopicInfo::ID_TIME) + { + syncTime(message_in); + } + else if (topic_ == TopicInfo::ID_PARAMETER_REQUEST) + { + req_param_resp.deserialize(message_in); + param_recieved = true; + } + else if (topic_ == TopicInfo::ID_TX_STOP) + { + configured_ = false; + } + else + { + if (subscribers[topic_ - 100]) + subscribers[topic_ - 100]->callback(message_in); + } + } + } + } + + /* occasionally sync time */ + if (configured_ && ((c_time - last_sync_time) > (SYNC_SECONDS * 500))) + { + requestSyncTime(); + last_sync_time = c_time; + } + + return SPIN_OK; + } + + + /* Are we connected to the PC? */ + virtual bool connected() + { + return configured_; + }; + + /******************************************************************** + * Time functions + */ + + void requestSyncTime() + { + std_msgs::Time t; + publish(TopicInfo::ID_TIME, &t); + rt_time = hardware_.time(); + } + + void syncTime(uint8_t * data) + { + std_msgs::Time t; + uint32_t offset = hardware_.time() - rt_time; + + t.deserialize(data); + t.data.sec += offset / 1000; + t.data.nsec += (offset % 1000) * 1000000UL; + + this->setNow(t.data); + last_sync_receive_time = hardware_.time(); + } + + Time now() + { + uint32_t ms = hardware_.time(); + Time current_time; + current_time.sec = ms / 1000 + sec_offset; + current_time.nsec = (ms % 1000) * 1000000UL + nsec_offset; + normalizeSecNSec(current_time.sec, current_time.nsec); + return current_time; + } + + void setNow(Time & new_now) + { + uint32_t ms = hardware_.time(); + sec_offset = new_now.sec - ms / 1000 - 1; + nsec_offset = new_now.nsec - (ms % 1000) * 1000000UL + 1000000000UL; + normalizeSecNSec(sec_offset, nsec_offset); + } + + /******************************************************************** + * Topic Management + */ + + /* Register a new publisher */ + bool advertise(Publisher & p) + { + for (int i = 0; i < MAX_PUBLISHERS; i++) + { + if (publishers[i] == 0) // empty slot + { + publishers[i] = &p; + p.id_ = i + 100 + MAX_SUBSCRIBERS; + p.nh_ = this; + return true; + } + } + return false; + } + + /* Register a new subscriber */ + template + bool subscribe(SubscriberT& s) + { + for (int i = 0; i < MAX_SUBSCRIBERS; i++) + { + if (subscribers[i] == 0) // empty slot + { + subscribers[i] = static_cast(&s); + s.id_ = i + 100; + return true; + } + } + return false; + } + + /* Register a new Service Server */ + template + bool advertiseService(ServiceServer& srv) + { + bool v = advertise(srv.pub); + for (int i = 0; i < MAX_SUBSCRIBERS; i++) + { + if (subscribers[i] == 0) // empty slot + { + subscribers[i] = static_cast(&srv); + srv.id_ = i + 100; + return v; + } + } + return false; + } + + /* Register a new Service Client */ + template + bool serviceClient(ServiceClient& srv) + { + bool v = advertise(srv.pub); + for (int i = 0; i < MAX_SUBSCRIBERS; i++) + { + if (subscribers[i] == 0) // empty slot + { + subscribers[i] = static_cast(&srv); + srv.id_ = i + 100; + return v; + } + } + return false; + } + + void negotiateTopics() + { + rosserial_msgs::TopicInfo ti; + int i; + for (i = 0; i < MAX_PUBLISHERS; i++) + { + if (publishers[i] != 0) // non-empty slot + { + ti.topic_id = publishers[i]->id_; + ti.topic_name = (char *) publishers[i]->topic_; + ti.message_type = (char *) publishers[i]->msg_->getType(); + ti.md5sum = (char *) publishers[i]->msg_->getMD5(); + ti.buffer_size = OUTPUT_SIZE; + publish(publishers[i]->getEndpointType(), &ti); + } + } + for (i = 0; i < MAX_SUBSCRIBERS; i++) + { + if (subscribers[i] != 0) // non-empty slot + { + ti.topic_id = subscribers[i]->id_; + ti.topic_name = (char *) subscribers[i]->topic_; + ti.message_type = (char *) subscribers[i]->getMsgType(); + ti.md5sum = (char *) subscribers[i]->getMsgMD5(); + ti.buffer_size = INPUT_SIZE; + publish(subscribers[i]->getEndpointType(), &ti); + } + } + configured_ = true; + } + + virtual int publish(int id, const Msg * msg) + { + if (id >= 100 && !configured_) + return 0; + + /* serialize message */ + int l = msg->serialize(message_out + 7); + + /* setup the header */ + message_out[0] = 0xff; + message_out[1] = PROTOCOL_VER; + message_out[2] = (uint8_t)((uint16_t)l & 255); + message_out[3] = (uint8_t)((uint16_t)l >> 8); + message_out[4] = 255 - ((message_out[2] + message_out[3]) % 256); + message_out[5] = (uint8_t)((int16_t)id & 255); + message_out[6] = (uint8_t)((int16_t)id >> 8); + + /* calculate checksum */ + int chk = 0; + for (int i = 5; i < l + 7; i++) + chk += message_out[i]; + l += 7; + message_out[l++] = 255 - (chk % 256); + + if (l <= OUTPUT_SIZE) + { + hardware_.write(message_out, l); + return l; + } + else + { + logerror("Message from device dropped: message larger than buffer."); + return -1; + } + } + + /******************************************************************** + * Logging + */ + +private: + void log(char byte, const char * msg) + { + rosserial_msgs::Log l; + l.level = byte; + l.msg = (char*)msg; + publish(rosserial_msgs::TopicInfo::ID_LOG, &l); + } + +public: + void logdebug(const char* msg) + { + log(rosserial_msgs::Log::ROSDEBUG, msg); + } + void loginfo(const char * msg) + { + log(rosserial_msgs::Log::INFO, msg); + } + void logwarn(const char *msg) + { + log(rosserial_msgs::Log::WARN, msg); + } + void logerror(const char*msg) + { + log(rosserial_msgs::Log::ERROR, msg); + } + void logfatal(const char*msg) + { + log(rosserial_msgs::Log::FATAL, msg); + } + + /******************************************************************** + * Parameters + */ + +private: + bool param_recieved; + rosserial_msgs::RequestParamResponse req_param_resp; + + bool requestParam(const char * name, int time_out = 1000) + { + param_recieved = false; + rosserial_msgs::RequestParamRequest req; + req.name = (char*)name; + publish(TopicInfo::ID_PARAMETER_REQUEST, &req); + uint32_t end_time = hardware_.time() + time_out; + while (!param_recieved) + { + spinOnce(); + if (hardware_.time() > end_time) + { + logwarn("Failed to get param: timeout expired"); + return false; + } + } + return true; + } + +public: + bool getParam(const char* name, int* param, int length = 1, int timeout = 1000) + { + if (requestParam(name, timeout)) + { + if (length == req_param_resp.ints_length) + { + //copy it over + for (int i = 0; i < length; i++) + param[i] = req_param_resp.ints[i]; + return true; + } + else + { + logwarn("Failed to get param: length mismatch"); + } + } + return false; + } + bool getParam(const char* name, float* param, int length = 1, int timeout = 1000) + { + if (requestParam(name, timeout)) + { + if (length == req_param_resp.floats_length) + { + //copy it over + for (int i = 0; i < length; i++) + param[i] = req_param_resp.floats[i]; + return true; + } + else + { + logwarn("Failed to get param: length mismatch"); + } + } + return false; + } + bool getParam(const char* name, char** param, int length = 1, int timeout = 1000) + { + if (requestParam(name, timeout)) + { + if (length == req_param_resp.strings_length) + { + //copy it over + for (int i = 0; i < length; i++) + strcpy(param[i], req_param_resp.strings[i]); + return true; + } + else + { + logwarn("Failed to get param: length mismatch"); + } + } + return false; + } +}; + +} + +#endif diff --git a/source/ros-max-lib/ros_lib/ros/publisher.h b/source/ros-max-lib/ros_lib/ros/publisher.h new file mode 100644 index 0000000000000000000000000000000000000000..86dde386fcad40bd691803279e9e8cf8ef5a3986 --- /dev/null +++ b/source/ros-max-lib/ros_lib/ros/publisher.h @@ -0,0 +1,74 @@ +/* + * 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_PUBLISHER_H_ +#define _ROS_PUBLISHER_H_ + +#include "../rosserial_msgs/TopicInfo.h" +#include "../ros/node_handle.h" + +namespace ros +{ + +/* Generic Publisher */ +class Publisher +{ +public: + Publisher(const char * topic_name, Msg * msg, int endpoint = rosserial_msgs::TopicInfo::ID_PUBLISHER) : + topic_(topic_name), + msg_(msg), + endpoint_(endpoint) {}; + + int publish(const Msg * msg) + { + return nh_->publish(id_, msg); + }; + int getEndpointType() + { + return endpoint_; + } + + const char * topic_; + Msg *msg_; + // id_ and no_ are set by NodeHandle when we advertise + int id_; + NodeHandleBase_* nh_; + +private: + int endpoint_; +}; + +} + +#endif diff --git a/source/ros-max-lib/ros_lib/ros/service_client.h b/source/ros-max-lib/ros_lib/ros/service_client.h new file mode 100644 index 0000000000000000000000000000000000000000..d0629a462e24af2687c03cab925d5e23cf04b68f --- /dev/null +++ b/source/ros-max-lib/ros_lib/ros/service_client.h @@ -0,0 +1,95 @@ +/* + * 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_SERVICE_CLIENT_H_ +#define _ROS_SERVICE_CLIENT_H_ + +#include "../rosserial_msgs/TopicInfo.h" + +#include "../ros/publisher.h" +#include "../ros/subscriber.h" + +namespace ros +{ + +template +class ServiceClient : public Subscriber_ +{ +public: + ServiceClient(const char* topic_name) : + pub(topic_name, &req, rosserial_msgs::TopicInfo::ID_SERVICE_CLIENT + rosserial_msgs::TopicInfo::ID_PUBLISHER) + { + this->topic_ = topic_name; + this->waiting = true; + } + + virtual void call(const MReq & request, MRes & response) + { + if (!pub.nh_->connected()) return; + ret = &response; + waiting = true; + pub.publish(&request); + while (waiting && pub.nh_->connected()) + if (pub.nh_->spinOnce() < 0) break; + } + + // these refer to the subscriber + virtual void callback(unsigned char *data) + { + ret->deserialize(data); + waiting = false; + } + virtual const char * getMsgType() + { + return this->resp.getType(); + } + virtual const char * getMsgMD5() + { + return this->resp.getMD5(); + } + virtual int getEndpointType() + { + return rosserial_msgs::TopicInfo::ID_SERVICE_CLIENT + rosserial_msgs::TopicInfo::ID_SUBSCRIBER; + } + + MReq req; + MRes resp; + MRes * ret; + bool waiting; + Publisher pub; +}; + +} + +#endif diff --git a/source/ros-max-lib/ros_lib/ros/service_server.h b/source/ros-max-lib/ros_lib/ros/service_server.h new file mode 100644 index 0000000000000000000000000000000000000000..1b95a9e863abc65e73c191d6a6ee3f890a3e9d0b --- /dev/null +++ b/source/ros-max-lib/ros_lib/ros/service_server.h @@ -0,0 +1,130 @@ +/* + * 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_SERVICE_SERVER_H_ +#define _ROS_SERVICE_SERVER_H_ + +#include "../rosserial_msgs/TopicInfo.h" + +#include "../ros/publisher.h" +#include "../ros/subscriber.h" + +namespace ros +{ + +template +class ServiceServer : public Subscriber_ +{ +public: + typedef void(ObjT::*CallbackT)(const MReq&, MRes&); + + ServiceServer(const char* topic_name, CallbackT cb, ObjT* obj) : + pub(topic_name, &resp, rosserial_msgs::TopicInfo::ID_SERVICE_SERVER + rosserial_msgs::TopicInfo::ID_PUBLISHER), + obj_(obj) + { + this->topic_ = topic_name; + this->cb_ = cb; + } + + // these refer to the subscriber + virtual void callback(unsigned char *data) + { + req.deserialize(data); + (obj_->*cb_)(req, resp); + pub.publish(&resp); + } + virtual const char * getMsgType() + { + return this->req.getType(); + } + virtual const char * getMsgMD5() + { + return this->req.getMD5(); + } + virtual int getEndpointType() + { + return rosserial_msgs::TopicInfo::ID_SERVICE_SERVER + rosserial_msgs::TopicInfo::ID_SUBSCRIBER; + } + + MReq req; + MRes resp; + Publisher pub; +private: + CallbackT cb_; + ObjT* obj_; +}; + +template +class ServiceServer : public Subscriber_ +{ +public: + typedef void(*CallbackT)(const MReq&, MRes&); + + ServiceServer(const char* topic_name, CallbackT cb) : + pub(topic_name, &resp, rosserial_msgs::TopicInfo::ID_SERVICE_SERVER + rosserial_msgs::TopicInfo::ID_PUBLISHER) + { + this->topic_ = topic_name; + this->cb_ = cb; + } + + // these refer to the subscriber + virtual void callback(unsigned char *data) + { + req.deserialize(data); + cb_(req, resp); + pub.publish(&resp); + } + virtual const char * getMsgType() + { + return this->req.getType(); + } + virtual const char * getMsgMD5() + { + return this->req.getMD5(); + } + virtual int getEndpointType() + { + return rosserial_msgs::TopicInfo::ID_SERVICE_SERVER + rosserial_msgs::TopicInfo::ID_SUBSCRIBER; + } + + MReq req; + MRes resp; + Publisher pub; +private: + CallbackT cb_; +}; + +} + +#endif diff --git a/source/ros-max-lib/ros_lib/ros/subscriber.h b/source/ros-max-lib/ros_lib/ros/subscriber.h new file mode 100644 index 0000000000000000000000000000000000000000..0f7364afbf9f864d0920dcd4b72c6ecab4583d4f --- /dev/null +++ b/source/ros-max-lib/ros_lib/ros/subscriber.h @@ -0,0 +1,140 @@ +/* + * 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_SUBSCRIBER_H_ +#define ROS_SUBSCRIBER_H_ + +#include "../rosserial_msgs/TopicInfo.h" + +namespace ros +{ + +/* Base class for objects subscribers. */ +class Subscriber_ +{ +public: + virtual void callback(unsigned char *data) = 0; + virtual int getEndpointType() = 0; + + // id_ is set by NodeHandle when we advertise + int id_; + + virtual const char * getMsgType() = 0; + virtual const char * getMsgMD5() = 0; + const char * topic_; +}; + +/* Bound function subscriber. */ +template +class Subscriber: public Subscriber_ +{ +public: + typedef void(ObjT::*CallbackT)(const MsgT&); + MsgT msg; + + Subscriber(const char * topic_name, CallbackT cb, ObjT* obj, int endpoint = rosserial_msgs::TopicInfo::ID_SUBSCRIBER) : + cb_(cb), + obj_(obj), + endpoint_(endpoint) + { + topic_ = topic_name; + }; + + virtual void callback(unsigned char* data) + { + msg.deserialize(data); + (obj_->*cb_)(msg); + } + + virtual const char * getMsgType() + { + return this->msg.getType(); + } + virtual const char * getMsgMD5() + { + return this->msg.getMD5(); + } + virtual int getEndpointType() + { + return endpoint_; + } + +private: + CallbackT cb_; + ObjT* obj_; + int endpoint_; +}; + +/* Standalone function subscriber. */ +template +class Subscriber: public Subscriber_ +{ +public: + typedef void(*CallbackT)(const MsgT&); + MsgT msg; + + Subscriber(const char * topic_name, CallbackT cb, int endpoint = rosserial_msgs::TopicInfo::ID_SUBSCRIBER) : + cb_(cb), + endpoint_(endpoint) + { + topic_ = topic_name; + }; + + virtual void callback(unsigned char* data) + { + msg.deserialize(data); + this->cb_(msg); + } + + virtual const char * getMsgType() + { + return this->msg.getType(); + } + virtual const char * getMsgMD5() + { + return this->msg.getMD5(); + } + virtual int getEndpointType() + { + return endpoint_; + } + +private: + CallbackT cb_; + int endpoint_; +}; + +} + +#endif diff --git a/source/ros-max-lib/ros_lib/ros/time.h b/source/ros-max-lib/ros_lib/ros/time.h new file mode 100644 index 0000000000000000000000000000000000000000..72657cb357e7511a124a397a9c6a24bfee61f9d1 --- /dev/null +++ b/source/ros-max-lib/ros_lib/ros/time.h @@ -0,0 +1,82 @@ +/* + * 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_TIME_H_ +#define ROS_TIME_H_ + +#include "duration.h" +#include +#include + +namespace ros +{ +void normalizeSecNSec(uint32_t &sec, uint32_t &nsec); + +class Time +{ +public: + uint32_t sec, nsec; + + Time() : sec(0), nsec(0) {} + Time(uint32_t _sec, uint32_t _nsec) : sec(_sec), nsec(_nsec) + { + normalizeSecNSec(sec, nsec); + } + + double toSec() const + { + return (double)sec + 1e-9 * (double)nsec; + }; + void fromSec(double t) + { + sec = (uint32_t) floor(t); + nsec = (uint32_t) round((t - sec) * 1e9); + }; + + uint32_t toNsec() + { + return (uint32_t)sec * 1000000000ull + (uint32_t)nsec; + }; + Time& fromNSec(int32_t t); + + Time& operator +=(const Duration &rhs); + Time& operator -=(const Duration &rhs); + + static Time now(); + static void setNow(Time & new_now); +}; + +} + +#endif diff --git a/source/ros-max-lib/ros_lib/roscpp/Empty.h b/source/ros-max-lib/ros_lib/roscpp/Empty.h new file mode 100644 index 0000000000000000000000000000000000000000..df021b79188f55ba4e5a3bbf468ad0d2f0c7605f --- /dev/null +++ b/source/ros-max-lib/ros_lib/roscpp/Empty.h @@ -0,0 +1,70 @@ +#ifndef _ROS_SERVICE_Empty_h +#define _ROS_SERVICE_Empty_h +#include +#include +#include +#include "ros/msg.h" + +namespace roscpp +{ + +static const char EMPTY[] = "roscpp/Empty"; + + class EmptyRequest : public ros::Msg + { + public: + + EmptyRequest() + { + } + + 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 EMPTY; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class EmptyResponse : public ros::Msg + { + public: + + EmptyResponse() + { + } + + 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 EMPTY; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class Empty { + public: + typedef EmptyRequest Request; + typedef EmptyResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/roscpp/GetLoggers.h b/source/ros-max-lib/ros_lib/roscpp/GetLoggers.h new file mode 100644 index 0000000000000000000000000000000000000000..35f67fbc4a8447280e69c6560841888e868d738e --- /dev/null +++ b/source/ros-max-lib/ros_lib/roscpp/GetLoggers.h @@ -0,0 +1,96 @@ +#ifndef _ROS_SERVICE_GetLoggers_h +#define _ROS_SERVICE_GetLoggers_h +#include +#include +#include +#include "ros/msg.h" +#include "roscpp/Logger.h" + +namespace roscpp +{ + +static const char GETLOGGERS[] = "roscpp/GetLoggers"; + + class GetLoggersRequest : public ros::Msg + { + public: + + GetLoggersRequest() + { + } + + 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 GETLOGGERS; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class GetLoggersResponse : public ros::Msg + { + public: + uint32_t loggers_length; + typedef roscpp::Logger _loggers_type; + _loggers_type st_loggers; + _loggers_type * loggers; + + GetLoggersResponse(): + loggers_length(0), loggers(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->loggers_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->loggers_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->loggers_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->loggers_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->loggers_length); + for( uint32_t i = 0; i < loggers_length; i++){ + offset += this->loggers[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t loggers_lengthT = ((uint32_t) (*(inbuffer + offset))); + loggers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + loggers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + loggers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->loggers_length); + if(loggers_lengthT > loggers_length) + this->loggers = (roscpp::Logger*)realloc(this->loggers, loggers_lengthT * sizeof(roscpp::Logger)); + loggers_length = loggers_lengthT; + for( uint32_t i = 0; i < loggers_length; i++){ + offset += this->st_loggers.deserialize(inbuffer + offset); + memcpy( &(this->loggers[i]), &(this->st_loggers), sizeof(roscpp::Logger)); + } + return offset; + } + + const char * getType(){ return GETLOGGERS; }; + const char * getMD5(){ return "32e97e85527d4678a8f9279894bb64b0"; }; + + }; + + class GetLoggers { + public: + typedef GetLoggersRequest Request; + typedef GetLoggersResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/roscpp/Logger.h b/source/ros-max-lib/ros_lib/roscpp/Logger.h new file mode 100644 index 0000000000000000000000000000000000000000..b954b7160dc01fd98c96757a7090910e8dc578b6 --- /dev/null +++ b/source/ros-max-lib/ros_lib/roscpp/Logger.h @@ -0,0 +1,72 @@ +#ifndef _ROS_roscpp_Logger_h +#define _ROS_roscpp_Logger_h + +#include +#include +#include +#include "ros/msg.h" + +namespace roscpp +{ + + class Logger : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef const char* _level_type; + _level_type level; + + Logger(): + name(""), + level("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_level = strlen(this->level); + varToArr(outbuffer + offset, length_level); + offset += 4; + memcpy(outbuffer + offset, this->level, length_level); + offset += length_level; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_level; + arrToVar(length_level, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_level; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_level-1]=0; + this->level = (char *)(inbuffer + offset-1); + offset += length_level; + return offset; + } + + const char * getType(){ return "roscpp/Logger"; }; + const char * getMD5(){ return "a6069a2ff40db7bd32143dd66e1f408e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/roscpp/SetLoggerLevel.h b/source/ros-max-lib/ros_lib/roscpp/SetLoggerLevel.h new file mode 100644 index 0000000000000000000000000000000000000000..64f2a24b39a0c9ec1fd675db08fa64401395fe77 --- /dev/null +++ b/source/ros-max-lib/ros_lib/roscpp/SetLoggerLevel.h @@ -0,0 +1,104 @@ +#ifndef _ROS_SERVICE_SetLoggerLevel_h +#define _ROS_SERVICE_SetLoggerLevel_h +#include +#include +#include +#include "ros/msg.h" + +namespace roscpp +{ + +static const char SETLOGGERLEVEL[] = "roscpp/SetLoggerLevel"; + + class SetLoggerLevelRequest : public ros::Msg + { + public: + typedef const char* _logger_type; + _logger_type logger; + typedef const char* _level_type; + _level_type level; + + SetLoggerLevelRequest(): + logger(""), + level("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_logger = strlen(this->logger); + varToArr(outbuffer + offset, length_logger); + offset += 4; + memcpy(outbuffer + offset, this->logger, length_logger); + offset += length_logger; + uint32_t length_level = strlen(this->level); + varToArr(outbuffer + offset, length_level); + offset += 4; + memcpy(outbuffer + offset, this->level, length_level); + offset += length_level; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_logger; + arrToVar(length_logger, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_logger; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_logger-1]=0; + this->logger = (char *)(inbuffer + offset-1); + offset += length_logger; + uint32_t length_level; + arrToVar(length_level, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_level; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_level-1]=0; + this->level = (char *)(inbuffer + offset-1); + offset += length_level; + return offset; + } + + const char * getType(){ return SETLOGGERLEVEL; }; + const char * getMD5(){ return "51da076440d78ca1684d36c868df61ea"; }; + + }; + + class SetLoggerLevelResponse : public ros::Msg + { + public: + + SetLoggerLevelResponse() + { + } + + 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 SETLOGGERLEVEL; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class SetLoggerLevel { + public: + typedef SetLoggerLevelRequest Request; + typedef SetLoggerLevelResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/roscpp_tutorials/TwoInts.h b/source/ros-max-lib/ros_lib/roscpp_tutorials/TwoInts.h new file mode 100644 index 0000000000000000000000000000000000000000..03510bb864554e7e9682522d3ac7f046171fd5d4 --- /dev/null +++ b/source/ros-max-lib/ros_lib/roscpp_tutorials/TwoInts.h @@ -0,0 +1,166 @@ +#ifndef _ROS_SERVICE_TwoInts_h +#define _ROS_SERVICE_TwoInts_h +#include +#include +#include +#include "ros/msg.h" + +namespace roscpp_tutorials +{ + +static const char TWOINTS[] = "roscpp_tutorials/TwoInts"; + + class TwoIntsRequest : public ros::Msg + { + public: + typedef int64_t _a_type; + _a_type a; + typedef int64_t _b_type; + _b_type b; + + TwoIntsRequest(): + 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 TWOINTS; }; + const char * getMD5(){ return "36d09b846be0b371c5f190354dd3153e"; }; + + }; + + class TwoIntsResponse : public ros::Msg + { + public: + typedef int64_t _sum_type; + _sum_type sum; + + TwoIntsResponse(): + 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 TWOINTS; }; + const char * getMD5(){ return "b88405221c77b1878a3cbbfff53428d7"; }; + + }; + + class TwoInts { + public: + typedef TwoIntsRequest Request; + typedef TwoIntsResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/rosgraph_msgs/Clock.h b/source/ros-max-lib/ros_lib/rosgraph_msgs/Clock.h new file mode 100644 index 0000000000000000000000000000000000000000..4d8736ce012dd58632c5f345f83b9de45dd2958e --- /dev/null +++ b/source/ros-max-lib/ros_lib/rosgraph_msgs/Clock.h @@ -0,0 +1,62 @@ +#ifndef _ROS_rosgraph_msgs_Clock_h +#define _ROS_rosgraph_msgs_Clock_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" + +namespace rosgraph_msgs +{ + + class Clock : public ros::Msg + { + public: + typedef ros::Time _clock_type; + _clock_type clock; + + Clock(): + clock() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->clock.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->clock.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->clock.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->clock.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->clock.sec); + *(outbuffer + offset + 0) = (this->clock.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->clock.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->clock.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->clock.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->clock.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->clock.sec = ((uint32_t) (*(inbuffer + offset))); + this->clock.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->clock.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->clock.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->clock.sec); + this->clock.nsec = ((uint32_t) (*(inbuffer + offset))); + this->clock.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->clock.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->clock.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->clock.nsec); + return offset; + } + + const char * getType(){ return "rosgraph_msgs/Clock"; }; + const char * getMD5(){ return "a9c97c1d230cfc112e270351a944ee47"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rosgraph_msgs/Log.h b/source/ros-max-lib/ros_lib/rosgraph_msgs/Log.h new file mode 100644 index 0000000000000000000000000000000000000000..45c45669743c22a1283c3099ea16e0387a3dd4c6 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rosgraph_msgs/Log.h @@ -0,0 +1,185 @@ +#ifndef _ROS_rosgraph_msgs_Log_h +#define _ROS_rosgraph_msgs_Log_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace rosgraph_msgs +{ + + class Log : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef int8_t _level_type; + _level_type level; + typedef const char* _name_type; + _name_type name; + typedef const char* _msg_type; + _msg_type msg; + typedef const char* _file_type; + _file_type file; + typedef const char* _function_type; + _function_type function; + typedef uint32_t _line_type; + _line_type line; + uint32_t topics_length; + typedef char* _topics_type; + _topics_type st_topics; + _topics_type * topics; + enum { DEBUG = 1 }; + enum { INFO = 2 }; + enum { WARN = 4 }; + enum { ERROR = 8 }; + enum { FATAL = 16 }; + + Log(): + header(), + level(0), + name(""), + msg(""), + file(""), + function(""), + line(0), + topics_length(0), topics(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + int8_t real; + uint8_t base; + } u_level; + u_level.real = this->level; + *(outbuffer + offset + 0) = (u_level.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->level); + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_msg = strlen(this->msg); + varToArr(outbuffer + offset, length_msg); + offset += 4; + memcpy(outbuffer + offset, this->msg, length_msg); + offset += length_msg; + uint32_t length_file = strlen(this->file); + varToArr(outbuffer + offset, length_file); + offset += 4; + memcpy(outbuffer + offset, this->file, length_file); + offset += length_file; + uint32_t length_function = strlen(this->function); + varToArr(outbuffer + offset, length_function); + offset += 4; + memcpy(outbuffer + offset, this->function, length_function); + offset += length_function; + *(outbuffer + offset + 0) = (this->line >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->line >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->line >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->line >> (8 * 3)) & 0xFF; + offset += sizeof(this->line); + *(outbuffer + offset + 0) = (this->topics_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->topics_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->topics_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->topics_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->topics_length); + for( uint32_t i = 0; i < topics_length; i++){ + uint32_t length_topicsi = strlen(this->topics[i]); + varToArr(outbuffer + offset, length_topicsi); + offset += 4; + memcpy(outbuffer + offset, this->topics[i], length_topicsi); + offset += length_topicsi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + int8_t real; + uint8_t base; + } u_level; + u_level.base = 0; + u_level.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->level = u_level.real; + offset += sizeof(this->level); + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_msg; + arrToVar(length_msg, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_msg; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_msg-1]=0; + this->msg = (char *)(inbuffer + offset-1); + offset += length_msg; + uint32_t length_file; + arrToVar(length_file, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_file; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_file-1]=0; + this->file = (char *)(inbuffer + offset-1); + offset += length_file; + uint32_t length_function; + arrToVar(length_function, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_function; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_function-1]=0; + this->function = (char *)(inbuffer + offset-1); + offset += length_function; + this->line = ((uint32_t) (*(inbuffer + offset))); + this->line |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->line |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->line |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->line); + uint32_t topics_lengthT = ((uint32_t) (*(inbuffer + offset))); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->topics_length); + if(topics_lengthT > topics_length) + this->topics = (char**)realloc(this->topics, topics_lengthT * sizeof(char*)); + topics_length = topics_lengthT; + for( uint32_t i = 0; i < topics_length; i++){ + uint32_t length_st_topics; + arrToVar(length_st_topics, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_topics; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_topics-1]=0; + this->st_topics = (char *)(inbuffer + offset-1); + offset += length_st_topics; + memcpy( &(this->topics[i]), &(this->st_topics), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return "rosgraph_msgs/Log"; }; + const char * getMD5(){ return "acffd30cd6b6de30f120938c17c593fb"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rosgraph_msgs/TopicStatistics.h b/source/ros-max-lib/ros_lib/rosgraph_msgs/TopicStatistics.h new file mode 100644 index 0000000000000000000000000000000000000000..c62f2f901e82215291a8f3885de2cb996a7b27aa --- /dev/null +++ b/source/ros-max-lib/ros_lib/rosgraph_msgs/TopicStatistics.h @@ -0,0 +1,347 @@ +#ifndef _ROS_rosgraph_msgs_TopicStatistics_h +#define _ROS_rosgraph_msgs_TopicStatistics_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" +#include "ros/duration.h" + +namespace rosgraph_msgs +{ + + class TopicStatistics : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + typedef const char* _node_pub_type; + _node_pub_type node_pub; + typedef const char* _node_sub_type; + _node_sub_type node_sub; + typedef ros::Time _window_start_type; + _window_start_type window_start; + typedef ros::Time _window_stop_type; + _window_stop_type window_stop; + typedef int32_t _delivered_msgs_type; + _delivered_msgs_type delivered_msgs; + typedef int32_t _dropped_msgs_type; + _dropped_msgs_type dropped_msgs; + typedef int32_t _traffic_type; + _traffic_type traffic; + typedef ros::Duration _period_mean_type; + _period_mean_type period_mean; + typedef ros::Duration _period_stddev_type; + _period_stddev_type period_stddev; + typedef ros::Duration _period_max_type; + _period_max_type period_max; + typedef ros::Duration _stamp_age_mean_type; + _stamp_age_mean_type stamp_age_mean; + typedef ros::Duration _stamp_age_stddev_type; + _stamp_age_stddev_type stamp_age_stddev; + typedef ros::Duration _stamp_age_max_type; + _stamp_age_max_type stamp_age_max; + + TopicStatistics(): + topic(""), + node_pub(""), + node_sub(""), + window_start(), + window_stop(), + delivered_msgs(0), + dropped_msgs(0), + traffic(0), + period_mean(), + period_stddev(), + period_max(), + stamp_age_mean(), + stamp_age_stddev(), + stamp_age_max() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + uint32_t length_node_pub = strlen(this->node_pub); + varToArr(outbuffer + offset, length_node_pub); + offset += 4; + memcpy(outbuffer + offset, this->node_pub, length_node_pub); + offset += length_node_pub; + uint32_t length_node_sub = strlen(this->node_sub); + varToArr(outbuffer + offset, length_node_sub); + offset += 4; + memcpy(outbuffer + offset, this->node_sub, length_node_sub); + offset += length_node_sub; + *(outbuffer + offset + 0) = (this->window_start.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->window_start.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->window_start.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->window_start.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->window_start.sec); + *(outbuffer + offset + 0) = (this->window_start.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->window_start.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->window_start.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->window_start.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->window_start.nsec); + *(outbuffer + offset + 0) = (this->window_stop.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->window_stop.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->window_stop.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->window_stop.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->window_stop.sec); + *(outbuffer + offset + 0) = (this->window_stop.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->window_stop.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->window_stop.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->window_stop.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->window_stop.nsec); + union { + int32_t real; + uint32_t base; + } u_delivered_msgs; + u_delivered_msgs.real = this->delivered_msgs; + *(outbuffer + offset + 0) = (u_delivered_msgs.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_delivered_msgs.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_delivered_msgs.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_delivered_msgs.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->delivered_msgs); + union { + int32_t real; + uint32_t base; + } u_dropped_msgs; + u_dropped_msgs.real = this->dropped_msgs; + *(outbuffer + offset + 0) = (u_dropped_msgs.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_dropped_msgs.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_dropped_msgs.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_dropped_msgs.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->dropped_msgs); + union { + int32_t real; + uint32_t base; + } u_traffic; + u_traffic.real = this->traffic; + *(outbuffer + offset + 0) = (u_traffic.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_traffic.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_traffic.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_traffic.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->traffic); + *(outbuffer + offset + 0) = (this->period_mean.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->period_mean.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->period_mean.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->period_mean.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->period_mean.sec); + *(outbuffer + offset + 0) = (this->period_mean.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->period_mean.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->period_mean.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->period_mean.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->period_mean.nsec); + *(outbuffer + offset + 0) = (this->period_stddev.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->period_stddev.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->period_stddev.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->period_stddev.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->period_stddev.sec); + *(outbuffer + offset + 0) = (this->period_stddev.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->period_stddev.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->period_stddev.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->period_stddev.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->period_stddev.nsec); + *(outbuffer + offset + 0) = (this->period_max.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->period_max.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->period_max.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->period_max.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->period_max.sec); + *(outbuffer + offset + 0) = (this->period_max.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->period_max.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->period_max.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->period_max.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->period_max.nsec); + *(outbuffer + offset + 0) = (this->stamp_age_mean.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp_age_mean.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp_age_mean.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp_age_mean.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp_age_mean.sec); + *(outbuffer + offset + 0) = (this->stamp_age_mean.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp_age_mean.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp_age_mean.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp_age_mean.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp_age_mean.nsec); + *(outbuffer + offset + 0) = (this->stamp_age_stddev.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp_age_stddev.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp_age_stddev.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp_age_stddev.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp_age_stddev.sec); + *(outbuffer + offset + 0) = (this->stamp_age_stddev.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp_age_stddev.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp_age_stddev.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp_age_stddev.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp_age_stddev.nsec); + *(outbuffer + offset + 0) = (this->stamp_age_max.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp_age_max.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp_age_max.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp_age_max.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp_age_max.sec); + *(outbuffer + offset + 0) = (this->stamp_age_max.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stamp_age_max.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stamp_age_max.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stamp_age_max.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->stamp_age_max.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + uint32_t length_node_pub; + arrToVar(length_node_pub, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_node_pub; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_node_pub-1]=0; + this->node_pub = (char *)(inbuffer + offset-1); + offset += length_node_pub; + uint32_t length_node_sub; + arrToVar(length_node_sub, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_node_sub; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_node_sub-1]=0; + this->node_sub = (char *)(inbuffer + offset-1); + offset += length_node_sub; + this->window_start.sec = ((uint32_t) (*(inbuffer + offset))); + this->window_start.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->window_start.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->window_start.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->window_start.sec); + this->window_start.nsec = ((uint32_t) (*(inbuffer + offset))); + this->window_start.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->window_start.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->window_start.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->window_start.nsec); + this->window_stop.sec = ((uint32_t) (*(inbuffer + offset))); + this->window_stop.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->window_stop.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->window_stop.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->window_stop.sec); + this->window_stop.nsec = ((uint32_t) (*(inbuffer + offset))); + this->window_stop.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->window_stop.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->window_stop.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->window_stop.nsec); + union { + int32_t real; + uint32_t base; + } u_delivered_msgs; + u_delivered_msgs.base = 0; + u_delivered_msgs.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_delivered_msgs.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_delivered_msgs.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_delivered_msgs.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->delivered_msgs = u_delivered_msgs.real; + offset += sizeof(this->delivered_msgs); + union { + int32_t real; + uint32_t base; + } u_dropped_msgs; + u_dropped_msgs.base = 0; + u_dropped_msgs.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_dropped_msgs.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_dropped_msgs.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_dropped_msgs.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->dropped_msgs = u_dropped_msgs.real; + offset += sizeof(this->dropped_msgs); + union { + int32_t real; + uint32_t base; + } u_traffic; + u_traffic.base = 0; + u_traffic.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_traffic.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_traffic.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_traffic.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->traffic = u_traffic.real; + offset += sizeof(this->traffic); + this->period_mean.sec = ((uint32_t) (*(inbuffer + offset))); + this->period_mean.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->period_mean.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->period_mean.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->period_mean.sec); + this->period_mean.nsec = ((uint32_t) (*(inbuffer + offset))); + this->period_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->period_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->period_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->period_mean.nsec); + this->period_stddev.sec = ((uint32_t) (*(inbuffer + offset))); + this->period_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->period_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->period_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->period_stddev.sec); + this->period_stddev.nsec = ((uint32_t) (*(inbuffer + offset))); + this->period_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->period_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->period_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->period_stddev.nsec); + this->period_max.sec = ((uint32_t) (*(inbuffer + offset))); + this->period_max.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->period_max.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->period_max.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->period_max.sec); + this->period_max.nsec = ((uint32_t) (*(inbuffer + offset))); + this->period_max.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->period_max.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->period_max.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->period_max.nsec); + this->stamp_age_mean.sec = ((uint32_t) (*(inbuffer + offset))); + this->stamp_age_mean.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp_age_mean.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp_age_mean.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp_age_mean.sec); + this->stamp_age_mean.nsec = ((uint32_t) (*(inbuffer + offset))); + this->stamp_age_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp_age_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp_age_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp_age_mean.nsec); + this->stamp_age_stddev.sec = ((uint32_t) (*(inbuffer + offset))); + this->stamp_age_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp_age_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp_age_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp_age_stddev.sec); + this->stamp_age_stddev.nsec = ((uint32_t) (*(inbuffer + offset))); + this->stamp_age_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp_age_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp_age_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp_age_stddev.nsec); + this->stamp_age_max.sec = ((uint32_t) (*(inbuffer + offset))); + this->stamp_age_max.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp_age_max.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp_age_max.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp_age_max.sec); + this->stamp_age_max.nsec = ((uint32_t) (*(inbuffer + offset))); + this->stamp_age_max.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stamp_age_max.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stamp_age_max.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stamp_age_max.nsec); + return offset; + } + + const char * getType(){ return "rosgraph_msgs/TopicStatistics"; }; + const char * getMD5(){ return "10152ed868c5097a5e2e4a89d7daa710"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rospy_tutorials/AddTwoInts.h b/source/ros-max-lib/ros_lib/rospy_tutorials/AddTwoInts.h new file mode 100644 index 0000000000000000000000000000000000000000..04dec98e8a895f29413a923b7f906c41ad5e66fa --- /dev/null +++ b/source/ros-max-lib/ros_lib/rospy_tutorials/AddTwoInts.h @@ -0,0 +1,166 @@ +#ifndef _ROS_SERVICE_AddTwoInts_h +#define _ROS_SERVICE_AddTwoInts_h +#include +#include +#include +#include "ros/msg.h" + +namespace rospy_tutorials +{ + +static const char ADDTWOINTS[] = "rospy_tutorials/AddTwoInts"; + + class AddTwoIntsRequest : public ros::Msg + { + public: + typedef int64_t _a_type; + _a_type a; + typedef int64_t _b_type; + _b_type b; + + AddTwoIntsRequest(): + 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 ADDTWOINTS; }; + const char * getMD5(){ return "36d09b846be0b371c5f190354dd3153e"; }; + + }; + + class AddTwoIntsResponse : public ros::Msg + { + public: + typedef int64_t _sum_type; + _sum_type sum; + + AddTwoIntsResponse(): + 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 ADDTWOINTS; }; + const char * getMD5(){ return "b88405221c77b1878a3cbbfff53428d7"; }; + + }; + + class AddTwoInts { + public: + typedef AddTwoIntsRequest Request; + typedef AddTwoIntsResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/rospy_tutorials/BadTwoInts.h b/source/ros-max-lib/ros_lib/rospy_tutorials/BadTwoInts.h new file mode 100644 index 0000000000000000000000000000000000000000..0218f5495c586af59f4e2c28f315e255f2451f20 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rospy_tutorials/BadTwoInts.h @@ -0,0 +1,150 @@ +#ifndef _ROS_SERVICE_BadTwoInts_h +#define _ROS_SERVICE_BadTwoInts_h +#include +#include +#include +#include "ros/msg.h" + +namespace rospy_tutorials +{ + +static const char BADTWOINTS[] = "rospy_tutorials/BadTwoInts"; + + class BadTwoIntsRequest : public ros::Msg + { + public: + typedef int64_t _a_type; + _a_type a; + typedef int32_t _b_type; + _b_type b; + + BadTwoIntsRequest(): + 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 { + int32_t real; + uint32_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; + 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 { + int32_t real; + uint32_t base; + } u_b; + u_b.base = 0; + u_b.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_b.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_b.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_b.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->b = u_b.real; + offset += sizeof(this->b); + return offset; + } + + const char * getType(){ return BADTWOINTS; }; + const char * getMD5(){ return "29bb5c7dea8bf822f53e94b0ee5a3a56"; }; + + }; + + class BadTwoIntsResponse : public ros::Msg + { + public: + typedef int32_t _sum_type; + _sum_type sum; + + BadTwoIntsResponse(): + sum(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int32_t real; + uint32_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; + offset += sizeof(this->sum); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int32_t real; + uint32_t base; + } u_sum; + u_sum.base = 0; + u_sum.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_sum.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_sum.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_sum.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->sum = u_sum.real; + offset += sizeof(this->sum); + return offset; + } + + const char * getType(){ return BADTWOINTS; }; + const char * getMD5(){ return "0ba699c25c9418c0366f3595c0c8e8ec"; }; + + }; + + class BadTwoInts { + public: + typedef BadTwoIntsRequest Request; + typedef BadTwoIntsResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/rospy_tutorials/Floats.h b/source/ros-max-lib/ros_lib/rospy_tutorials/Floats.h new file mode 100644 index 0000000000000000000000000000000000000000..c0d284cbcac9b8273fc6ee332a9c4a41d716ad77 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rospy_tutorials/Floats.h @@ -0,0 +1,82 @@ +#ifndef _ROS_rospy_tutorials_Floats_h +#define _ROS_rospy_tutorials_Floats_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rospy_tutorials +{ + + class Floats : public ros::Msg + { + public: + uint32_t data_length; + typedef float _data_type; + _data_type st_data; + _data_type * data; + + Floats(): + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + float real; + uint32_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_datai.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_datai.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_datai.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (float*)realloc(this->data, data_lengthT * sizeof(float)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + float real; + uint32_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(float)); + } + return offset; + } + + const char * getType(){ return "rospy_tutorials/Floats"; }; + const char * getMD5(){ return "420cd38b6b071cd49f2970c3e2cee511"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rospy_tutorials/HeaderString.h b/source/ros-max-lib/ros_lib/rospy_tutorials/HeaderString.h new file mode 100644 index 0000000000000000000000000000000000000000..9fac4ef37291651ef6bb05c4b1f07cd77f9a5825 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rospy_tutorials/HeaderString.h @@ -0,0 +1,61 @@ +#ifndef _ROS_rospy_tutorials_HeaderString_h +#define _ROS_rospy_tutorials_HeaderString_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace rospy_tutorials +{ + + class HeaderString : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _data_type; + _data_type data; + + HeaderString(): + header(), + data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_data = strlen(this->data); + varToArr(outbuffer + offset, length_data); + offset += 4; + memcpy(outbuffer + offset, this->data, length_data); + offset += length_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_data; + arrToVar(length_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data-1]=0; + this->data = (char *)(inbuffer + offset-1); + offset += length_data; + return offset; + } + + const char * getType(){ return "rospy_tutorials/HeaderString"; }; + const char * getMD5(){ return "c99a9440709e4d4a9716d55b8270d5e7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rosserial_arduino/Adc.h b/source/ros-max-lib/ros_lib/rosserial_arduino/Adc.h new file mode 100644 index 0000000000000000000000000000000000000000..ac48677904be7de9b5f1eca577b9f3252fa45b6d --- /dev/null +++ b/source/ros-max-lib/ros_lib/rosserial_arduino/Adc.h @@ -0,0 +1,92 @@ +#ifndef _ROS_rosserial_arduino_Adc_h +#define _ROS_rosserial_arduino_Adc_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rosserial_arduino +{ + + class Adc : public ros::Msg + { + public: + typedef uint16_t _adc0_type; + _adc0_type adc0; + typedef uint16_t _adc1_type; + _adc1_type adc1; + typedef uint16_t _adc2_type; + _adc2_type adc2; + typedef uint16_t _adc3_type; + _adc3_type adc3; + typedef uint16_t _adc4_type; + _adc4_type adc4; + typedef uint16_t _adc5_type; + _adc5_type adc5; + + Adc(): + adc0(0), + adc1(0), + adc2(0), + adc3(0), + adc4(0), + adc5(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->adc0 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc0 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc0); + *(outbuffer + offset + 0) = (this->adc1 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc1 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc1); + *(outbuffer + offset + 0) = (this->adc2 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc2 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc2); + *(outbuffer + offset + 0) = (this->adc3 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc3 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc3); + *(outbuffer + offset + 0) = (this->adc4 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc4 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc4); + *(outbuffer + offset + 0) = (this->adc5 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc5 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc5); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->adc0 = ((uint16_t) (*(inbuffer + offset))); + this->adc0 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc0); + this->adc1 = ((uint16_t) (*(inbuffer + offset))); + this->adc1 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc1); + this->adc2 = ((uint16_t) (*(inbuffer + offset))); + this->adc2 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc2); + this->adc3 = ((uint16_t) (*(inbuffer + offset))); + this->adc3 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc3); + this->adc4 = ((uint16_t) (*(inbuffer + offset))); + this->adc4 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc4); + this->adc5 = ((uint16_t) (*(inbuffer + offset))); + this->adc5 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc5); + return offset; + } + + const char * getType(){ return "rosserial_arduino/Adc"; }; + const char * getMD5(){ return "6d7853a614e2e821319068311f2af25b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rosserial_arduino/Test.h b/source/ros-max-lib/ros_lib/rosserial_arduino/Test.h new file mode 100644 index 0000000000000000000000000000000000000000..cd806db905309e7ab4aaba03279d8b625ab84514 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rosserial_arduino/Test.h @@ -0,0 +1,104 @@ +#ifndef _ROS_SERVICE_Test_h +#define _ROS_SERVICE_Test_h +#include +#include +#include +#include "ros/msg.h" + +namespace rosserial_arduino +{ + +static const char TEST[] = "rosserial_arduino/Test"; + + class TestRequest : public ros::Msg + { + public: + typedef const char* _input_type; + _input_type input; + + TestRequest(): + input("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_input = strlen(this->input); + varToArr(outbuffer + offset, length_input); + offset += 4; + memcpy(outbuffer + offset, this->input, length_input); + offset += length_input; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_input; + arrToVar(length_input, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_input; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_input-1]=0; + this->input = (char *)(inbuffer + offset-1); + offset += length_input; + return offset; + } + + const char * getType(){ return TEST; }; + const char * getMD5(){ return "39e92f1778057359c64c7b8a7d7b19de"; }; + + }; + + class TestResponse : public ros::Msg + { + public: + typedef const char* _output_type; + _output_type output; + + TestResponse(): + output("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_output = strlen(this->output); + varToArr(outbuffer + offset, length_output); + offset += 4; + memcpy(outbuffer + offset, this->output, length_output); + offset += length_output; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_output; + arrToVar(length_output, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_output; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_output-1]=0; + this->output = (char *)(inbuffer + offset-1); + offset += length_output; + return offset; + } + + const char * getType(){ return TEST; }; + const char * getMD5(){ return "0825d95fdfa2c8f4bbb4e9c74bccd3fd"; }; + + }; + + class Test { + public: + typedef TestRequest Request; + typedef TestResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/rosserial_mbed/Adc.h b/source/ros-max-lib/ros_lib/rosserial_mbed/Adc.h new file mode 100644 index 0000000000000000000000000000000000000000..0de6480b705aba28fbb63d1043e77956188642d1 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rosserial_mbed/Adc.h @@ -0,0 +1,92 @@ +#ifndef _ROS_rosserial_mbed_Adc_h +#define _ROS_rosserial_mbed_Adc_h + +#include +#include +#include +#include "ros/msg.h" + +namespace rosserial_mbed +{ + + class Adc : public ros::Msg + { + public: + typedef uint16_t _adc0_type; + _adc0_type adc0; + typedef uint16_t _adc1_type; + _adc1_type adc1; + typedef uint16_t _adc2_type; + _adc2_type adc2; + typedef uint16_t _adc3_type; + _adc3_type adc3; + typedef uint16_t _adc4_type; + _adc4_type adc4; + typedef uint16_t _adc5_type; + _adc5_type adc5; + + Adc(): + adc0(0), + adc1(0), + adc2(0), + adc3(0), + adc4(0), + adc5(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->adc0 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc0 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc0); + *(outbuffer + offset + 0) = (this->adc1 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc1 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc1); + *(outbuffer + offset + 0) = (this->adc2 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc2 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc2); + *(outbuffer + offset + 0) = (this->adc3 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc3 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc3); + *(outbuffer + offset + 0) = (this->adc4 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc4 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc4); + *(outbuffer + offset + 0) = (this->adc5 >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->adc5 >> (8 * 1)) & 0xFF; + offset += sizeof(this->adc5); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->adc0 = ((uint16_t) (*(inbuffer + offset))); + this->adc0 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc0); + this->adc1 = ((uint16_t) (*(inbuffer + offset))); + this->adc1 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc1); + this->adc2 = ((uint16_t) (*(inbuffer + offset))); + this->adc2 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc2); + this->adc3 = ((uint16_t) (*(inbuffer + offset))); + this->adc3 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc3); + this->adc4 = ((uint16_t) (*(inbuffer + offset))); + this->adc4 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc4); + this->adc5 = ((uint16_t) (*(inbuffer + offset))); + this->adc5 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->adc5); + return offset; + } + + const char * getType(){ return "rosserial_mbed/Adc"; }; + const char * getMD5(){ return "6d7853a614e2e821319068311f2af25b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/rosserial_mbed/Test.h b/source/ros-max-lib/ros_lib/rosserial_mbed/Test.h new file mode 100644 index 0000000000000000000000000000000000000000..6a2658fad5970c71bfe524bf281e9de27c96fcb3 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rosserial_mbed/Test.h @@ -0,0 +1,104 @@ +#ifndef _ROS_SERVICE_Test_h +#define _ROS_SERVICE_Test_h +#include +#include +#include +#include "ros/msg.h" + +namespace rosserial_mbed +{ + +static const char TEST[] = "rosserial_mbed/Test"; + + class TestRequest : public ros::Msg + { + public: + typedef const char* _input_type; + _input_type input; + + TestRequest(): + input("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_input = strlen(this->input); + varToArr(outbuffer + offset, length_input); + offset += 4; + memcpy(outbuffer + offset, this->input, length_input); + offset += length_input; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_input; + arrToVar(length_input, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_input; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_input-1]=0; + this->input = (char *)(inbuffer + offset-1); + offset += length_input; + return offset; + } + + const char * getType(){ return TEST; }; + const char * getMD5(){ return "39e92f1778057359c64c7b8a7d7b19de"; }; + + }; + + class TestResponse : public ros::Msg + { + public: + typedef const char* _output_type; + _output_type output; + + TestResponse(): + output("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_output = strlen(this->output); + varToArr(outbuffer + offset, length_output); + offset += 4; + memcpy(outbuffer + offset, this->output, length_output); + offset += length_output; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_output; + arrToVar(length_output, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_output; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_output-1]=0; + this->output = (char *)(inbuffer + offset-1); + offset += length_output; + return offset; + } + + const char * getType(){ return TEST; }; + const char * getMD5(){ return "0825d95fdfa2c8f4bbb4e9c74bccd3fd"; }; + + }; + + class Test { + public: + typedef TestRequest Request; + typedef TestResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/rosserial_msgs/Log.h b/source/ros-max-lib/ros_lib/rosserial_msgs/Log.h new file mode 100644 index 0000000000000000000000000000000000000000..a162ca8e5e1cfa559c69fe29dc61a2b62a58b813 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rosserial_msgs/Log.h @@ -0,0 +1,67 @@ +#ifndef _ROS_rosserial_msgs_Log_h +#define _ROS_rosserial_msgs_Log_h + +#include +#include +#include +#include "../ros/msg.h" + +namespace rosserial_msgs +{ + + class Log : public ros::Msg + { + public: + typedef uint8_t _level_type; + _level_type level; + typedef const char* _msg_type; + _msg_type msg; + enum { ROSDEBUG = 0 }; + enum { INFO = 1 }; + enum { WARN = 2 }; + enum { ERROR = 3 }; + enum { FATAL = 4 }; + + Log(): + level(0), + msg("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->level >> (8 * 0)) & 0xFF; + offset += sizeof(this->level); + uint32_t length_msg = strlen(this->msg); + varToArr(outbuffer + offset, length_msg); + offset += 4; + memcpy(outbuffer + offset, this->msg, length_msg); + offset += length_msg; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->level = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->level); + uint32_t length_msg; + arrToVar(length_msg, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_msg; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_msg-1]=0; + this->msg = (char *)(inbuffer + offset-1); + offset += length_msg; + return offset; + } + + const char * getType(){ return "rosserial_msgs/Log"; }; + const char * getMD5(){ return "11abd731c25933261cd6183bd12d6295"; }; + + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/rosserial_msgs/RequestMessageInfo.h b/source/ros-max-lib/ros_lib/rosserial_msgs/RequestMessageInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..3466ddc463df63b573ca65efdaf125b5d40429ec --- /dev/null +++ b/source/ros-max-lib/ros_lib/rosserial_msgs/RequestMessageInfo.h @@ -0,0 +1,121 @@ +#ifndef _ROS_SERVICE_RequestMessageInfo_h +#define _ROS_SERVICE_RequestMessageInfo_h +#include +#include +#include +#include "ros/msg.h" + +namespace rosserial_msgs +{ + +static const char REQUESTMESSAGEINFO[] = "rosserial_msgs/RequestMessageInfo"; + + class RequestMessageInfoRequest : public ros::Msg + { + public: + typedef const char* _type_type; + _type_type type; + + RequestMessageInfoRequest(): + type("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_type = strlen(this->type); + varToArr(outbuffer + offset, length_type); + offset += 4; + memcpy(outbuffer + offset, this->type, length_type); + offset += length_type; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_type; + arrToVar(length_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_type-1]=0; + this->type = (char *)(inbuffer + offset-1); + offset += length_type; + return offset; + } + + const char * getType(){ return REQUESTMESSAGEINFO; }; + const char * getMD5(){ return "dc67331de85cf97091b7d45e5c64ab75"; }; + + }; + + class RequestMessageInfoResponse : public ros::Msg + { + public: + typedef const char* _md5_type; + _md5_type md5; + typedef const char* _definition_type; + _definition_type definition; + + RequestMessageInfoResponse(): + md5(""), + definition("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_md5 = strlen(this->md5); + varToArr(outbuffer + offset, length_md5); + offset += 4; + memcpy(outbuffer + offset, this->md5, length_md5); + offset += length_md5; + uint32_t length_definition = strlen(this->definition); + varToArr(outbuffer + offset, length_definition); + offset += 4; + memcpy(outbuffer + offset, this->definition, length_definition); + offset += length_definition; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_md5; + arrToVar(length_md5, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_md5; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_md5-1]=0; + this->md5 = (char *)(inbuffer + offset-1); + offset += length_md5; + uint32_t length_definition; + arrToVar(length_definition, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_definition; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_definition-1]=0; + this->definition = (char *)(inbuffer + offset-1); + offset += length_definition; + return offset; + } + + const char * getType(){ return REQUESTMESSAGEINFO; }; + const char * getMD5(){ return "fe452186a069bed40f09b8628fe5eac8"; }; + + }; + + class RequestMessageInfo { + public: + typedef RequestMessageInfoRequest Request; + typedef RequestMessageInfoResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/rosserial_msgs/RequestParam.h b/source/ros-max-lib/ros_lib/rosserial_msgs/RequestParam.h new file mode 100644 index 0000000000000000000000000000000000000000..aaecd13d17f3d223d13e8cfe9180abbeed995712 --- /dev/null +++ b/source/ros-max-lib/ros_lib/rosserial_msgs/RequestParam.h @@ -0,0 +1,212 @@ +#ifndef _ROS_SERVICE_RequestParam_h +#define _ROS_SERVICE_RequestParam_h +#include +#include +#include +#include "../ros/msg.h" + +namespace rosserial_msgs +{ + +static const char REQUESTPARAM[] = "rosserial_msgs/RequestParam"; + + class RequestParamRequest : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + + RequestParamRequest(): + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return REQUESTPARAM; }; + const char * getMD5(){ return "c1f3d28f1b044c871e6eff2e9fc3c667"; }; + + }; + + class RequestParamResponse : public ros::Msg + { + public: + uint32_t ints_length; + typedef int32_t _ints_type; + _ints_type st_ints; + _ints_type * ints; + uint32_t floats_length; + typedef float _floats_type; + _floats_type st_floats; + _floats_type * floats; + uint32_t strings_length; + typedef char* _strings_type; + _strings_type st_strings; + _strings_type * strings; + + RequestParamResponse(): + ints_length(0), ints(NULL), + floats_length(0), floats(NULL), + strings_length(0), strings(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->ints_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->ints_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->ints_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->ints_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->ints_length); + for( uint32_t i = 0; i < ints_length; i++){ + union { + int32_t real; + uint32_t base; + } u_intsi; + u_intsi.real = this->ints[i]; + *(outbuffer + offset + 0) = (u_intsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_intsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_intsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_intsi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->ints[i]); + } + *(outbuffer + offset + 0) = (this->floats_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->floats_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->floats_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->floats_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->floats_length); + for( uint32_t i = 0; i < floats_length; i++){ + union { + float real; + uint32_t base; + } u_floatsi; + u_floatsi.real = this->floats[i]; + *(outbuffer + offset + 0) = (u_floatsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_floatsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_floatsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_floatsi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->floats[i]); + } + *(outbuffer + offset + 0) = (this->strings_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->strings_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->strings_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->strings_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->strings_length); + for( uint32_t i = 0; i < strings_length; i++){ + uint32_t length_stringsi = strlen(this->strings[i]); + varToArr(outbuffer + offset, length_stringsi); + offset += 4; + memcpy(outbuffer + offset, this->strings[i], length_stringsi); + offset += length_stringsi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t ints_lengthT = ((uint32_t) (*(inbuffer + offset))); + ints_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + ints_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + ints_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->ints_length); + if(ints_lengthT > ints_length) + this->ints = (int32_t*)realloc(this->ints, ints_lengthT * sizeof(int32_t)); + ints_length = ints_lengthT; + for( uint32_t i = 0; i < ints_length; i++){ + union { + int32_t real; + uint32_t base; + } u_st_ints; + u_st_ints.base = 0; + u_st_ints.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_ints.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_ints.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_ints.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_ints = u_st_ints.real; + offset += sizeof(this->st_ints); + memcpy( &(this->ints[i]), &(this->st_ints), sizeof(int32_t)); + } + uint32_t floats_lengthT = ((uint32_t) (*(inbuffer + offset))); + floats_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + floats_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + floats_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->floats_length); + if(floats_lengthT > floats_length) + this->floats = (float*)realloc(this->floats, floats_lengthT * sizeof(float)); + floats_length = floats_lengthT; + for( uint32_t i = 0; i < floats_length; i++){ + union { + float real; + uint32_t base; + } u_st_floats; + u_st_floats.base = 0; + u_st_floats.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_floats.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_floats.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_floats.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_floats = u_st_floats.real; + offset += sizeof(this->st_floats); + memcpy( &(this->floats[i]), &(this->st_floats), sizeof(float)); + } + uint32_t strings_lengthT = ((uint32_t) (*(inbuffer + offset))); + strings_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + strings_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + strings_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->strings_length); + if(strings_lengthT > strings_length) + this->strings = (char**)realloc(this->strings, strings_lengthT * sizeof(char*)); + strings_length = strings_lengthT; + for( uint32_t i = 0; i < strings_length; i++){ + uint32_t length_st_strings; + arrToVar(length_st_strings, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_strings; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_strings-1]=0; + this->st_strings = (char *)(inbuffer + offset-1); + offset += length_st_strings; + memcpy( &(this->strings[i]), &(this->st_strings), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return REQUESTPARAM; }; + const char * getMD5(){ return "9f0e98bda65981986ddf53afa7a40e49"; }; + + }; + + class RequestParam { + public: + typedef RequestParamRequest Request; + typedef RequestParamResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/rosserial_msgs/RequestServiceInfo.h b/source/ros-max-lib/ros_lib/rosserial_msgs/RequestServiceInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..b18cf9dbf7303c65a387a0ac622708bc054f96fc --- /dev/null +++ b/source/ros-max-lib/ros_lib/rosserial_msgs/RequestServiceInfo.h @@ -0,0 +1,138 @@ +#ifndef _ROS_SERVICE_RequestServiceInfo_h +#define _ROS_SERVICE_RequestServiceInfo_h +#include +#include +#include +#include "ros/msg.h" + +namespace rosserial_msgs +{ + +static const char REQUESTSERVICEINFO[] = "rosserial_msgs/RequestServiceInfo"; + + class RequestServiceInfoRequest : public ros::Msg + { + public: + typedef const char* _service_type; + _service_type service; + + RequestServiceInfoRequest(): + service("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_service = strlen(this->service); + varToArr(outbuffer + offset, length_service); + offset += 4; + memcpy(outbuffer + offset, this->service, length_service); + offset += length_service; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_service; + arrToVar(length_service, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_service; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_service-1]=0; + this->service = (char *)(inbuffer + offset-1); + offset += length_service; + return offset; + } + + const char * getType(){ return REQUESTSERVICEINFO; }; + const char * getMD5(){ return "1cbcfa13b08f6d36710b9af8741e6112"; }; + + }; + + class RequestServiceInfoResponse : public ros::Msg + { + public: + typedef const char* _service_md5_type; + _service_md5_type service_md5; + typedef const char* _request_md5_type; + _request_md5_type request_md5; + typedef const char* _response_md5_type; + _response_md5_type response_md5; + + RequestServiceInfoResponse(): + service_md5(""), + request_md5(""), + response_md5("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_service_md5 = strlen(this->service_md5); + varToArr(outbuffer + offset, length_service_md5); + offset += 4; + memcpy(outbuffer + offset, this->service_md5, length_service_md5); + offset += length_service_md5; + uint32_t length_request_md5 = strlen(this->request_md5); + varToArr(outbuffer + offset, length_request_md5); + offset += 4; + memcpy(outbuffer + offset, this->request_md5, length_request_md5); + offset += length_request_md5; + uint32_t length_response_md5 = strlen(this->response_md5); + varToArr(outbuffer + offset, length_response_md5); + offset += 4; + memcpy(outbuffer + offset, this->response_md5, length_response_md5); + offset += length_response_md5; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_service_md5; + arrToVar(length_service_md5, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_service_md5; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_service_md5-1]=0; + this->service_md5 = (char *)(inbuffer + offset-1); + offset += length_service_md5; + uint32_t length_request_md5; + arrToVar(length_request_md5, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_request_md5; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_request_md5-1]=0; + this->request_md5 = (char *)(inbuffer + offset-1); + offset += length_request_md5; + uint32_t length_response_md5; + arrToVar(length_response_md5, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_response_md5; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_response_md5-1]=0; + this->response_md5 = (char *)(inbuffer + offset-1); + offset += length_response_md5; + return offset; + } + + const char * getType(){ return REQUESTSERVICEINFO; }; + const char * getMD5(){ return "c3d6dd25b909596479fbbc6559fa6874"; }; + + }; + + class RequestServiceInfo { + public: + typedef RequestServiceInfoRequest Request; + typedef RequestServiceInfoResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/rosserial_msgs/TopicInfo.h b/source/ros-max-lib/ros_lib/rosserial_msgs/TopicInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..987c16105223e25ff1c371cf5eb2c8f76ec6093d --- /dev/null +++ b/source/ros-max-lib/ros_lib/rosserial_msgs/TopicInfo.h @@ -0,0 +1,130 @@ +#ifndef _ROS_rosserial_msgs_TopicInfo_h +#define _ROS_rosserial_msgs_TopicInfo_h + +#include +#include +#include +#include "../ros/msg.h" + +namespace rosserial_msgs +{ + + class TopicInfo : public ros::Msg + { + public: + typedef uint16_t _topic_id_type; + _topic_id_type topic_id; + typedef const char* _topic_name_type; + _topic_name_type topic_name; + typedef const char* _message_type_type; + _message_type_type message_type; + typedef const char* _md5sum_type; + _md5sum_type md5sum; + typedef int32_t _buffer_size_type; + _buffer_size_type buffer_size; + enum { ID_PUBLISHER = 0 }; + enum { ID_SUBSCRIBER = 1 }; + enum { ID_SERVICE_SERVER = 2 }; + enum { ID_SERVICE_CLIENT = 4 }; + enum { ID_PARAMETER_REQUEST = 6 }; + enum { ID_LOG = 7 }; + enum { ID_TIME = 10 }; + enum { ID_TX_STOP = 11 }; + + TopicInfo(): + topic_id(0), + topic_name(""), + message_type(""), + md5sum(""), + buffer_size(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->topic_id >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->topic_id >> (8 * 1)) & 0xFF; + offset += sizeof(this->topic_id); + uint32_t length_topic_name = strlen(this->topic_name); + varToArr(outbuffer + offset, length_topic_name); + offset += 4; + memcpy(outbuffer + offset, this->topic_name, length_topic_name); + offset += length_topic_name; + uint32_t length_message_type = strlen(this->message_type); + varToArr(outbuffer + offset, length_message_type); + offset += 4; + memcpy(outbuffer + offset, this->message_type, length_message_type); + offset += length_message_type; + uint32_t length_md5sum = strlen(this->md5sum); + varToArr(outbuffer + offset, length_md5sum); + offset += 4; + memcpy(outbuffer + offset, this->md5sum, length_md5sum); + offset += length_md5sum; + union { + int32_t real; + uint32_t base; + } u_buffer_size; + u_buffer_size.real = this->buffer_size; + *(outbuffer + offset + 0) = (u_buffer_size.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_buffer_size.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_buffer_size.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_buffer_size.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->buffer_size); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->topic_id = ((uint16_t) (*(inbuffer + offset))); + this->topic_id |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->topic_id); + uint32_t length_topic_name; + arrToVar(length_topic_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic_name-1]=0; + this->topic_name = (char *)(inbuffer + offset-1); + offset += length_topic_name; + uint32_t length_message_type; + arrToVar(length_message_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message_type-1]=0; + this->message_type = (char *)(inbuffer + offset-1); + offset += length_message_type; + uint32_t length_md5sum; + arrToVar(length_md5sum, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_md5sum; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_md5sum-1]=0; + this->md5sum = (char *)(inbuffer + offset-1); + offset += length_md5sum; + union { + int32_t real; + uint32_t base; + } u_buffer_size; + u_buffer_size.base = 0; + u_buffer_size.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_buffer_size.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_buffer_size.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_buffer_size.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->buffer_size = u_buffer_size.real; + offset += sizeof(this->buffer_size); + return offset; + } + + const char * getType(){ return "rosserial_msgs/TopicInfo"; }; + const char * getMD5(){ return "0ad51f88fc44892f8c10684077646005"; }; + + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/BatteryState.h b/source/ros-max-lib/ros_lib/sensor_msgs/BatteryState.h new file mode 100644 index 0000000000000000000000000000000000000000..4e9cba443efd4e2644114d45c9de7a31f4e13d0d --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/BatteryState.h @@ -0,0 +1,326 @@ +#ifndef _ROS_sensor_msgs_BatteryState_h +#define _ROS_sensor_msgs_BatteryState_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class BatteryState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef float _voltage_type; + _voltage_type voltage; + typedef float _current_type; + _current_type current; + typedef float _charge_type; + _charge_type charge; + typedef float _capacity_type; + _capacity_type capacity; + typedef float _design_capacity_type; + _design_capacity_type design_capacity; + typedef float _percentage_type; + _percentage_type percentage; + typedef uint8_t _power_supply_status_type; + _power_supply_status_type power_supply_status; + typedef uint8_t _power_supply_health_type; + _power_supply_health_type power_supply_health; + typedef uint8_t _power_supply_technology_type; + _power_supply_technology_type power_supply_technology; + typedef bool _present_type; + _present_type present; + uint32_t cell_voltage_length; + typedef float _cell_voltage_type; + _cell_voltage_type st_cell_voltage; + _cell_voltage_type * cell_voltage; + typedef const char* _location_type; + _location_type location; + typedef const char* _serial_number_type; + _serial_number_type serial_number; + enum { POWER_SUPPLY_STATUS_UNKNOWN = 0 }; + enum { POWER_SUPPLY_STATUS_CHARGING = 1 }; + enum { POWER_SUPPLY_STATUS_DISCHARGING = 2 }; + enum { POWER_SUPPLY_STATUS_NOT_CHARGING = 3 }; + enum { POWER_SUPPLY_STATUS_FULL = 4 }; + enum { POWER_SUPPLY_HEALTH_UNKNOWN = 0 }; + enum { POWER_SUPPLY_HEALTH_GOOD = 1 }; + enum { POWER_SUPPLY_HEALTH_OVERHEAT = 2 }; + enum { POWER_SUPPLY_HEALTH_DEAD = 3 }; + enum { POWER_SUPPLY_HEALTH_OVERVOLTAGE = 4 }; + enum { POWER_SUPPLY_HEALTH_UNSPEC_FAILURE = 5 }; + enum { POWER_SUPPLY_HEALTH_COLD = 6 }; + enum { POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE = 7 }; + enum { POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE = 8 }; + enum { POWER_SUPPLY_TECHNOLOGY_UNKNOWN = 0 }; + enum { POWER_SUPPLY_TECHNOLOGY_NIMH = 1 }; + enum { POWER_SUPPLY_TECHNOLOGY_LION = 2 }; + enum { POWER_SUPPLY_TECHNOLOGY_LIPO = 3 }; + enum { POWER_SUPPLY_TECHNOLOGY_LIFE = 4 }; + enum { POWER_SUPPLY_TECHNOLOGY_NICD = 5 }; + enum { POWER_SUPPLY_TECHNOLOGY_LIMN = 6 }; + + BatteryState(): + header(), + voltage(0), + current(0), + charge(0), + capacity(0), + design_capacity(0), + percentage(0), + power_supply_status(0), + power_supply_health(0), + power_supply_technology(0), + present(0), + cell_voltage_length(0), cell_voltage(NULL), + location(""), + serial_number("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_voltage; + u_voltage.real = this->voltage; + *(outbuffer + offset + 0) = (u_voltage.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_voltage.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_voltage.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_voltage.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->voltage); + union { + float real; + uint32_t base; + } u_current; + u_current.real = this->current; + *(outbuffer + offset + 0) = (u_current.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_current.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_current.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_current.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->current); + union { + float real; + uint32_t base; + } u_charge; + u_charge.real = this->charge; + *(outbuffer + offset + 0) = (u_charge.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_charge.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_charge.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_charge.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->charge); + union { + float real; + uint32_t base; + } u_capacity; + u_capacity.real = this->capacity; + *(outbuffer + offset + 0) = (u_capacity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_capacity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_capacity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_capacity.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->capacity); + union { + float real; + uint32_t base; + } u_design_capacity; + u_design_capacity.real = this->design_capacity; + *(outbuffer + offset + 0) = (u_design_capacity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_design_capacity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_design_capacity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_design_capacity.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->design_capacity); + union { + float real; + uint32_t base; + } u_percentage; + u_percentage.real = this->percentage; + *(outbuffer + offset + 0) = (u_percentage.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_percentage.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_percentage.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_percentage.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->percentage); + *(outbuffer + offset + 0) = (this->power_supply_status >> (8 * 0)) & 0xFF; + offset += sizeof(this->power_supply_status); + *(outbuffer + offset + 0) = (this->power_supply_health >> (8 * 0)) & 0xFF; + offset += sizeof(this->power_supply_health); + *(outbuffer + offset + 0) = (this->power_supply_technology >> (8 * 0)) & 0xFF; + offset += sizeof(this->power_supply_technology); + union { + bool real; + uint8_t base; + } u_present; + u_present.real = this->present; + *(outbuffer + offset + 0) = (u_present.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->present); + *(outbuffer + offset + 0) = (this->cell_voltage_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->cell_voltage_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->cell_voltage_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->cell_voltage_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->cell_voltage_length); + for( uint32_t i = 0; i < cell_voltage_length; i++){ + union { + float real; + uint32_t base; + } u_cell_voltagei; + u_cell_voltagei.real = this->cell_voltage[i]; + *(outbuffer + offset + 0) = (u_cell_voltagei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_cell_voltagei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_cell_voltagei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_cell_voltagei.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->cell_voltage[i]); + } + uint32_t length_location = strlen(this->location); + varToArr(outbuffer + offset, length_location); + offset += 4; + memcpy(outbuffer + offset, this->location, length_location); + offset += length_location; + uint32_t length_serial_number = strlen(this->serial_number); + varToArr(outbuffer + offset, length_serial_number); + offset += 4; + memcpy(outbuffer + offset, this->serial_number, length_serial_number); + offset += length_serial_number; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_voltage; + u_voltage.base = 0; + u_voltage.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_voltage.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_voltage.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_voltage.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->voltage = u_voltage.real; + offset += sizeof(this->voltage); + union { + float real; + uint32_t base; + } u_current; + u_current.base = 0; + u_current.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_current.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_current.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_current.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->current = u_current.real; + offset += sizeof(this->current); + union { + float real; + uint32_t base; + } u_charge; + u_charge.base = 0; + u_charge.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_charge.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_charge.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_charge.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->charge = u_charge.real; + offset += sizeof(this->charge); + union { + float real; + uint32_t base; + } u_capacity; + u_capacity.base = 0; + u_capacity.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_capacity.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_capacity.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_capacity.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->capacity = u_capacity.real; + offset += sizeof(this->capacity); + union { + float real; + uint32_t base; + } u_design_capacity; + u_design_capacity.base = 0; + u_design_capacity.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_design_capacity.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_design_capacity.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_design_capacity.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->design_capacity = u_design_capacity.real; + offset += sizeof(this->design_capacity); + union { + float real; + uint32_t base; + } u_percentage; + u_percentage.base = 0; + u_percentage.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_percentage.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_percentage.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_percentage.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->percentage = u_percentage.real; + offset += sizeof(this->percentage); + this->power_supply_status = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->power_supply_status); + this->power_supply_health = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->power_supply_health); + this->power_supply_technology = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->power_supply_technology); + union { + bool real; + uint8_t base; + } u_present; + u_present.base = 0; + u_present.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->present = u_present.real; + offset += sizeof(this->present); + uint32_t cell_voltage_lengthT = ((uint32_t) (*(inbuffer + offset))); + cell_voltage_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + cell_voltage_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + cell_voltage_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->cell_voltage_length); + if(cell_voltage_lengthT > cell_voltage_length) + this->cell_voltage = (float*)realloc(this->cell_voltage, cell_voltage_lengthT * sizeof(float)); + cell_voltage_length = cell_voltage_lengthT; + for( uint32_t i = 0; i < cell_voltage_length; i++){ + union { + float real; + uint32_t base; + } u_st_cell_voltage; + u_st_cell_voltage.base = 0; + u_st_cell_voltage.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_cell_voltage.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_cell_voltage.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_cell_voltage.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_cell_voltage = u_st_cell_voltage.real; + offset += sizeof(this->st_cell_voltage); + memcpy( &(this->cell_voltage[i]), &(this->st_cell_voltage), sizeof(float)); + } + uint32_t length_location; + arrToVar(length_location, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_location; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_location-1]=0; + this->location = (char *)(inbuffer + offset-1); + offset += length_location; + uint32_t length_serial_number; + arrToVar(length_serial_number, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_serial_number; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_serial_number-1]=0; + this->serial_number = (char *)(inbuffer + offset-1); + offset += length_serial_number; + return offset; + } + + const char * getType(){ return "sensor_msgs/BatteryState"; }; + const char * getMD5(){ return "476f837fa6771f6e16e3bf4ef96f8770"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/CameraInfo.h b/source/ros-max-lib/ros_lib/sensor_msgs/CameraInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..5bd1c7d0f7009f851b0d92fa837752575de5c78d --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/CameraInfo.h @@ -0,0 +1,276 @@ +#ifndef _ROS_sensor_msgs_CameraInfo_h +#define _ROS_sensor_msgs_CameraInfo_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/RegionOfInterest.h" + +namespace sensor_msgs +{ + + class CameraInfo : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef uint32_t _height_type; + _height_type height; + typedef uint32_t _width_type; + _width_type width; + typedef const char* _distortion_model_type; + _distortion_model_type distortion_model; + uint32_t D_length; + typedef double _D_type; + _D_type st_D; + _D_type * D; + double K[9]; + double R[9]; + double P[12]; + typedef uint32_t _binning_x_type; + _binning_x_type binning_x; + typedef uint32_t _binning_y_type; + _binning_y_type binning_y; + typedef sensor_msgs::RegionOfInterest _roi_type; + _roi_type roi; + + CameraInfo(): + header(), + height(0), + width(0), + distortion_model(""), + D_length(0), D(NULL), + K(), + R(), + P(), + binning_x(0), + binning_y(0), + roi() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF; + offset += sizeof(this->height); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF; + offset += sizeof(this->width); + uint32_t length_distortion_model = strlen(this->distortion_model); + varToArr(outbuffer + offset, length_distortion_model); + offset += 4; + memcpy(outbuffer + offset, this->distortion_model, length_distortion_model); + offset += length_distortion_model; + *(outbuffer + offset + 0) = (this->D_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->D_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->D_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->D_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->D_length); + for( uint32_t i = 0; i < D_length; i++){ + union { + double real; + uint64_t base; + } u_Di; + u_Di.real = this->D[i]; + *(outbuffer + offset + 0) = (u_Di.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_Di.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_Di.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_Di.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_Di.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_Di.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_Di.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_Di.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->D[i]); + } + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_Ki; + u_Ki.real = this->K[i]; + *(outbuffer + offset + 0) = (u_Ki.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_Ki.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_Ki.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_Ki.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_Ki.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_Ki.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_Ki.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_Ki.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->K[i]); + } + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_Ri; + u_Ri.real = this->R[i]; + *(outbuffer + offset + 0) = (u_Ri.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_Ri.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_Ri.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_Ri.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_Ri.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_Ri.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_Ri.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_Ri.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->R[i]); + } + for( uint32_t i = 0; i < 12; i++){ + union { + double real; + uint64_t base; + } u_Pi; + u_Pi.real = this->P[i]; + *(outbuffer + offset + 0) = (u_Pi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_Pi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_Pi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_Pi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_Pi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_Pi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_Pi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_Pi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->P[i]); + } + *(outbuffer + offset + 0) = (this->binning_x >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->binning_x >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->binning_x >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->binning_x >> (8 * 3)) & 0xFF; + offset += sizeof(this->binning_x); + *(outbuffer + offset + 0) = (this->binning_y >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->binning_y >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->binning_y >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->binning_y >> (8 * 3)) & 0xFF; + offset += sizeof(this->binning_y); + offset += this->roi.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->height = ((uint32_t) (*(inbuffer + offset))); + this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->height); + this->width = ((uint32_t) (*(inbuffer + offset))); + this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->width); + uint32_t length_distortion_model; + arrToVar(length_distortion_model, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_distortion_model; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_distortion_model-1]=0; + this->distortion_model = (char *)(inbuffer + offset-1); + offset += length_distortion_model; + uint32_t D_lengthT = ((uint32_t) (*(inbuffer + offset))); + D_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + D_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + D_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->D_length); + if(D_lengthT > D_length) + this->D = (double*)realloc(this->D, D_lengthT * sizeof(double)); + D_length = D_lengthT; + for( uint32_t i = 0; i < D_length; i++){ + union { + double real; + uint64_t base; + } u_st_D; + u_st_D.base = 0; + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_D = u_st_D.real; + offset += sizeof(this->st_D); + memcpy( &(this->D[i]), &(this->st_D), sizeof(double)); + } + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_Ki; + u_Ki.base = 0; + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->K[i] = u_Ki.real; + offset += sizeof(this->K[i]); + } + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_Ri; + u_Ri.base = 0; + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->R[i] = u_Ri.real; + offset += sizeof(this->R[i]); + } + for( uint32_t i = 0; i < 12; i++){ + union { + double real; + uint64_t base; + } u_Pi; + u_Pi.base = 0; + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->P[i] = u_Pi.real; + offset += sizeof(this->P[i]); + } + this->binning_x = ((uint32_t) (*(inbuffer + offset))); + this->binning_x |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->binning_x |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->binning_x |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->binning_x); + this->binning_y = ((uint32_t) (*(inbuffer + offset))); + this->binning_y |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->binning_y |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->binning_y |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->binning_y); + offset += this->roi.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "sensor_msgs/CameraInfo"; }; + const char * getMD5(){ return "c9a58c1b0b154e0e6da7578cb991d214"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/ChannelFloat32.h b/source/ros-max-lib/ros_lib/sensor_msgs/ChannelFloat32.h new file mode 100644 index 0000000000000000000000000000000000000000..c5c433d0955ee12593cbeeed9feeed55b64de93e --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/ChannelFloat32.h @@ -0,0 +1,99 @@ +#ifndef _ROS_sensor_msgs_ChannelFloat32_h +#define _ROS_sensor_msgs_ChannelFloat32_h + +#include +#include +#include +#include "ros/msg.h" + +namespace sensor_msgs +{ + + class ChannelFloat32 : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + uint32_t values_length; + typedef float _values_type; + _values_type st_values; + _values_type * values; + + ChannelFloat32(): + name(""), + values_length(0), values(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + *(outbuffer + offset + 0) = (this->values_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->values_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->values_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->values_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->values_length); + for( uint32_t i = 0; i < values_length; i++){ + union { + float real; + uint32_t base; + } u_valuesi; + u_valuesi.real = this->values[i]; + *(outbuffer + offset + 0) = (u_valuesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_valuesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_valuesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_valuesi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->values[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t values_lengthT = ((uint32_t) (*(inbuffer + offset))); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + values_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->values_length); + if(values_lengthT > values_length) + this->values = (float*)realloc(this->values, values_lengthT * sizeof(float)); + values_length = values_lengthT; + for( uint32_t i = 0; i < values_length; i++){ + union { + float real; + uint32_t base; + } u_st_values; + u_st_values.base = 0; + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_values.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_values = u_st_values.real; + offset += sizeof(this->st_values); + memcpy( &(this->values[i]), &(this->st_values), sizeof(float)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/ChannelFloat32"; }; + const char * getMD5(){ return "3d40139cdd33dfedcb71ffeeeb42ae7f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/CompressedImage.h b/source/ros-max-lib/ros_lib/sensor_msgs/CompressedImage.h new file mode 100644 index 0000000000000000000000000000000000000000..a11f62cb0a9f26464f20eea8d37a2e19a8bc70ed --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/CompressedImage.h @@ -0,0 +1,88 @@ +#ifndef _ROS_sensor_msgs_CompressedImage_h +#define _ROS_sensor_msgs_CompressedImage_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class CompressedImage : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _format_type; + _format_type format; + uint32_t data_length; + typedef uint8_t _data_type; + _data_type st_data; + _data_type * data; + + CompressedImage(): + header(), + format(""), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_format = strlen(this->format); + varToArr(outbuffer + offset, length_format); + offset += 4; + memcpy(outbuffer + offset, this->format, length_format); + offset += length_format; + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_format; + arrToVar(length_format, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_format; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_format-1]=0; + this->format = (char *)(inbuffer + offset-1); + offset += length_format; + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint8_t*)realloc(this->data, data_lengthT * sizeof(uint8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint8_t)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/CompressedImage"; }; + const char * getMD5(){ return "8f7a12909da2c9d3332d540a0977563f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/FluidPressure.h b/source/ros-max-lib/ros_lib/sensor_msgs/FluidPressure.h new file mode 100644 index 0000000000000000000000000000000000000000..3df5165ba51be21aa37a946e1e935c3a5e3dabae --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/FluidPressure.h @@ -0,0 +1,108 @@ +#ifndef _ROS_sensor_msgs_FluidPressure_h +#define _ROS_sensor_msgs_FluidPressure_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class FluidPressure : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef double _fluid_pressure_type; + _fluid_pressure_type fluid_pressure; + typedef double _variance_type; + _variance_type variance; + + FluidPressure(): + header(), + fluid_pressure(0), + variance(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_fluid_pressure; + u_fluid_pressure.real = this->fluid_pressure; + *(outbuffer + offset + 0) = (u_fluid_pressure.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_fluid_pressure.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_fluid_pressure.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_fluid_pressure.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_fluid_pressure.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_fluid_pressure.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_fluid_pressure.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_fluid_pressure.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->fluid_pressure); + union { + double real; + uint64_t base; + } u_variance; + u_variance.real = this->variance; + *(outbuffer + offset + 0) = (u_variance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_variance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_variance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_variance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_variance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_variance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_variance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_variance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->variance); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_fluid_pressure; + u_fluid_pressure.base = 0; + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_fluid_pressure.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->fluid_pressure = u_fluid_pressure.real; + offset += sizeof(this->fluid_pressure); + union { + double real; + uint64_t base; + } u_variance; + u_variance.base = 0; + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->variance = u_variance.real; + offset += sizeof(this->variance); + return offset; + } + + const char * getType(){ return "sensor_msgs/FluidPressure"; }; + const char * getMD5(){ return "804dc5cea1c5306d6a2eb80b9833befe"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/Illuminance.h b/source/ros-max-lib/ros_lib/sensor_msgs/Illuminance.h new file mode 100644 index 0000000000000000000000000000000000000000..d6fbb2cd1a4759faadb228357f7e00126bf5f2b4 --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/Illuminance.h @@ -0,0 +1,108 @@ +#ifndef _ROS_sensor_msgs_Illuminance_h +#define _ROS_sensor_msgs_Illuminance_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class Illuminance : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef double _illuminance_type; + _illuminance_type illuminance; + typedef double _variance_type; + _variance_type variance; + + Illuminance(): + header(), + illuminance(0), + variance(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_illuminance; + u_illuminance.real = this->illuminance; + *(outbuffer + offset + 0) = (u_illuminance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_illuminance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_illuminance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_illuminance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_illuminance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_illuminance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_illuminance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_illuminance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->illuminance); + union { + double real; + uint64_t base; + } u_variance; + u_variance.real = this->variance; + *(outbuffer + offset + 0) = (u_variance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_variance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_variance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_variance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_variance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_variance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_variance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_variance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->variance); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_illuminance; + u_illuminance.base = 0; + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_illuminance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->illuminance = u_illuminance.real; + offset += sizeof(this->illuminance); + union { + double real; + uint64_t base; + } u_variance; + u_variance.base = 0; + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->variance = u_variance.real; + offset += sizeof(this->variance); + return offset; + } + + const char * getType(){ return "sensor_msgs/Illuminance"; }; + const char * getMD5(){ return "8cf5febb0952fca9d650c3d11a81a188"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/Image.h b/source/ros-max-lib/ros_lib/sensor_msgs/Image.h new file mode 100644 index 0000000000000000000000000000000000000000..15842a3a734170d22be223a8886c8d8f605b4fb0 --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/Image.h @@ -0,0 +1,134 @@ +#ifndef _ROS_sensor_msgs_Image_h +#define _ROS_sensor_msgs_Image_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class Image : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef uint32_t _height_type; + _height_type height; + typedef uint32_t _width_type; + _width_type width; + typedef const char* _encoding_type; + _encoding_type encoding; + typedef uint8_t _is_bigendian_type; + _is_bigendian_type is_bigendian; + typedef uint32_t _step_type; + _step_type step; + uint32_t data_length; + typedef uint8_t _data_type; + _data_type st_data; + _data_type * data; + + Image(): + header(), + height(0), + width(0), + encoding(""), + is_bigendian(0), + step(0), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF; + offset += sizeof(this->height); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF; + offset += sizeof(this->width); + uint32_t length_encoding = strlen(this->encoding); + varToArr(outbuffer + offset, length_encoding); + offset += 4; + memcpy(outbuffer + offset, this->encoding, length_encoding); + offset += length_encoding; + *(outbuffer + offset + 0) = (this->is_bigendian >> (8 * 0)) & 0xFF; + offset += sizeof(this->is_bigendian); + *(outbuffer + offset + 0) = (this->step >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->step >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->step >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->step >> (8 * 3)) & 0xFF; + offset += sizeof(this->step); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->height = ((uint32_t) (*(inbuffer + offset))); + this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->height); + this->width = ((uint32_t) (*(inbuffer + offset))); + this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->width); + uint32_t length_encoding; + arrToVar(length_encoding, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_encoding; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_encoding-1]=0; + this->encoding = (char *)(inbuffer + offset-1); + offset += length_encoding; + this->is_bigendian = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->is_bigendian); + this->step = ((uint32_t) (*(inbuffer + offset))); + this->step |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->step |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->step |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->step); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint8_t*)realloc(this->data, data_lengthT * sizeof(uint8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint8_t)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/Image"; }; + const char * getMD5(){ return "060021388200f6f0f447d0fcd9c64743"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/Imu.h b/source/ros-max-lib/ros_lib/sensor_msgs/Imu.h new file mode 100644 index 0000000000000000000000000000000000000000..c18b5835d3a1839d633380d62ab632fc924d7138 --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/Imu.h @@ -0,0 +1,166 @@ +#ifndef _ROS_sensor_msgs_Imu_h +#define _ROS_sensor_msgs_Imu_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../std_msgs/Header.h" +#include "../geometry_msgs/Quaternion.h" +#include "../geometry_msgs/Vector3.h" + +namespace sensor_msgs +{ + + class Imu : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Quaternion _orientation_type; + _orientation_type orientation; + double orientation_covariance[9]; + typedef geometry_msgs::Vector3 _angular_velocity_type; + _angular_velocity_type angular_velocity; + double angular_velocity_covariance[9]; + typedef geometry_msgs::Vector3 _linear_acceleration_type; + _linear_acceleration_type linear_acceleration; + double linear_acceleration_covariance[9]; + + Imu(): + header(), + orientation(), + orientation_covariance(), + angular_velocity(), + angular_velocity_covariance(), + linear_acceleration(), + linear_acceleration_covariance() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->orientation.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_orientation_covariancei; + u_orientation_covariancei.real = this->orientation_covariance[i]; + *(outbuffer + offset + 0) = (u_orientation_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_orientation_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_orientation_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_orientation_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_orientation_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_orientation_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_orientation_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_orientation_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->orientation_covariance[i]); + } + offset += this->angular_velocity.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_angular_velocity_covariancei; + u_angular_velocity_covariancei.real = this->angular_velocity_covariance[i]; + *(outbuffer + offset + 0) = (u_angular_velocity_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angular_velocity_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angular_velocity_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angular_velocity_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_angular_velocity_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_angular_velocity_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_angular_velocity_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_angular_velocity_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->angular_velocity_covariance[i]); + } + offset += this->linear_acceleration.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_linear_acceleration_covariancei; + u_linear_acceleration_covariancei.real = this->linear_acceleration_covariance[i]; + *(outbuffer + offset + 0) = (u_linear_acceleration_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_linear_acceleration_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_linear_acceleration_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_linear_acceleration_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_linear_acceleration_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_linear_acceleration_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_linear_acceleration_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_linear_acceleration_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->linear_acceleration_covariance[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->orientation.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_orientation_covariancei; + u_orientation_covariancei.base = 0; + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_orientation_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->orientation_covariance[i] = u_orientation_covariancei.real; + offset += sizeof(this->orientation_covariance[i]); + } + offset += this->angular_velocity.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_angular_velocity_covariancei; + u_angular_velocity_covariancei.base = 0; + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_angular_velocity_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->angular_velocity_covariance[i] = u_angular_velocity_covariancei.real; + offset += sizeof(this->angular_velocity_covariance[i]); + } + offset += this->linear_acceleration.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_linear_acceleration_covariancei; + u_linear_acceleration_covariancei.base = 0; + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_linear_acceleration_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->linear_acceleration_covariance[i] = u_linear_acceleration_covariancei.real; + offset += sizeof(this->linear_acceleration_covariance[i]); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/Imu"; }; + const char * getMD5(){ return "6a62c6daae103f4ff57a132d6f95cec2"; }; + + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/JointState.h b/source/ros-max-lib/ros_lib/sensor_msgs/JointState.h new file mode 100644 index 0000000000000000000000000000000000000000..6195757e3b6eb2a53e0103703239eacf8e826080 --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/JointState.h @@ -0,0 +1,237 @@ +#ifndef _ROS_sensor_msgs_JointState_h +#define _ROS_sensor_msgs_JointState_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../std_msgs/Header.h" + +namespace sensor_msgs +{ + + class JointState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t name_length; + typedef char* _name_type; + _name_type st_name; + _name_type * name; + uint32_t position_length; + typedef double _position_type; + _position_type st_position; + _position_type * position; + uint32_t velocity_length; + typedef double _velocity_type; + _velocity_type st_velocity; + _velocity_type * velocity; + uint32_t effort_length; + typedef double _effort_type; + _effort_type st_effort; + _effort_type * effort; + + JointState(): + header(), + name_length(0), name(NULL), + position_length(0), position(NULL), + velocity_length(0), velocity(NULL), + effort_length(0), effort(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->name_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->name_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->name_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->name_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->name_length); + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_namei = strlen(this->name[i]); + varToArr(outbuffer + offset, length_namei); + offset += 4; + memcpy(outbuffer + offset, this->name[i], length_namei); + offset += length_namei; + } + *(outbuffer + offset + 0) = (this->position_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->position_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->position_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->position_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->position_length); + for( uint32_t i = 0; i < position_length; i++){ + union { + double real; + uint64_t base; + } u_positioni; + u_positioni.real = this->position[i]; + *(outbuffer + offset + 0) = (u_positioni.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_positioni.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_positioni.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_positioni.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_positioni.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_positioni.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_positioni.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_positioni.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position[i]); + } + *(outbuffer + offset + 0) = (this->velocity_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->velocity_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->velocity_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->velocity_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->velocity_length); + for( uint32_t i = 0; i < velocity_length; i++){ + union { + double real; + uint64_t base; + } u_velocityi; + u_velocityi.real = this->velocity[i]; + *(outbuffer + offset + 0) = (u_velocityi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_velocityi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_velocityi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_velocityi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_velocityi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_velocityi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_velocityi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_velocityi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->velocity[i]); + } + *(outbuffer + offset + 0) = (this->effort_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->effort_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->effort_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->effort_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->effort_length); + for( uint32_t i = 0; i < effort_length; i++){ + union { + double real; + uint64_t base; + } u_efforti; + u_efforti.real = this->effort[i]; + *(outbuffer + offset + 0) = (u_efforti.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_efforti.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_efforti.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_efforti.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_efforti.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_efforti.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_efforti.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_efforti.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->effort[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t name_lengthT = ((uint32_t) (*(inbuffer + offset))); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + name_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->name_length); + if(name_lengthT > name_length) + this->name = (char**)realloc(this->name, name_lengthT * sizeof(char*)); + name_length = name_lengthT; + for( uint32_t i = 0; i < name_length; i++){ + uint32_t length_st_name; + arrToVar(length_st_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_name-1]=0; + this->st_name = (char *)(inbuffer + offset-1); + offset += length_st_name; + memcpy( &(this->name[i]), &(this->st_name), sizeof(char*)); + } + uint32_t position_lengthT = ((uint32_t) (*(inbuffer + offset))); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + position_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->position_length); + if(position_lengthT > position_length) + this->position = (double*)realloc(this->position, position_lengthT * sizeof(double)); + position_length = position_lengthT; + for( uint32_t i = 0; i < position_length; i++){ + union { + double real; + uint64_t base; + } u_st_position; + u_st_position.base = 0; + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_position = u_st_position.real; + offset += sizeof(this->st_position); + memcpy( &(this->position[i]), &(this->st_position), sizeof(double)); + } + uint32_t velocity_lengthT = ((uint32_t) (*(inbuffer + offset))); + velocity_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + velocity_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + velocity_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->velocity_length); + if(velocity_lengthT > velocity_length) + this->velocity = (double*)realloc(this->velocity, velocity_lengthT * sizeof(double)); + velocity_length = velocity_lengthT; + for( uint32_t i = 0; i < velocity_length; i++){ + union { + double real; + uint64_t base; + } u_st_velocity; + u_st_velocity.base = 0; + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_velocity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_velocity = u_st_velocity.real; + offset += sizeof(this->st_velocity); + memcpy( &(this->velocity[i]), &(this->st_velocity), sizeof(double)); + } + uint32_t effort_lengthT = ((uint32_t) (*(inbuffer + offset))); + effort_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + effort_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + effort_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->effort_length); + if(effort_lengthT > effort_length) + this->effort = (double*)realloc(this->effort, effort_lengthT * sizeof(double)); + effort_length = effort_lengthT; + for( uint32_t i = 0; i < effort_length; i++){ + union { + double real; + uint64_t base; + } u_st_effort; + u_st_effort.base = 0; + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_effort = u_st_effort.real; + offset += sizeof(this->st_effort); + memcpy( &(this->effort[i]), &(this->st_effort), sizeof(double)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/JointState"; }; + const char * getMD5(){ return "3066dcd76a6cfaef579bd0f34173e9fd"; }; + + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/Joy.h b/source/ros-max-lib/ros_lib/sensor_msgs/Joy.h new file mode 100644 index 0000000000000000000000000000000000000000..bd56d41028b363cbaa6ca7a391e3d768fab45de7 --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/Joy.h @@ -0,0 +1,132 @@ +#ifndef _ROS_sensor_msgs_Joy_h +#define _ROS_sensor_msgs_Joy_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class Joy : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t axes_length; + typedef float _axes_type; + _axes_type st_axes; + _axes_type * axes; + uint32_t buttons_length; + typedef int32_t _buttons_type; + _buttons_type st_buttons; + _buttons_type * buttons; + + Joy(): + header(), + axes_length(0), axes(NULL), + buttons_length(0), buttons(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->axes_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->axes_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->axes_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->axes_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->axes_length); + for( uint32_t i = 0; i < axes_length; i++){ + union { + float real; + uint32_t base; + } u_axesi; + u_axesi.real = this->axes[i]; + *(outbuffer + offset + 0) = (u_axesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_axesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_axesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_axesi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->axes[i]); + } + *(outbuffer + offset + 0) = (this->buttons_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->buttons_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->buttons_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->buttons_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->buttons_length); + for( uint32_t i = 0; i < buttons_length; i++){ + union { + int32_t real; + uint32_t base; + } u_buttonsi; + u_buttonsi.real = this->buttons[i]; + *(outbuffer + offset + 0) = (u_buttonsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_buttonsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_buttonsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_buttonsi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->buttons[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t axes_lengthT = ((uint32_t) (*(inbuffer + offset))); + axes_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + axes_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + axes_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->axes_length); + if(axes_lengthT > axes_length) + this->axes = (float*)realloc(this->axes, axes_lengthT * sizeof(float)); + axes_length = axes_lengthT; + for( uint32_t i = 0; i < axes_length; i++){ + union { + float real; + uint32_t base; + } u_st_axes; + u_st_axes.base = 0; + u_st_axes.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_axes.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_axes.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_axes.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_axes = u_st_axes.real; + offset += sizeof(this->st_axes); + memcpy( &(this->axes[i]), &(this->st_axes), sizeof(float)); + } + uint32_t buttons_lengthT = ((uint32_t) (*(inbuffer + offset))); + buttons_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + buttons_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + buttons_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->buttons_length); + if(buttons_lengthT > buttons_length) + this->buttons = (int32_t*)realloc(this->buttons, buttons_lengthT * sizeof(int32_t)); + buttons_length = buttons_lengthT; + for( uint32_t i = 0; i < buttons_length; i++){ + union { + int32_t real; + uint32_t base; + } u_st_buttons; + u_st_buttons.base = 0; + u_st_buttons.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_buttons.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_buttons.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_buttons.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_buttons = u_st_buttons.real; + offset += sizeof(this->st_buttons); + memcpy( &(this->buttons[i]), &(this->st_buttons), sizeof(int32_t)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/Joy"; }; + const char * getMD5(){ return "5a9ea5f83505693b71e785041e67a8bb"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/JoyFeedback.h b/source/ros-max-lib/ros_lib/sensor_msgs/JoyFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..7a129935146da1651dfbb596810ce31ed5eb36ae --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/JoyFeedback.h @@ -0,0 +1,79 @@ +#ifndef _ROS_sensor_msgs_JoyFeedback_h +#define _ROS_sensor_msgs_JoyFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace sensor_msgs +{ + + class JoyFeedback : public ros::Msg + { + public: + typedef uint8_t _type_type; + _type_type type; + typedef uint8_t _id_type; + _id_type id; + typedef float _intensity_type; + _intensity_type intensity; + enum { TYPE_LED = 0 }; + enum { TYPE_RUMBLE = 1 }; + enum { TYPE_BUZZER = 2 }; + + JoyFeedback(): + type(0), + id(0), + intensity(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->type >> (8 * 0)) & 0xFF; + offset += sizeof(this->type); + *(outbuffer + offset + 0) = (this->id >> (8 * 0)) & 0xFF; + offset += sizeof(this->id); + union { + float real; + uint32_t base; + } u_intensity; + u_intensity.real = this->intensity; + *(outbuffer + offset + 0) = (u_intensity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_intensity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_intensity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_intensity.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->intensity); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->type); + this->id = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->id); + union { + float real; + uint32_t base; + } u_intensity; + u_intensity.base = 0; + u_intensity.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_intensity.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_intensity.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_intensity.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->intensity = u_intensity.real; + offset += sizeof(this->intensity); + return offset; + } + + const char * getType(){ return "sensor_msgs/JoyFeedback"; }; + const char * getMD5(){ return "f4dcd73460360d98f36e55ee7f2e46f1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/JoyFeedbackArray.h b/source/ros-max-lib/ros_lib/sensor_msgs/JoyFeedbackArray.h new file mode 100644 index 0000000000000000000000000000000000000000..8fe80646273d4242839bc8d1da965ac83f9603cb --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/JoyFeedbackArray.h @@ -0,0 +1,64 @@ +#ifndef _ROS_sensor_msgs_JoyFeedbackArray_h +#define _ROS_sensor_msgs_JoyFeedbackArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "sensor_msgs/JoyFeedback.h" + +namespace sensor_msgs +{ + + class JoyFeedbackArray : public ros::Msg + { + public: + uint32_t array_length; + typedef sensor_msgs::JoyFeedback _array_type; + _array_type st_array; + _array_type * array; + + JoyFeedbackArray(): + array_length(0), array(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->array_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->array_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->array_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->array_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->array_length); + for( uint32_t i = 0; i < array_length; i++){ + offset += this->array[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t array_lengthT = ((uint32_t) (*(inbuffer + offset))); + array_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + array_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + array_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->array_length); + if(array_lengthT > array_length) + this->array = (sensor_msgs::JoyFeedback*)realloc(this->array, array_lengthT * sizeof(sensor_msgs::JoyFeedback)); + array_length = array_lengthT; + for( uint32_t i = 0; i < array_length; i++){ + offset += this->st_array.deserialize(inbuffer + offset); + memcpy( &(this->array[i]), &(this->st_array), sizeof(sensor_msgs::JoyFeedback)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/JoyFeedbackArray"; }; + const char * getMD5(){ return "cde5730a895b1fc4dee6f91b754b213d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/LaserEcho.h b/source/ros-max-lib/ros_lib/sensor_msgs/LaserEcho.h new file mode 100644 index 0000000000000000000000000000000000000000..b8f4c49c8df3f4466c58bdec9ff5e5f90f5b79e7 --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/LaserEcho.h @@ -0,0 +1,82 @@ +#ifndef _ROS_sensor_msgs_LaserEcho_h +#define _ROS_sensor_msgs_LaserEcho_h + +#include +#include +#include +#include "ros/msg.h" + +namespace sensor_msgs +{ + + class LaserEcho : public ros::Msg + { + public: + uint32_t echoes_length; + typedef float _echoes_type; + _echoes_type st_echoes; + _echoes_type * echoes; + + LaserEcho(): + echoes_length(0), echoes(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->echoes_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->echoes_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->echoes_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->echoes_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->echoes_length); + for( uint32_t i = 0; i < echoes_length; i++){ + union { + float real; + uint32_t base; + } u_echoesi; + u_echoesi.real = this->echoes[i]; + *(outbuffer + offset + 0) = (u_echoesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_echoesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_echoesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_echoesi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->echoes[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t echoes_lengthT = ((uint32_t) (*(inbuffer + offset))); + echoes_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + echoes_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + echoes_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->echoes_length); + if(echoes_lengthT > echoes_length) + this->echoes = (float*)realloc(this->echoes, echoes_lengthT * sizeof(float)); + echoes_length = echoes_lengthT; + for( uint32_t i = 0; i < echoes_length; i++){ + union { + float real; + uint32_t base; + } u_st_echoes; + u_st_echoes.base = 0; + u_st_echoes.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_echoes.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_echoes.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_echoes.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_echoes = u_st_echoes.real; + offset += sizeof(this->st_echoes); + memcpy( &(this->echoes[i]), &(this->st_echoes), sizeof(float)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/LaserEcho"; }; + const char * getMD5(){ return "8bc5ae449b200fba4d552b4225586696"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/LaserScan.h b/source/ros-max-lib/ros_lib/sensor_msgs/LaserScan.h new file mode 100644 index 0000000000000000000000000000000000000000..203e73939a1d8429cfc89737b0cef8ba87c85584 --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/LaserScan.h @@ -0,0 +1,300 @@ +#ifndef _ROS_sensor_msgs_LaserScan_h +#define _ROS_sensor_msgs_LaserScan_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../std_msgs/Header.h" + +namespace sensor_msgs +{ + + class LaserScan : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef float _angle_min_type; + _angle_min_type angle_min; + typedef float _angle_max_type; + _angle_max_type angle_max; + typedef float _angle_increment_type; + _angle_increment_type angle_increment; + typedef float _time_increment_type; + _time_increment_type time_increment; + typedef float _scan_time_type; + _scan_time_type scan_time; + typedef float _range_min_type; + _range_min_type range_min; + typedef float _range_max_type; + _range_max_type range_max; + uint32_t ranges_length; + typedef float _ranges_type; + _ranges_type st_ranges; + _ranges_type * ranges; + uint32_t intensities_length; + typedef float _intensities_type; + _intensities_type st_intensities; + _intensities_type * intensities; + + LaserScan(): + header(), + angle_min(0), + angle_max(0), + angle_increment(0), + time_increment(0), + scan_time(0), + range_min(0), + range_max(0), + ranges_length(0), ranges(NULL), + intensities_length(0), intensities(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_angle_min; + u_angle_min.real = this->angle_min; + *(outbuffer + offset + 0) = (u_angle_min.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angle_min.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angle_min.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angle_min.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angle_min); + union { + float real; + uint32_t base; + } u_angle_max; + u_angle_max.real = this->angle_max; + *(outbuffer + offset + 0) = (u_angle_max.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angle_max.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angle_max.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angle_max.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angle_max); + union { + float real; + uint32_t base; + } u_angle_increment; + u_angle_increment.real = this->angle_increment; + *(outbuffer + offset + 0) = (u_angle_increment.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angle_increment.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angle_increment.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angle_increment.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angle_increment); + union { + float real; + uint32_t base; + } u_time_increment; + u_time_increment.real = this->time_increment; + *(outbuffer + offset + 0) = (u_time_increment.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_time_increment.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_time_increment.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_time_increment.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_increment); + union { + float real; + uint32_t base; + } u_scan_time; + u_scan_time.real = this->scan_time; + *(outbuffer + offset + 0) = (u_scan_time.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_scan_time.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_scan_time.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_scan_time.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->scan_time); + union { + float real; + uint32_t base; + } u_range_min; + u_range_min.real = this->range_min; + *(outbuffer + offset + 0) = (u_range_min.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_range_min.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_range_min.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_range_min.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->range_min); + union { + float real; + uint32_t base; + } u_range_max; + u_range_max.real = this->range_max; + *(outbuffer + offset + 0) = (u_range_max.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_range_max.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_range_max.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_range_max.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->range_max); + *(outbuffer + offset + 0) = (this->ranges_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->ranges_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->ranges_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->ranges_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->ranges_length); + for( uint32_t i = 0; i < ranges_length; i++){ + union { + float real; + uint32_t base; + } u_rangesi; + u_rangesi.real = this->ranges[i]; + *(outbuffer + offset + 0) = (u_rangesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_rangesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_rangesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_rangesi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->ranges[i]); + } + *(outbuffer + offset + 0) = (this->intensities_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->intensities_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->intensities_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->intensities_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->intensities_length); + for( uint32_t i = 0; i < intensities_length; i++){ + union { + float real; + uint32_t base; + } u_intensitiesi; + u_intensitiesi.real = this->intensities[i]; + *(outbuffer + offset + 0) = (u_intensitiesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_intensitiesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_intensitiesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_intensitiesi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->intensities[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_angle_min; + u_angle_min.base = 0; + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angle_min = u_angle_min.real; + offset += sizeof(this->angle_min); + union { + float real; + uint32_t base; + } u_angle_max; + u_angle_max.base = 0; + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angle_max = u_angle_max.real; + offset += sizeof(this->angle_max); + union { + float real; + uint32_t base; + } u_angle_increment; + u_angle_increment.base = 0; + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angle_increment = u_angle_increment.real; + offset += sizeof(this->angle_increment); + union { + float real; + uint32_t base; + } u_time_increment; + u_time_increment.base = 0; + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->time_increment = u_time_increment.real; + offset += sizeof(this->time_increment); + union { + float real; + uint32_t base; + } u_scan_time; + u_scan_time.base = 0; + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->scan_time = u_scan_time.real; + offset += sizeof(this->scan_time); + union { + float real; + uint32_t base; + } u_range_min; + u_range_min.base = 0; + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->range_min = u_range_min.real; + offset += sizeof(this->range_min); + union { + float real; + uint32_t base; + } u_range_max; + u_range_max.base = 0; + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->range_max = u_range_max.real; + offset += sizeof(this->range_max); + uint32_t ranges_lengthT = ((uint32_t) (*(inbuffer + offset))); + ranges_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + ranges_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + ranges_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->ranges_length); + if(ranges_lengthT > ranges_length) + this->ranges = (float*)realloc(this->ranges, ranges_lengthT * sizeof(float)); + ranges_length = ranges_lengthT; + for( uint32_t i = 0; i < ranges_length; i++){ + union { + float real; + uint32_t base; + } u_st_ranges; + u_st_ranges.base = 0; + u_st_ranges.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_ranges.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_ranges.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_ranges.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_ranges = u_st_ranges.real; + offset += sizeof(this->st_ranges); + memcpy( &(this->ranges[i]), &(this->st_ranges), sizeof(float)); + } + uint32_t intensities_lengthT = ((uint32_t) (*(inbuffer + offset))); + intensities_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + intensities_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + intensities_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->intensities_length); + if(intensities_lengthT > intensities_length) + this->intensities = (float*)realloc(this->intensities, intensities_lengthT * sizeof(float)); + intensities_length = intensities_lengthT; + for( uint32_t i = 0; i < intensities_length; i++){ + union { + float real; + uint32_t base; + } u_st_intensities; + u_st_intensities.base = 0; + u_st_intensities.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_intensities.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_intensities.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_intensities.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_intensities = u_st_intensities.real; + offset += sizeof(this->st_intensities); + memcpy( &(this->intensities[i]), &(this->st_intensities), sizeof(float)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/LaserScan"; }; + const char * getMD5(){ return "90c7ef2dc6895d81024acba2ac42f369"; }; + + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/MagneticField.h b/source/ros-max-lib/ros_lib/sensor_msgs/MagneticField.h new file mode 100644 index 0000000000000000000000000000000000000000..69a73444bc60614a4b2cc3da6cf92400e603442e --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/MagneticField.h @@ -0,0 +1,85 @@ +#ifndef _ROS_sensor_msgs_MagneticField_h +#define _ROS_sensor_msgs_MagneticField_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Vector3.h" + +namespace sensor_msgs +{ + + class MagneticField : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Vector3 _magnetic_field_type; + _magnetic_field_type magnetic_field; + double magnetic_field_covariance[9]; + + MagneticField(): + header(), + magnetic_field(), + magnetic_field_covariance() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->magnetic_field.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_magnetic_field_covariancei; + u_magnetic_field_covariancei.real = this->magnetic_field_covariance[i]; + *(outbuffer + offset + 0) = (u_magnetic_field_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_magnetic_field_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_magnetic_field_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_magnetic_field_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_magnetic_field_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_magnetic_field_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_magnetic_field_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_magnetic_field_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->magnetic_field_covariance[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->magnetic_field.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_magnetic_field_covariancei; + u_magnetic_field_covariancei.base = 0; + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_magnetic_field_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->magnetic_field_covariance[i] = u_magnetic_field_covariancei.real; + offset += sizeof(this->magnetic_field_covariance[i]); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/MagneticField"; }; + const char * getMD5(){ return "2f3b0b43eed0c9501de0fa3ff89a45aa"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/MultiDOFJointState.h b/source/ros-max-lib/ros_lib/sensor_msgs/MultiDOFJointState.h new file mode 100644 index 0000000000000000000000000000000000000000..ed0779776f4c98fe26d8c4bbc58bc6f891ebad0d --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/MultiDOFJointState.h @@ -0,0 +1,159 @@ +#ifndef _ROS_sensor_msgs_MultiDOFJointState_h +#define _ROS_sensor_msgs_MultiDOFJointState_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Transform.h" +#include "geometry_msgs/Twist.h" +#include "geometry_msgs/Wrench.h" + +namespace sensor_msgs +{ + + class MultiDOFJointState : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t joint_names_length; + typedef char* _joint_names_type; + _joint_names_type st_joint_names; + _joint_names_type * joint_names; + uint32_t transforms_length; + typedef geometry_msgs::Transform _transforms_type; + _transforms_type st_transforms; + _transforms_type * transforms; + uint32_t twist_length; + typedef geometry_msgs::Twist _twist_type; + _twist_type st_twist; + _twist_type * twist; + uint32_t wrench_length; + typedef geometry_msgs::Wrench _wrench_type; + _wrench_type st_wrench; + _wrench_type * wrench; + + MultiDOFJointState(): + header(), + joint_names_length(0), joint_names(NULL), + transforms_length(0), transforms(NULL), + twist_length(0), twist(NULL), + wrench_length(0), wrench(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_names_length); + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_joint_namesi = strlen(this->joint_names[i]); + varToArr(outbuffer + offset, length_joint_namesi); + offset += 4; + memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); + offset += length_joint_namesi; + } + *(outbuffer + offset + 0) = (this->transforms_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->transforms_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->transforms_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->transforms_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->transforms_length); + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->transforms[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->twist_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->twist_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->twist_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->twist_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->twist_length); + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->twist[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->wrench_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->wrench_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->wrench_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->wrench_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->wrench_length); + for( uint32_t i = 0; i < wrench_length; i++){ + offset += this->wrench[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_names_length); + if(joint_names_lengthT > joint_names_length) + this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); + joint_names_length = joint_names_lengthT; + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_st_joint_names; + arrToVar(length_st_joint_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_joint_names-1]=0; + this->st_joint_names = (char *)(inbuffer + offset-1); + offset += length_st_joint_names; + memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); + } + uint32_t transforms_lengthT = ((uint32_t) (*(inbuffer + offset))); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->transforms_length); + if(transforms_lengthT > transforms_length) + this->transforms = (geometry_msgs::Transform*)realloc(this->transforms, transforms_lengthT * sizeof(geometry_msgs::Transform)); + transforms_length = transforms_lengthT; + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->st_transforms.deserialize(inbuffer + offset); + memcpy( &(this->transforms[i]), &(this->st_transforms), sizeof(geometry_msgs::Transform)); + } + uint32_t twist_lengthT = ((uint32_t) (*(inbuffer + offset))); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + twist_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->twist_length); + if(twist_lengthT > twist_length) + this->twist = (geometry_msgs::Twist*)realloc(this->twist, twist_lengthT * sizeof(geometry_msgs::Twist)); + twist_length = twist_lengthT; + for( uint32_t i = 0; i < twist_length; i++){ + offset += this->st_twist.deserialize(inbuffer + offset); + memcpy( &(this->twist[i]), &(this->st_twist), sizeof(geometry_msgs::Twist)); + } + uint32_t wrench_lengthT = ((uint32_t) (*(inbuffer + offset))); + wrench_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + wrench_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + wrench_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->wrench_length); + if(wrench_lengthT > wrench_length) + this->wrench = (geometry_msgs::Wrench*)realloc(this->wrench, wrench_lengthT * sizeof(geometry_msgs::Wrench)); + wrench_length = wrench_lengthT; + for( uint32_t i = 0; i < wrench_length; i++){ + offset += this->st_wrench.deserialize(inbuffer + offset); + memcpy( &(this->wrench[i]), &(this->st_wrench), sizeof(geometry_msgs::Wrench)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/MultiDOFJointState"; }; + const char * getMD5(){ return "690f272f0640d2631c305eeb8301e59d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/MultiEchoLaserScan.h b/source/ros-max-lib/ros_lib/sensor_msgs/MultiEchoLaserScan.h new file mode 100644 index 0000000000000000000000000000000000000000..35af2b2126eef449ac05513a68ec9f3aa6587038 --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/MultiEchoLaserScan.h @@ -0,0 +1,263 @@ +#ifndef _ROS_sensor_msgs_MultiEchoLaserScan_h +#define _ROS_sensor_msgs_MultiEchoLaserScan_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/LaserEcho.h" + +namespace sensor_msgs +{ + + class MultiEchoLaserScan : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef float _angle_min_type; + _angle_min_type angle_min; + typedef float _angle_max_type; + _angle_max_type angle_max; + typedef float _angle_increment_type; + _angle_increment_type angle_increment; + typedef float _time_increment_type; + _time_increment_type time_increment; + typedef float _scan_time_type; + _scan_time_type scan_time; + typedef float _range_min_type; + _range_min_type range_min; + typedef float _range_max_type; + _range_max_type range_max; + uint32_t ranges_length; + typedef sensor_msgs::LaserEcho _ranges_type; + _ranges_type st_ranges; + _ranges_type * ranges; + uint32_t intensities_length; + typedef sensor_msgs::LaserEcho _intensities_type; + _intensities_type st_intensities; + _intensities_type * intensities; + + MultiEchoLaserScan(): + header(), + angle_min(0), + angle_max(0), + angle_increment(0), + time_increment(0), + scan_time(0), + range_min(0), + range_max(0), + ranges_length(0), ranges(NULL), + intensities_length(0), intensities(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_angle_min; + u_angle_min.real = this->angle_min; + *(outbuffer + offset + 0) = (u_angle_min.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angle_min.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angle_min.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angle_min.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angle_min); + union { + float real; + uint32_t base; + } u_angle_max; + u_angle_max.real = this->angle_max; + *(outbuffer + offset + 0) = (u_angle_max.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angle_max.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angle_max.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angle_max.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angle_max); + union { + float real; + uint32_t base; + } u_angle_increment; + u_angle_increment.real = this->angle_increment; + *(outbuffer + offset + 0) = (u_angle_increment.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angle_increment.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angle_increment.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angle_increment.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angle_increment); + union { + float real; + uint32_t base; + } u_time_increment; + u_time_increment.real = this->time_increment; + *(outbuffer + offset + 0) = (u_time_increment.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_time_increment.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_time_increment.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_time_increment.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_increment); + union { + float real; + uint32_t base; + } u_scan_time; + u_scan_time.real = this->scan_time; + *(outbuffer + offset + 0) = (u_scan_time.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_scan_time.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_scan_time.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_scan_time.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->scan_time); + union { + float real; + uint32_t base; + } u_range_min; + u_range_min.real = this->range_min; + *(outbuffer + offset + 0) = (u_range_min.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_range_min.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_range_min.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_range_min.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->range_min); + union { + float real; + uint32_t base; + } u_range_max; + u_range_max.real = this->range_max; + *(outbuffer + offset + 0) = (u_range_max.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_range_max.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_range_max.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_range_max.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->range_max); + *(outbuffer + offset + 0) = (this->ranges_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->ranges_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->ranges_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->ranges_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->ranges_length); + for( uint32_t i = 0; i < ranges_length; i++){ + offset += this->ranges[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->intensities_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->intensities_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->intensities_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->intensities_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->intensities_length); + for( uint32_t i = 0; i < intensities_length; i++){ + offset += this->intensities[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_angle_min; + u_angle_min.base = 0; + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angle_min = u_angle_min.real; + offset += sizeof(this->angle_min); + union { + float real; + uint32_t base; + } u_angle_max; + u_angle_max.base = 0; + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angle_max = u_angle_max.real; + offset += sizeof(this->angle_max); + union { + float real; + uint32_t base; + } u_angle_increment; + u_angle_increment.base = 0; + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angle_increment = u_angle_increment.real; + offset += sizeof(this->angle_increment); + union { + float real; + uint32_t base; + } u_time_increment; + u_time_increment.base = 0; + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->time_increment = u_time_increment.real; + offset += sizeof(this->time_increment); + union { + float real; + uint32_t base; + } u_scan_time; + u_scan_time.base = 0; + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->scan_time = u_scan_time.real; + offset += sizeof(this->scan_time); + union { + float real; + uint32_t base; + } u_range_min; + u_range_min.base = 0; + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->range_min = u_range_min.real; + offset += sizeof(this->range_min); + union { + float real; + uint32_t base; + } u_range_max; + u_range_max.base = 0; + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->range_max = u_range_max.real; + offset += sizeof(this->range_max); + uint32_t ranges_lengthT = ((uint32_t) (*(inbuffer + offset))); + ranges_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + ranges_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + ranges_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->ranges_length); + if(ranges_lengthT > ranges_length) + this->ranges = (sensor_msgs::LaserEcho*)realloc(this->ranges, ranges_lengthT * sizeof(sensor_msgs::LaserEcho)); + ranges_length = ranges_lengthT; + for( uint32_t i = 0; i < ranges_length; i++){ + offset += this->st_ranges.deserialize(inbuffer + offset); + memcpy( &(this->ranges[i]), &(this->st_ranges), sizeof(sensor_msgs::LaserEcho)); + } + uint32_t intensities_lengthT = ((uint32_t) (*(inbuffer + offset))); + intensities_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + intensities_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + intensities_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->intensities_length); + if(intensities_lengthT > intensities_length) + this->intensities = (sensor_msgs::LaserEcho*)realloc(this->intensities, intensities_lengthT * sizeof(sensor_msgs::LaserEcho)); + intensities_length = intensities_lengthT; + for( uint32_t i = 0; i < intensities_length; i++){ + offset += this->st_intensities.deserialize(inbuffer + offset); + memcpy( &(this->intensities[i]), &(this->st_intensities), sizeof(sensor_msgs::LaserEcho)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/MultiEchoLaserScan"; }; + const char * getMD5(){ return "6fefb0c6da89d7c8abe4b339f5c2f8fb"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/NavSatFix.h b/source/ros-max-lib/ros_lib/sensor_msgs/NavSatFix.h new file mode 100644 index 0000000000000000000000000000000000000000..9edc7c13b8dd723d2ad518253c21db5d6618ea26 --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/NavSatFix.h @@ -0,0 +1,192 @@ +#ifndef _ROS_sensor_msgs_NavSatFix_h +#define _ROS_sensor_msgs_NavSatFix_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/NavSatStatus.h" + +namespace sensor_msgs +{ + + class NavSatFix : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef sensor_msgs::NavSatStatus _status_type; + _status_type status; + typedef double _latitude_type; + _latitude_type latitude; + typedef double _longitude_type; + _longitude_type longitude; + typedef double _altitude_type; + _altitude_type altitude; + double position_covariance[9]; + typedef uint8_t _position_covariance_type_type; + _position_covariance_type_type position_covariance_type; + enum { COVARIANCE_TYPE_UNKNOWN = 0 }; + enum { COVARIANCE_TYPE_APPROXIMATED = 1 }; + enum { COVARIANCE_TYPE_DIAGONAL_KNOWN = 2 }; + enum { COVARIANCE_TYPE_KNOWN = 3 }; + + NavSatFix(): + header(), + status(), + latitude(0), + longitude(0), + altitude(0), + position_covariance(), + position_covariance_type(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->status.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_latitude; + u_latitude.real = this->latitude; + *(outbuffer + offset + 0) = (u_latitude.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_latitude.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_latitude.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_latitude.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_latitude.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_latitude.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_latitude.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_latitude.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->latitude); + union { + double real; + uint64_t base; + } u_longitude; + u_longitude.real = this->longitude; + *(outbuffer + offset + 0) = (u_longitude.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_longitude.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_longitude.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_longitude.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_longitude.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_longitude.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_longitude.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_longitude.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->longitude); + union { + double real; + uint64_t base; + } u_altitude; + u_altitude.real = this->altitude; + *(outbuffer + offset + 0) = (u_altitude.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_altitude.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_altitude.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_altitude.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_altitude.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_altitude.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_altitude.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_altitude.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->altitude); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_position_covariancei; + u_position_covariancei.real = this->position_covariance[i]; + *(outbuffer + offset + 0) = (u_position_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_position_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_position_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_position_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_position_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_position_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_position_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_position_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->position_covariance[i]); + } + *(outbuffer + offset + 0) = (this->position_covariance_type >> (8 * 0)) & 0xFF; + offset += sizeof(this->position_covariance_type); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->status.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_latitude; + u_latitude.base = 0; + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->latitude = u_latitude.real; + offset += sizeof(this->latitude); + union { + double real; + uint64_t base; + } u_longitude; + u_longitude.base = 0; + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->longitude = u_longitude.real; + offset += sizeof(this->longitude); + union { + double real; + uint64_t base; + } u_altitude; + u_altitude.base = 0; + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->altitude = u_altitude.real; + offset += sizeof(this->altitude); + for( uint32_t i = 0; i < 9; i++){ + union { + double real; + uint64_t base; + } u_position_covariancei; + u_position_covariancei.base = 0; + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_position_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->position_covariance[i] = u_position_covariancei.real; + offset += sizeof(this->position_covariance[i]); + } + this->position_covariance_type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->position_covariance_type); + return offset; + } + + const char * getType(){ return "sensor_msgs/NavSatFix"; }; + const char * getMD5(){ return "2d3a8cd499b9b4a0249fb98fd05cfa48"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/NavSatStatus.h b/source/ros-max-lib/ros_lib/sensor_msgs/NavSatStatus.h new file mode 100644 index 0000000000000000000000000000000000000000..79d8abd95fb4f306810d678c72da7c9e28660ba6 --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/NavSatStatus.h @@ -0,0 +1,73 @@ +#ifndef _ROS_sensor_msgs_NavSatStatus_h +#define _ROS_sensor_msgs_NavSatStatus_h + +#include +#include +#include +#include "ros/msg.h" + +namespace sensor_msgs +{ + + class NavSatStatus : public ros::Msg + { + public: + typedef int8_t _status_type; + _status_type status; + typedef uint16_t _service_type; + _service_type service; + enum { STATUS_NO_FIX = -1 }; + enum { STATUS_FIX = 0 }; + enum { STATUS_SBAS_FIX = 1 }; + enum { STATUS_GBAS_FIX = 2 }; + enum { SERVICE_GPS = 1 }; + enum { SERVICE_GLONASS = 2 }; + enum { SERVICE_COMPASS = 4 }; + enum { SERVICE_GALILEO = 8 }; + + NavSatStatus(): + status(0), + service(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_status; + u_status.real = this->status; + *(outbuffer + offset + 0) = (u_status.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->status); + *(outbuffer + offset + 0) = (this->service >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->service >> (8 * 1)) & 0xFF; + offset += sizeof(this->service); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_status; + u_status.base = 0; + u_status.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->status = u_status.real; + offset += sizeof(this->status); + this->service = ((uint16_t) (*(inbuffer + offset))); + this->service |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->service); + return offset; + } + + const char * getType(){ return "sensor_msgs/NavSatStatus"; }; + const char * getMD5(){ return "331cdbddfa4bc96ffc3b9ad98900a54c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/PointCloud.h b/source/ros-max-lib/ros_lib/sensor_msgs/PointCloud.h new file mode 100644 index 0000000000000000000000000000000000000000..f56e8d773b65a4d7c95126da78ae03fd75fb7772 --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/PointCloud.h @@ -0,0 +1,96 @@ +#ifndef _ROS_sensor_msgs_PointCloud_h +#define _ROS_sensor_msgs_PointCloud_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Point32.h" +#include "sensor_msgs/ChannelFloat32.h" + +namespace sensor_msgs +{ + + class PointCloud : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t points_length; + typedef geometry_msgs::Point32 _points_type; + _points_type st_points; + _points_type * points; + uint32_t channels_length; + typedef sensor_msgs::ChannelFloat32 _channels_type; + _channels_type st_channels; + _channels_type * channels; + + PointCloud(): + header(), + points_length(0), points(NULL), + channels_length(0), channels(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->points_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->points_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->points_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->points_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->points_length); + for( uint32_t i = 0; i < points_length; i++){ + offset += this->points[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->channels_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->channels_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->channels_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->channels_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->channels_length); + for( uint32_t i = 0; i < channels_length; i++){ + offset += this->channels[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t points_lengthT = ((uint32_t) (*(inbuffer + offset))); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->points_length); + if(points_lengthT > points_length) + this->points = (geometry_msgs::Point32*)realloc(this->points, points_lengthT * sizeof(geometry_msgs::Point32)); + points_length = points_lengthT; + for( uint32_t i = 0; i < points_length; i++){ + offset += this->st_points.deserialize(inbuffer + offset); + memcpy( &(this->points[i]), &(this->st_points), sizeof(geometry_msgs::Point32)); + } + uint32_t channels_lengthT = ((uint32_t) (*(inbuffer + offset))); + channels_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + channels_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + channels_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->channels_length); + if(channels_lengthT > channels_length) + this->channels = (sensor_msgs::ChannelFloat32*)realloc(this->channels, channels_lengthT * sizeof(sensor_msgs::ChannelFloat32)); + channels_length = channels_lengthT; + for( uint32_t i = 0; i < channels_length; i++){ + offset += this->st_channels.deserialize(inbuffer + offset); + memcpy( &(this->channels[i]), &(this->st_channels), sizeof(sensor_msgs::ChannelFloat32)); + } + return offset; + } + + const char * getType(){ return "sensor_msgs/PointCloud"; }; + const char * getMD5(){ return "d8e9c3f5afbdd8a130fd1d2763945fca"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/PointCloud2.h b/source/ros-max-lib/ros_lib/sensor_msgs/PointCloud2.h new file mode 100644 index 0000000000000000000000000000000000000000..c545de19a4424befaa46f22fd217fb8e63d105b7 --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/PointCloud2.h @@ -0,0 +1,185 @@ +#ifndef _ROS_sensor_msgs_PointCloud2_h +#define _ROS_sensor_msgs_PointCloud2_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/PointField.h" + +namespace sensor_msgs +{ + + class PointCloud2 : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef uint32_t _height_type; + _height_type height; + typedef uint32_t _width_type; + _width_type width; + uint32_t fields_length; + typedef sensor_msgs::PointField _fields_type; + _fields_type st_fields; + _fields_type * fields; + typedef bool _is_bigendian_type; + _is_bigendian_type is_bigendian; + typedef uint32_t _point_step_type; + _point_step_type point_step; + typedef uint32_t _row_step_type; + _row_step_type row_step; + uint32_t data_length; + typedef uint8_t _data_type; + _data_type st_data; + _data_type * data; + typedef bool _is_dense_type; + _is_dense_type is_dense; + + PointCloud2(): + header(), + height(0), + width(0), + fields_length(0), fields(NULL), + is_bigendian(0), + point_step(0), + row_step(0), + data_length(0), data(NULL), + is_dense(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF; + offset += sizeof(this->height); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF; + offset += sizeof(this->width); + *(outbuffer + offset + 0) = (this->fields_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->fields_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->fields_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->fields_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->fields_length); + for( uint32_t i = 0; i < fields_length; i++){ + offset += this->fields[i].serialize(outbuffer + offset); + } + union { + bool real; + uint8_t base; + } u_is_bigendian; + u_is_bigendian.real = this->is_bigendian; + *(outbuffer + offset + 0) = (u_is_bigendian.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->is_bigendian); + *(outbuffer + offset + 0) = (this->point_step >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->point_step >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->point_step >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->point_step >> (8 * 3)) & 0xFF; + offset += sizeof(this->point_step); + *(outbuffer + offset + 0) = (this->row_step >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->row_step >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->row_step >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->row_step >> (8 * 3)) & 0xFF; + offset += sizeof(this->row_step); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + union { + bool real; + uint8_t base; + } u_is_dense; + u_is_dense.real = this->is_dense; + *(outbuffer + offset + 0) = (u_is_dense.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->is_dense); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->height = ((uint32_t) (*(inbuffer + offset))); + this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->height); + this->width = ((uint32_t) (*(inbuffer + offset))); + this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->width); + uint32_t fields_lengthT = ((uint32_t) (*(inbuffer + offset))); + fields_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + fields_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + fields_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->fields_length); + if(fields_lengthT > fields_length) + this->fields = (sensor_msgs::PointField*)realloc(this->fields, fields_lengthT * sizeof(sensor_msgs::PointField)); + fields_length = fields_lengthT; + for( uint32_t i = 0; i < fields_length; i++){ + offset += this->st_fields.deserialize(inbuffer + offset); + memcpy( &(this->fields[i]), &(this->st_fields), sizeof(sensor_msgs::PointField)); + } + union { + bool real; + uint8_t base; + } u_is_bigendian; + u_is_bigendian.base = 0; + u_is_bigendian.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->is_bigendian = u_is_bigendian.real; + offset += sizeof(this->is_bigendian); + this->point_step = ((uint32_t) (*(inbuffer + offset))); + this->point_step |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->point_step |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->point_step |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->point_step); + this->row_step = ((uint32_t) (*(inbuffer + offset))); + this->row_step |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->row_step |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->row_step |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->row_step); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint8_t*)realloc(this->data, data_lengthT * sizeof(uint8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint8_t)); + } + union { + bool real; + uint8_t base; + } u_is_dense; + u_is_dense.base = 0; + u_is_dense.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->is_dense = u_is_dense.real; + offset += sizeof(this->is_dense); + return offset; + } + + const char * getType(){ return "sensor_msgs/PointCloud2"; }; + const char * getMD5(){ return "1158d486dd51d683ce2f1be655c3c181"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/PointField.h b/source/ros-max-lib/ros_lib/sensor_msgs/PointField.h new file mode 100644 index 0000000000000000000000000000000000000000..7ad0cc451ef562f5c3f4fe12877e15f931039e88 --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/PointField.h @@ -0,0 +1,96 @@ +#ifndef _ROS_sensor_msgs_PointField_h +#define _ROS_sensor_msgs_PointField_h + +#include +#include +#include +#include "ros/msg.h" + +namespace sensor_msgs +{ + + class PointField : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef uint32_t _offset_type; + _offset_type offset; + typedef uint8_t _datatype_type; + _datatype_type datatype; + typedef uint32_t _count_type; + _count_type count; + enum { INT8 = 1 }; + enum { UINT8 = 2 }; + enum { INT16 = 3 }; + enum { UINT16 = 4 }; + enum { INT32 = 5 }; + enum { UINT32 = 6 }; + enum { FLOAT32 = 7 }; + enum { FLOAT64 = 8 }; + + PointField(): + name(""), + offset(0), + datatype(0), + count(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + *(outbuffer + offset + 0) = (this->offset >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->offset >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->offset >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->offset >> (8 * 3)) & 0xFF; + offset += sizeof(this->offset); + *(outbuffer + offset + 0) = (this->datatype >> (8 * 0)) & 0xFF; + offset += sizeof(this->datatype); + *(outbuffer + offset + 0) = (this->count >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->count >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->count >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->count >> (8 * 3)) & 0xFF; + offset += sizeof(this->count); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + this->offset = ((uint32_t) (*(inbuffer + offset))); + this->offset |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->offset |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->offset |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->offset); + this->datatype = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->datatype); + this->count = ((uint32_t) (*(inbuffer + offset))); + this->count |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->count |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->count |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->count); + return offset; + } + + const char * getType(){ return "sensor_msgs/PointField"; }; + const char * getMD5(){ return "268eacb2962780ceac86cbd17e328150"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/Range.h b/source/ros-max-lib/ros_lib/sensor_msgs/Range.h new file mode 100644 index 0000000000000000000000000000000000000000..bfa827e19bf54cddc332c2ff56d70e6ce606f902 --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/Range.h @@ -0,0 +1,149 @@ +#ifndef _ROS_sensor_msgs_Range_h +#define _ROS_sensor_msgs_Range_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class Range : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef uint8_t _radiation_type_type; + _radiation_type_type radiation_type; + typedef float _field_of_view_type; + _field_of_view_type field_of_view; + typedef float _min_range_type; + _min_range_type min_range; + typedef float _max_range_type; + _max_range_type max_range; + typedef float _range_type; + _range_type range; + enum { ULTRASOUND = 0 }; + enum { INFRARED = 1 }; + + Range(): + header(), + radiation_type(0), + field_of_view(0), + min_range(0), + max_range(0), + range(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->radiation_type >> (8 * 0)) & 0xFF; + offset += sizeof(this->radiation_type); + union { + float real; + uint32_t base; + } u_field_of_view; + u_field_of_view.real = this->field_of_view; + *(outbuffer + offset + 0) = (u_field_of_view.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_field_of_view.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_field_of_view.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_field_of_view.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->field_of_view); + union { + float real; + uint32_t base; + } u_min_range; + u_min_range.real = this->min_range; + *(outbuffer + offset + 0) = (u_min_range.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_min_range.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_min_range.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_min_range.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->min_range); + union { + float real; + uint32_t base; + } u_max_range; + u_max_range.real = this->max_range; + *(outbuffer + offset + 0) = (u_max_range.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_range.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_range.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_range.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->max_range); + union { + float real; + uint32_t base; + } u_range; + u_range.real = this->range; + *(outbuffer + offset + 0) = (u_range.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_range.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_range.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_range.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->range); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->radiation_type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->radiation_type); + union { + float real; + uint32_t base; + } u_field_of_view; + u_field_of_view.base = 0; + u_field_of_view.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_field_of_view.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_field_of_view.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_field_of_view.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->field_of_view = u_field_of_view.real; + offset += sizeof(this->field_of_view); + union { + float real; + uint32_t base; + } u_min_range; + u_min_range.base = 0; + u_min_range.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_min_range.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_min_range.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_min_range.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->min_range = u_min_range.real; + offset += sizeof(this->min_range); + union { + float real; + uint32_t base; + } u_max_range; + u_max_range.base = 0; + u_max_range.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_range.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_range.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_range.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->max_range = u_max_range.real; + offset += sizeof(this->max_range); + union { + float real; + uint32_t base; + } u_range; + u_range.base = 0; + u_range.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_range.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_range.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_range.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->range = u_range.real; + offset += sizeof(this->range); + return offset; + } + + const char * getType(){ return "sensor_msgs/Range"; }; + const char * getMD5(){ return "c005c34273dc426c67a020a87bc24148"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/RegionOfInterest.h b/source/ros-max-lib/ros_lib/sensor_msgs/RegionOfInterest.h new file mode 100644 index 0000000000000000000000000000000000000000..ea0c6634181da37be766c5f26549df5d904197ba --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/RegionOfInterest.h @@ -0,0 +1,108 @@ +#ifndef _ROS_sensor_msgs_RegionOfInterest_h +#define _ROS_sensor_msgs_RegionOfInterest_h + +#include +#include +#include +#include "ros/msg.h" + +namespace sensor_msgs +{ + + class RegionOfInterest : public ros::Msg + { + public: + typedef uint32_t _x_offset_type; + _x_offset_type x_offset; + typedef uint32_t _y_offset_type; + _y_offset_type y_offset; + typedef uint32_t _height_type; + _height_type height; + typedef uint32_t _width_type; + _width_type width; + typedef bool _do_rectify_type; + _do_rectify_type do_rectify; + + RegionOfInterest(): + x_offset(0), + y_offset(0), + height(0), + width(0), + do_rectify(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->x_offset >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->x_offset >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->x_offset >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->x_offset >> (8 * 3)) & 0xFF; + offset += sizeof(this->x_offset); + *(outbuffer + offset + 0) = (this->y_offset >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->y_offset >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->y_offset >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->y_offset >> (8 * 3)) & 0xFF; + offset += sizeof(this->y_offset); + *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF; + offset += sizeof(this->height); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF; + offset += sizeof(this->width); + union { + bool real; + uint8_t base; + } u_do_rectify; + u_do_rectify.real = this->do_rectify; + *(outbuffer + offset + 0) = (u_do_rectify.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->do_rectify); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->x_offset = ((uint32_t) (*(inbuffer + offset))); + this->x_offset |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->x_offset |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->x_offset |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->x_offset); + this->y_offset = ((uint32_t) (*(inbuffer + offset))); + this->y_offset |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->y_offset |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->y_offset |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->y_offset); + this->height = ((uint32_t) (*(inbuffer + offset))); + this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->height); + this->width = ((uint32_t) (*(inbuffer + offset))); + this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->width); + union { + bool real; + uint8_t base; + } u_do_rectify; + u_do_rectify.base = 0; + u_do_rectify.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->do_rectify = u_do_rectify.real; + offset += sizeof(this->do_rectify); + return offset; + } + + const char * getType(){ return "sensor_msgs/RegionOfInterest"; }; + const char * getMD5(){ return "bdb633039d588fcccb441a4d43ccfe09"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/RelativeHumidity.h b/source/ros-max-lib/ros_lib/sensor_msgs/RelativeHumidity.h new file mode 100644 index 0000000000000000000000000000000000000000..a596f884a285e9b8c8f42355ab968a28b0cec6b0 --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/RelativeHumidity.h @@ -0,0 +1,108 @@ +#ifndef _ROS_sensor_msgs_RelativeHumidity_h +#define _ROS_sensor_msgs_RelativeHumidity_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class RelativeHumidity : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef double _relative_humidity_type; + _relative_humidity_type relative_humidity; + typedef double _variance_type; + _variance_type variance; + + RelativeHumidity(): + header(), + relative_humidity(0), + variance(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_relative_humidity; + u_relative_humidity.real = this->relative_humidity; + *(outbuffer + offset + 0) = (u_relative_humidity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_relative_humidity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_relative_humidity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_relative_humidity.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_relative_humidity.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_relative_humidity.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_relative_humidity.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_relative_humidity.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->relative_humidity); + union { + double real; + uint64_t base; + } u_variance; + u_variance.real = this->variance; + *(outbuffer + offset + 0) = (u_variance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_variance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_variance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_variance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_variance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_variance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_variance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_variance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->variance); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_relative_humidity; + u_relative_humidity.base = 0; + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_relative_humidity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->relative_humidity = u_relative_humidity.real; + offset += sizeof(this->relative_humidity); + union { + double real; + uint64_t base; + } u_variance; + u_variance.base = 0; + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->variance = u_variance.real; + offset += sizeof(this->variance); + return offset; + } + + const char * getType(){ return "sensor_msgs/RelativeHumidity"; }; + const char * getMD5(){ return "8730015b05955b7e992ce29a2678d90f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/SetCameraInfo.h b/source/ros-max-lib/ros_lib/sensor_msgs/SetCameraInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..3f838fb82dbca169853ac970436cf1953759cb49 --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/SetCameraInfo.h @@ -0,0 +1,111 @@ +#ifndef _ROS_SERVICE_SetCameraInfo_h +#define _ROS_SERVICE_SetCameraInfo_h +#include +#include +#include +#include "ros/msg.h" +#include "sensor_msgs/CameraInfo.h" + +namespace sensor_msgs +{ + +static const char SETCAMERAINFO[] = "sensor_msgs/SetCameraInfo"; + + class SetCameraInfoRequest : public ros::Msg + { + public: + typedef sensor_msgs::CameraInfo _camera_info_type; + _camera_info_type camera_info; + + SetCameraInfoRequest(): + camera_info() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->camera_info.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->camera_info.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return SETCAMERAINFO; }; + const char * getMD5(){ return "ee34be01fdeee563d0d99cd594d5581d"; }; + + }; + + class SetCameraInfoResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _status_message_type; + _status_message_type status_message; + + SetCameraInfoResponse(): + success(0), + status_message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_status_message = strlen(this->status_message); + varToArr(outbuffer + offset, length_status_message); + offset += 4; + memcpy(outbuffer + offset, this->status_message, length_status_message); + offset += length_status_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_status_message; + arrToVar(length_status_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_status_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_status_message-1]=0; + this->status_message = (char *)(inbuffer + offset-1); + offset += length_status_message; + return offset; + } + + const char * getType(){ return SETCAMERAINFO; }; + const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; + + }; + + class SetCameraInfo { + public: + typedef SetCameraInfoRequest Request; + typedef SetCameraInfoResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/Temperature.h b/source/ros-max-lib/ros_lib/sensor_msgs/Temperature.h new file mode 100644 index 0000000000000000000000000000000000000000..4308487a2c2e2da02fce0f5a7a7981ab137f5b18 --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/Temperature.h @@ -0,0 +1,108 @@ +#ifndef _ROS_sensor_msgs_Temperature_h +#define _ROS_sensor_msgs_Temperature_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace sensor_msgs +{ + + class Temperature : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef double _temperature_type; + _temperature_type temperature; + typedef double _variance_type; + _variance_type variance; + + Temperature(): + header(), + temperature(0), + variance(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_temperature; + u_temperature.real = this->temperature; + *(outbuffer + offset + 0) = (u_temperature.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_temperature.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_temperature.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_temperature.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_temperature.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_temperature.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_temperature.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_temperature.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->temperature); + union { + double real; + uint64_t base; + } u_variance; + u_variance.real = this->variance; + *(outbuffer + offset + 0) = (u_variance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_variance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_variance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_variance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_variance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_variance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_variance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_variance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->variance); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_temperature; + u_temperature.base = 0; + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_temperature.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->temperature = u_temperature.real; + offset += sizeof(this->temperature); + union { + double real; + uint64_t base; + } u_variance; + u_variance.base = 0; + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->variance = u_variance.real; + offset += sizeof(this->variance); + return offset; + } + + const char * getType(){ return "sensor_msgs/Temperature"; }; + const char * getMD5(){ return "ff71b307acdbe7c871a5a6d7ed359100"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/sensor_msgs/TimeReference.h b/source/ros-max-lib/ros_lib/sensor_msgs/TimeReference.h new file mode 100644 index 0000000000000000000000000000000000000000..ed81b28fb9689b11ed76c7e0bbad543780a072cd --- /dev/null +++ b/source/ros-max-lib/ros_lib/sensor_msgs/TimeReference.h @@ -0,0 +1,85 @@ +#ifndef _ROS_sensor_msgs_TimeReference_h +#define _ROS_sensor_msgs_TimeReference_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "ros/time.h" + +namespace sensor_msgs +{ + + class TimeReference : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef ros::Time _time_ref_type; + _time_ref_type time_ref; + typedef const char* _source_type; + _source_type source; + + TimeReference(): + header(), + time_ref(), + source("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->time_ref.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_ref.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_ref.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_ref.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_ref.sec); + *(outbuffer + offset + 0) = (this->time_ref.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_ref.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_ref.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_ref.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_ref.nsec); + uint32_t length_source = strlen(this->source); + varToArr(outbuffer + offset, length_source); + offset += 4; + memcpy(outbuffer + offset, this->source, length_source); + offset += length_source; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->time_ref.sec = ((uint32_t) (*(inbuffer + offset))); + this->time_ref.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_ref.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_ref.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_ref.sec); + this->time_ref.nsec = ((uint32_t) (*(inbuffer + offset))); + this->time_ref.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_ref.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_ref.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_ref.nsec); + uint32_t length_source; + arrToVar(length_source, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_source; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_source-1]=0; + this->source = (char *)(inbuffer + offset-1); + offset += length_source; + return offset; + } + + const char * getType(){ return "sensor_msgs/TimeReference"; }; + const char * getMD5(){ return "fded64a0265108ba86c3d38fb11c0c16"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/shape_msgs/Mesh.h b/source/ros-max-lib/ros_lib/shape_msgs/Mesh.h new file mode 100644 index 0000000000000000000000000000000000000000..3599765c53b8c76bbd121094f50e6c9da924a4dc --- /dev/null +++ b/source/ros-max-lib/ros_lib/shape_msgs/Mesh.h @@ -0,0 +1,90 @@ +#ifndef _ROS_shape_msgs_Mesh_h +#define _ROS_shape_msgs_Mesh_h + +#include +#include +#include +#include "ros/msg.h" +#include "shape_msgs/MeshTriangle.h" +#include "geometry_msgs/Point.h" + +namespace shape_msgs +{ + + class Mesh : public ros::Msg + { + public: + uint32_t triangles_length; + typedef shape_msgs::MeshTriangle _triangles_type; + _triangles_type st_triangles; + _triangles_type * triangles; + uint32_t vertices_length; + typedef geometry_msgs::Point _vertices_type; + _vertices_type st_vertices; + _vertices_type * vertices; + + Mesh(): + triangles_length(0), triangles(NULL), + vertices_length(0), vertices(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->triangles_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->triangles_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->triangles_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->triangles_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->triangles_length); + for( uint32_t i = 0; i < triangles_length; i++){ + offset += this->triangles[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->vertices_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->vertices_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->vertices_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->vertices_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->vertices_length); + for( uint32_t i = 0; i < vertices_length; i++){ + offset += this->vertices[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t triangles_lengthT = ((uint32_t) (*(inbuffer + offset))); + triangles_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + triangles_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + triangles_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->triangles_length); + if(triangles_lengthT > triangles_length) + this->triangles = (shape_msgs::MeshTriangle*)realloc(this->triangles, triangles_lengthT * sizeof(shape_msgs::MeshTriangle)); + triangles_length = triangles_lengthT; + for( uint32_t i = 0; i < triangles_length; i++){ + offset += this->st_triangles.deserialize(inbuffer + offset); + memcpy( &(this->triangles[i]), &(this->st_triangles), sizeof(shape_msgs::MeshTriangle)); + } + uint32_t vertices_lengthT = ((uint32_t) (*(inbuffer + offset))); + vertices_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + vertices_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + vertices_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->vertices_length); + if(vertices_lengthT > vertices_length) + this->vertices = (geometry_msgs::Point*)realloc(this->vertices, vertices_lengthT * sizeof(geometry_msgs::Point)); + vertices_length = vertices_lengthT; + for( uint32_t i = 0; i < vertices_length; i++){ + offset += this->st_vertices.deserialize(inbuffer + offset); + memcpy( &(this->vertices[i]), &(this->st_vertices), sizeof(geometry_msgs::Point)); + } + return offset; + } + + const char * getType(){ return "shape_msgs/Mesh"; }; + const char * getMD5(){ return "1ffdae9486cd3316a121c578b47a85cc"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/shape_msgs/MeshTriangle.h b/source/ros-max-lib/ros_lib/shape_msgs/MeshTriangle.h new file mode 100644 index 0000000000000000000000000000000000000000..b4aad1785a51ca8858aa1fc3eb13702faa51f6c4 --- /dev/null +++ b/source/ros-max-lib/ros_lib/shape_msgs/MeshTriangle.h @@ -0,0 +1,54 @@ +#ifndef _ROS_shape_msgs_MeshTriangle_h +#define _ROS_shape_msgs_MeshTriangle_h + +#include +#include +#include +#include "ros/msg.h" + +namespace shape_msgs +{ + + class MeshTriangle : public ros::Msg + { + public: + uint32_t vertex_indices[3]; + + MeshTriangle(): + vertex_indices() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + for( uint32_t i = 0; i < 3; i++){ + *(outbuffer + offset + 0) = (this->vertex_indices[i] >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->vertex_indices[i] >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->vertex_indices[i] >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->vertex_indices[i] >> (8 * 3)) & 0xFF; + offset += sizeof(this->vertex_indices[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + for( uint32_t i = 0; i < 3; i++){ + this->vertex_indices[i] = ((uint32_t) (*(inbuffer + offset))); + this->vertex_indices[i] |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->vertex_indices[i] |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->vertex_indices[i] |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->vertex_indices[i]); + } + return offset; + } + + const char * getType(){ return "shape_msgs/MeshTriangle"; }; + const char * getMD5(){ return "23688b2e6d2de3d32fe8af104a903253"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/shape_msgs/Plane.h b/source/ros-max-lib/ros_lib/shape_msgs/Plane.h new file mode 100644 index 0000000000000000000000000000000000000000..6f4c33283e6f1b560b5d141b989510495f3d13c2 --- /dev/null +++ b/source/ros-max-lib/ros_lib/shape_msgs/Plane.h @@ -0,0 +1,73 @@ +#ifndef _ROS_shape_msgs_Plane_h +#define _ROS_shape_msgs_Plane_h + +#include +#include +#include +#include "ros/msg.h" + +namespace shape_msgs +{ + + class Plane : public ros::Msg + { + public: + double coef[4]; + + Plane(): + coef() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + for( uint32_t i = 0; i < 4; i++){ + union { + double real; + uint64_t base; + } u_coefi; + u_coefi.real = this->coef[i]; + *(outbuffer + offset + 0) = (u_coefi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_coefi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_coefi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_coefi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_coefi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_coefi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_coefi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_coefi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->coef[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + for( uint32_t i = 0; i < 4; i++){ + union { + double real; + uint64_t base; + } u_coefi; + u_coefi.base = 0; + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_coefi.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->coef[i] = u_coefi.real; + offset += sizeof(this->coef[i]); + } + return offset; + } + + const char * getType(){ return "shape_msgs/Plane"; }; + const char * getMD5(){ return "2c1b92ed8f31492f8e73f6a4a44ca796"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/shape_msgs/SolidPrimitive.h b/source/ros-max-lib/ros_lib/shape_msgs/SolidPrimitive.h new file mode 100644 index 0000000000000000000000000000000000000000..4751ad84b802ce46a5370c604dcd42b2e32a561e --- /dev/null +++ b/source/ros-max-lib/ros_lib/shape_msgs/SolidPrimitive.h @@ -0,0 +1,109 @@ +#ifndef _ROS_shape_msgs_SolidPrimitive_h +#define _ROS_shape_msgs_SolidPrimitive_h + +#include +#include +#include +#include "ros/msg.h" + +namespace shape_msgs +{ + + class SolidPrimitive : public ros::Msg + { + public: + typedef uint8_t _type_type; + _type_type type; + uint32_t dimensions_length; + typedef double _dimensions_type; + _dimensions_type st_dimensions; + _dimensions_type * dimensions; + enum { BOX = 1 }; + enum { SPHERE = 2 }; + enum { CYLINDER = 3 }; + enum { CONE = 4 }; + enum { BOX_X = 0 }; + enum { BOX_Y = 1 }; + enum { BOX_Z = 2 }; + enum { SPHERE_RADIUS = 0 }; + enum { CYLINDER_HEIGHT = 0 }; + enum { CYLINDER_RADIUS = 1 }; + enum { CONE_HEIGHT = 0 }; + enum { CONE_RADIUS = 1 }; + + SolidPrimitive(): + type(0), + dimensions_length(0), dimensions(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->type >> (8 * 0)) & 0xFF; + offset += sizeof(this->type); + *(outbuffer + offset + 0) = (this->dimensions_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->dimensions_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->dimensions_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->dimensions_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->dimensions_length); + for( uint32_t i = 0; i < dimensions_length; i++){ + union { + double real; + uint64_t base; + } u_dimensionsi; + u_dimensionsi.real = this->dimensions[i]; + *(outbuffer + offset + 0) = (u_dimensionsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_dimensionsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_dimensionsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_dimensionsi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_dimensionsi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_dimensionsi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_dimensionsi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_dimensionsi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->dimensions[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->type); + uint32_t dimensions_lengthT = ((uint32_t) (*(inbuffer + offset))); + dimensions_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + dimensions_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + dimensions_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->dimensions_length); + if(dimensions_lengthT > dimensions_length) + this->dimensions = (double*)realloc(this->dimensions, dimensions_lengthT * sizeof(double)); + dimensions_length = dimensions_lengthT; + for( uint32_t i = 0; i < dimensions_length; i++){ + union { + double real; + uint64_t base; + } u_st_dimensions; + u_st_dimensions.base = 0; + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_dimensions.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_dimensions = u_st_dimensions.real; + offset += sizeof(this->st_dimensions); + memcpy( &(this->dimensions[i]), &(this->st_dimensions), sizeof(double)); + } + return offset; + } + + const char * getType(){ return "shape_msgs/SolidPrimitive"; }; + const char * getMD5(){ return "d8f8cbc74c5ff283fca29569ccefb45d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/smach_msgs/SmachContainerInitialStatusCmd.h b/source/ros-max-lib/ros_lib/smach_msgs/SmachContainerInitialStatusCmd.h new file mode 100644 index 0000000000000000000000000000000000000000..bd1e131c81d15d730c69b379c3c40d39cfaec5aa --- /dev/null +++ b/source/ros-max-lib/ros_lib/smach_msgs/SmachContainerInitialStatusCmd.h @@ -0,0 +1,109 @@ +#ifndef _ROS_smach_msgs_SmachContainerInitialStatusCmd_h +#define _ROS_smach_msgs_SmachContainerInitialStatusCmd_h + +#include +#include +#include +#include "ros/msg.h" + +namespace smach_msgs +{ + + class SmachContainerInitialStatusCmd : public ros::Msg + { + public: + typedef const char* _path_type; + _path_type path; + uint32_t initial_states_length; + typedef char* _initial_states_type; + _initial_states_type st_initial_states; + _initial_states_type * initial_states; + typedef const char* _local_data_type; + _local_data_type local_data; + + SmachContainerInitialStatusCmd(): + path(""), + initial_states_length(0), initial_states(NULL), + local_data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_path = strlen(this->path); + varToArr(outbuffer + offset, length_path); + offset += 4; + memcpy(outbuffer + offset, this->path, length_path); + offset += length_path; + *(outbuffer + offset + 0) = (this->initial_states_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->initial_states_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->initial_states_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->initial_states_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->initial_states_length); + for( uint32_t i = 0; i < initial_states_length; i++){ + uint32_t length_initial_statesi = strlen(this->initial_states[i]); + varToArr(outbuffer + offset, length_initial_statesi); + offset += 4; + memcpy(outbuffer + offset, this->initial_states[i], length_initial_statesi); + offset += length_initial_statesi; + } + uint32_t length_local_data = strlen(this->local_data); + varToArr(outbuffer + offset, length_local_data); + offset += 4; + memcpy(outbuffer + offset, this->local_data, length_local_data); + offset += length_local_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_path; + arrToVar(length_path, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_path; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_path-1]=0; + this->path = (char *)(inbuffer + offset-1); + offset += length_path; + uint32_t initial_states_lengthT = ((uint32_t) (*(inbuffer + offset))); + initial_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + initial_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + initial_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->initial_states_length); + if(initial_states_lengthT > initial_states_length) + this->initial_states = (char**)realloc(this->initial_states, initial_states_lengthT * sizeof(char*)); + initial_states_length = initial_states_lengthT; + for( uint32_t i = 0; i < initial_states_length; i++){ + uint32_t length_st_initial_states; + arrToVar(length_st_initial_states, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_initial_states; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_initial_states-1]=0; + this->st_initial_states = (char *)(inbuffer + offset-1); + offset += length_st_initial_states; + memcpy( &(this->initial_states[i]), &(this->st_initial_states), sizeof(char*)); + } + uint32_t length_local_data; + arrToVar(length_local_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_local_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_local_data-1]=0; + this->local_data = (char *)(inbuffer + offset-1); + offset += length_local_data; + return offset; + } + + const char * getType(){ return "smach_msgs/SmachContainerInitialStatusCmd"; }; + const char * getMD5(){ return "45f8cf31fc29b829db77f23001f788d6"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/smach_msgs/SmachContainerStatus.h b/source/ros-max-lib/ros_lib/smach_msgs/SmachContainerStatus.h new file mode 100644 index 0000000000000000000000000000000000000000..8c54da30d8ca7008710692b3dbaab85883c03771 --- /dev/null +++ b/source/ros-max-lib/ros_lib/smach_msgs/SmachContainerStatus.h @@ -0,0 +1,169 @@ +#ifndef _ROS_smach_msgs_SmachContainerStatus_h +#define _ROS_smach_msgs_SmachContainerStatus_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace smach_msgs +{ + + class SmachContainerStatus : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _path_type; + _path_type path; + uint32_t initial_states_length; + typedef char* _initial_states_type; + _initial_states_type st_initial_states; + _initial_states_type * initial_states; + uint32_t active_states_length; + typedef char* _active_states_type; + _active_states_type st_active_states; + _active_states_type * active_states; + typedef const char* _local_data_type; + _local_data_type local_data; + typedef const char* _info_type; + _info_type info; + + SmachContainerStatus(): + header(), + path(""), + initial_states_length(0), initial_states(NULL), + active_states_length(0), active_states(NULL), + local_data(""), + info("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_path = strlen(this->path); + varToArr(outbuffer + offset, length_path); + offset += 4; + memcpy(outbuffer + offset, this->path, length_path); + offset += length_path; + *(outbuffer + offset + 0) = (this->initial_states_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->initial_states_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->initial_states_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->initial_states_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->initial_states_length); + for( uint32_t i = 0; i < initial_states_length; i++){ + uint32_t length_initial_statesi = strlen(this->initial_states[i]); + varToArr(outbuffer + offset, length_initial_statesi); + offset += 4; + memcpy(outbuffer + offset, this->initial_states[i], length_initial_statesi); + offset += length_initial_statesi; + } + *(outbuffer + offset + 0) = (this->active_states_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->active_states_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->active_states_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->active_states_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->active_states_length); + for( uint32_t i = 0; i < active_states_length; i++){ + uint32_t length_active_statesi = strlen(this->active_states[i]); + varToArr(outbuffer + offset, length_active_statesi); + offset += 4; + memcpy(outbuffer + offset, this->active_states[i], length_active_statesi); + offset += length_active_statesi; + } + uint32_t length_local_data = strlen(this->local_data); + varToArr(outbuffer + offset, length_local_data); + offset += 4; + memcpy(outbuffer + offset, this->local_data, length_local_data); + offset += length_local_data; + uint32_t length_info = strlen(this->info); + varToArr(outbuffer + offset, length_info); + offset += 4; + memcpy(outbuffer + offset, this->info, length_info); + offset += length_info; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_path; + arrToVar(length_path, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_path; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_path-1]=0; + this->path = (char *)(inbuffer + offset-1); + offset += length_path; + uint32_t initial_states_lengthT = ((uint32_t) (*(inbuffer + offset))); + initial_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + initial_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + initial_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->initial_states_length); + if(initial_states_lengthT > initial_states_length) + this->initial_states = (char**)realloc(this->initial_states, initial_states_lengthT * sizeof(char*)); + initial_states_length = initial_states_lengthT; + for( uint32_t i = 0; i < initial_states_length; i++){ + uint32_t length_st_initial_states; + arrToVar(length_st_initial_states, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_initial_states; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_initial_states-1]=0; + this->st_initial_states = (char *)(inbuffer + offset-1); + offset += length_st_initial_states; + memcpy( &(this->initial_states[i]), &(this->st_initial_states), sizeof(char*)); + } + uint32_t active_states_lengthT = ((uint32_t) (*(inbuffer + offset))); + active_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + active_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + active_states_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->active_states_length); + if(active_states_lengthT > active_states_length) + this->active_states = (char**)realloc(this->active_states, active_states_lengthT * sizeof(char*)); + active_states_length = active_states_lengthT; + for( uint32_t i = 0; i < active_states_length; i++){ + uint32_t length_st_active_states; + arrToVar(length_st_active_states, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_active_states; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_active_states-1]=0; + this->st_active_states = (char *)(inbuffer + offset-1); + offset += length_st_active_states; + memcpy( &(this->active_states[i]), &(this->st_active_states), sizeof(char*)); + } + uint32_t length_local_data; + arrToVar(length_local_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_local_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_local_data-1]=0; + this->local_data = (char *)(inbuffer + offset-1); + offset += length_local_data; + uint32_t length_info; + arrToVar(length_info, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_info; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_info-1]=0; + this->info = (char *)(inbuffer + offset-1); + offset += length_info; + return offset; + } + + const char * getType(){ return "smach_msgs/SmachContainerStatus"; }; + const char * getMD5(){ return "5ba2bb79ac19e3842d562a191f2a675b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/smach_msgs/SmachContainerStructure.h b/source/ros-max-lib/ros_lib/smach_msgs/SmachContainerStructure.h new file mode 100644 index 0000000000000000000000000000000000000000..935b7e1e264beee67f9af8bae95f7d1d7a492ce2 --- /dev/null +++ b/source/ros-max-lib/ros_lib/smach_msgs/SmachContainerStructure.h @@ -0,0 +1,246 @@ +#ifndef _ROS_smach_msgs_SmachContainerStructure_h +#define _ROS_smach_msgs_SmachContainerStructure_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace smach_msgs +{ + + class SmachContainerStructure : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _path_type; + _path_type path; + uint32_t children_length; + typedef char* _children_type; + _children_type st_children; + _children_type * children; + uint32_t internal_outcomes_length; + typedef char* _internal_outcomes_type; + _internal_outcomes_type st_internal_outcomes; + _internal_outcomes_type * internal_outcomes; + uint32_t outcomes_from_length; + typedef char* _outcomes_from_type; + _outcomes_from_type st_outcomes_from; + _outcomes_from_type * outcomes_from; + uint32_t outcomes_to_length; + typedef char* _outcomes_to_type; + _outcomes_to_type st_outcomes_to; + _outcomes_to_type * outcomes_to; + uint32_t container_outcomes_length; + typedef char* _container_outcomes_type; + _container_outcomes_type st_container_outcomes; + _container_outcomes_type * container_outcomes; + + SmachContainerStructure(): + header(), + path(""), + children_length(0), children(NULL), + internal_outcomes_length(0), internal_outcomes(NULL), + outcomes_from_length(0), outcomes_from(NULL), + outcomes_to_length(0), outcomes_to(NULL), + container_outcomes_length(0), container_outcomes(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_path = strlen(this->path); + varToArr(outbuffer + offset, length_path); + offset += 4; + memcpy(outbuffer + offset, this->path, length_path); + offset += length_path; + *(outbuffer + offset + 0) = (this->children_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->children_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->children_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->children_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->children_length); + for( uint32_t i = 0; i < children_length; i++){ + uint32_t length_childreni = strlen(this->children[i]); + varToArr(outbuffer + offset, length_childreni); + offset += 4; + memcpy(outbuffer + offset, this->children[i], length_childreni); + offset += length_childreni; + } + *(outbuffer + offset + 0) = (this->internal_outcomes_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->internal_outcomes_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->internal_outcomes_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->internal_outcomes_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->internal_outcomes_length); + for( uint32_t i = 0; i < internal_outcomes_length; i++){ + uint32_t length_internal_outcomesi = strlen(this->internal_outcomes[i]); + varToArr(outbuffer + offset, length_internal_outcomesi); + offset += 4; + memcpy(outbuffer + offset, this->internal_outcomes[i], length_internal_outcomesi); + offset += length_internal_outcomesi; + } + *(outbuffer + offset + 0) = (this->outcomes_from_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->outcomes_from_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->outcomes_from_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->outcomes_from_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->outcomes_from_length); + for( uint32_t i = 0; i < outcomes_from_length; i++){ + uint32_t length_outcomes_fromi = strlen(this->outcomes_from[i]); + varToArr(outbuffer + offset, length_outcomes_fromi); + offset += 4; + memcpy(outbuffer + offset, this->outcomes_from[i], length_outcomes_fromi); + offset += length_outcomes_fromi; + } + *(outbuffer + offset + 0) = (this->outcomes_to_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->outcomes_to_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->outcomes_to_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->outcomes_to_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->outcomes_to_length); + for( uint32_t i = 0; i < outcomes_to_length; i++){ + uint32_t length_outcomes_toi = strlen(this->outcomes_to[i]); + varToArr(outbuffer + offset, length_outcomes_toi); + offset += 4; + memcpy(outbuffer + offset, this->outcomes_to[i], length_outcomes_toi); + offset += length_outcomes_toi; + } + *(outbuffer + offset + 0) = (this->container_outcomes_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->container_outcomes_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->container_outcomes_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->container_outcomes_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->container_outcomes_length); + for( uint32_t i = 0; i < container_outcomes_length; i++){ + uint32_t length_container_outcomesi = strlen(this->container_outcomes[i]); + varToArr(outbuffer + offset, length_container_outcomesi); + offset += 4; + memcpy(outbuffer + offset, this->container_outcomes[i], length_container_outcomesi); + offset += length_container_outcomesi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_path; + arrToVar(length_path, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_path; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_path-1]=0; + this->path = (char *)(inbuffer + offset-1); + offset += length_path; + uint32_t children_lengthT = ((uint32_t) (*(inbuffer + offset))); + children_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + children_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + children_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->children_length); + if(children_lengthT > children_length) + this->children = (char**)realloc(this->children, children_lengthT * sizeof(char*)); + children_length = children_lengthT; + for( uint32_t i = 0; i < children_length; i++){ + uint32_t length_st_children; + arrToVar(length_st_children, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_children; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_children-1]=0; + this->st_children = (char *)(inbuffer + offset-1); + offset += length_st_children; + memcpy( &(this->children[i]), &(this->st_children), sizeof(char*)); + } + uint32_t internal_outcomes_lengthT = ((uint32_t) (*(inbuffer + offset))); + internal_outcomes_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + internal_outcomes_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + internal_outcomes_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->internal_outcomes_length); + if(internal_outcomes_lengthT > internal_outcomes_length) + this->internal_outcomes = (char**)realloc(this->internal_outcomes, internal_outcomes_lengthT * sizeof(char*)); + internal_outcomes_length = internal_outcomes_lengthT; + for( uint32_t i = 0; i < internal_outcomes_length; i++){ + uint32_t length_st_internal_outcomes; + arrToVar(length_st_internal_outcomes, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_internal_outcomes; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_internal_outcomes-1]=0; + this->st_internal_outcomes = (char *)(inbuffer + offset-1); + offset += length_st_internal_outcomes; + memcpy( &(this->internal_outcomes[i]), &(this->st_internal_outcomes), sizeof(char*)); + } + uint32_t outcomes_from_lengthT = ((uint32_t) (*(inbuffer + offset))); + outcomes_from_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + outcomes_from_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + outcomes_from_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->outcomes_from_length); + if(outcomes_from_lengthT > outcomes_from_length) + this->outcomes_from = (char**)realloc(this->outcomes_from, outcomes_from_lengthT * sizeof(char*)); + outcomes_from_length = outcomes_from_lengthT; + for( uint32_t i = 0; i < outcomes_from_length; i++){ + uint32_t length_st_outcomes_from; + arrToVar(length_st_outcomes_from, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_outcomes_from; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_outcomes_from-1]=0; + this->st_outcomes_from = (char *)(inbuffer + offset-1); + offset += length_st_outcomes_from; + memcpy( &(this->outcomes_from[i]), &(this->st_outcomes_from), sizeof(char*)); + } + uint32_t outcomes_to_lengthT = ((uint32_t) (*(inbuffer + offset))); + outcomes_to_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + outcomes_to_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + outcomes_to_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->outcomes_to_length); + if(outcomes_to_lengthT > outcomes_to_length) + this->outcomes_to = (char**)realloc(this->outcomes_to, outcomes_to_lengthT * sizeof(char*)); + outcomes_to_length = outcomes_to_lengthT; + for( uint32_t i = 0; i < outcomes_to_length; i++){ + uint32_t length_st_outcomes_to; + arrToVar(length_st_outcomes_to, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_outcomes_to; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_outcomes_to-1]=0; + this->st_outcomes_to = (char *)(inbuffer + offset-1); + offset += length_st_outcomes_to; + memcpy( &(this->outcomes_to[i]), &(this->st_outcomes_to), sizeof(char*)); + } + uint32_t container_outcomes_lengthT = ((uint32_t) (*(inbuffer + offset))); + container_outcomes_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + container_outcomes_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + container_outcomes_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->container_outcomes_length); + if(container_outcomes_lengthT > container_outcomes_length) + this->container_outcomes = (char**)realloc(this->container_outcomes, container_outcomes_lengthT * sizeof(char*)); + container_outcomes_length = container_outcomes_lengthT; + for( uint32_t i = 0; i < container_outcomes_length; i++){ + uint32_t length_st_container_outcomes; + arrToVar(length_st_container_outcomes, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_container_outcomes; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_container_outcomes-1]=0; + this->st_container_outcomes = (char *)(inbuffer + offset-1); + offset += length_st_container_outcomes; + memcpy( &(this->container_outcomes[i]), &(this->st_container_outcomes), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return "smach_msgs/SmachContainerStructure"; }; + const char * getMD5(){ return "3d3d1e0d0f99779ee9e58101a5dcf7ea"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/statistics_msgs/Stats1D.h b/source/ros-max-lib/ros_lib/statistics_msgs/Stats1D.h new file mode 100644 index 0000000000000000000000000000000000000000..9b3b256159b78f6fdf7b7aa1440cd25ec0afa4fb --- /dev/null +++ b/source/ros-max-lib/ros_lib/statistics_msgs/Stats1D.h @@ -0,0 +1,198 @@ +#ifndef _ROS_statistics_msgs_Stats1D_h +#define _ROS_statistics_msgs_Stats1D_h + +#include +#include +#include +#include "ros/msg.h" + +namespace statistics_msgs +{ + + class Stats1D : public ros::Msg + { + public: + typedef double _min_type; + _min_type min; + typedef double _max_type; + _max_type max; + typedef double _mean_type; + _mean_type mean; + typedef double _variance_type; + _variance_type variance; + typedef int64_t _N_type; + _N_type N; + + Stats1D(): + min(0), + max(0), + mean(0), + variance(0), + N(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_min; + u_min.real = this->min; + *(outbuffer + offset + 0) = (u_min.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_min.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_min.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_min.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_min.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_min.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_min.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_min.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->min); + union { + double real; + uint64_t base; + } u_max; + u_max.real = this->max; + *(outbuffer + offset + 0) = (u_max.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_max.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_max.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_max.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_max.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->max); + union { + double real; + uint64_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; + *(outbuffer + offset + 4) = (u_mean.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_mean.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_mean.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_mean.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->mean); + union { + double real; + uint64_t base; + } u_variance; + u_variance.real = this->variance; + *(outbuffer + offset + 0) = (u_variance.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_variance.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_variance.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_variance.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_variance.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_variance.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_variance.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_variance.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->variance); + union { + int64_t real; + uint64_t base; + } u_N; + u_N.real = this->N; + *(outbuffer + offset + 0) = (u_N.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_N.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_N.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_N.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_N.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_N.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_N.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_N.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->N); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_min; + u_min.base = 0; + u_min.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_min.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_min.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_min.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_min.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_min.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_min.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_min.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->min = u_min.real; + offset += sizeof(this->min); + union { + double real; + uint64_t base; + } u_max; + u_max.base = 0; + u_max.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_max.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_max.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_max.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_max.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->max = u_max.real; + offset += sizeof(this->max); + union { + double real; + uint64_t base; + } u_mean; + u_mean.base = 0; + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_mean.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->mean = u_mean.real; + offset += sizeof(this->mean); + union { + double real; + uint64_t base; + } u_variance; + u_variance.base = 0; + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_variance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->variance = u_variance.real; + offset += sizeof(this->variance); + union { + int64_t real; + uint64_t base; + } u_N; + u_N.base = 0; + u_N.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_N.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_N.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_N.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_N.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_N.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_N.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_N.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->N = u_N.real; + offset += sizeof(this->N); + return offset; + } + + const char * getType(){ return "statistics_msgs/Stats1D"; }; + const char * getMD5(){ return "5e29efbcd70d63a82b5ddfac24a5bc4b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/Bool.h b/source/ros-max-lib/ros_lib/std_msgs/Bool.h new file mode 100644 index 0000000000000000000000000000000000000000..6641dd0f52728abf0aa03c70c7fc97ab3f4ec3f5 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/Bool.h @@ -0,0 +1,56 @@ +#ifndef _ROS_std_msgs_Bool_h +#define _ROS_std_msgs_Bool_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Bool : public ros::Msg + { + public: + typedef bool _data_type; + _data_type data; + + Bool(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_data; + u_data.real = this->data; + *(outbuffer + offset + 0) = (u_data.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_data; + u_data.base = 0; + u_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->data = u_data.real; + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/Bool"; }; + const char * getMD5(){ return "8b94c1b53db61fb6aed406028ad6332a"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/Byte.h b/source/ros-max-lib/ros_lib/std_msgs/Byte.h new file mode 100644 index 0000000000000000000000000000000000000000..bf81f6fad3e5fb9f2c1dadda9d891eb72a5f971d --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/Byte.h @@ -0,0 +1,56 @@ +#ifndef _ROS_std_msgs_Byte_h +#define _ROS_std_msgs_Byte_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Byte : public ros::Msg + { + public: + typedef int8_t _data_type; + _data_type data; + + Byte(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_data; + u_data.real = this->data; + *(outbuffer + offset + 0) = (u_data.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_data; + u_data.base = 0; + u_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->data = u_data.real; + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/Byte"; }; + const char * getMD5(){ return "ad736a2e8818154c487bb80fe42ce43b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/ByteMultiArray.h b/source/ros-max-lib/ros_lib/std_msgs/ByteMultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..bf3f8b4909eb9167591bfad8bb094834b549d250 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/ByteMultiArray.h @@ -0,0 +1,82 @@ +#ifndef _ROS_std_msgs_ByteMultiArray_h +#define _ROS_std_msgs_ByteMultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class ByteMultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef int8_t _data_type; + _data_type st_data; + _data_type * data; + + ByteMultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (int8_t*)realloc(this->data, data_lengthT * sizeof(int8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(int8_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/ByteMultiArray"; }; + const char * getMD5(){ return "70ea476cbcfd65ac2f68f3cda1e891fe"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/Char.h b/source/ros-max-lib/ros_lib/std_msgs/Char.h new file mode 100644 index 0000000000000000000000000000000000000000..ab3340fb9ace6666af471271003096d3915d1c36 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/Char.h @@ -0,0 +1,45 @@ +#ifndef _ROS_std_msgs_Char_h +#define _ROS_std_msgs_Char_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Char : public ros::Msg + { + public: + typedef uint8_t _data_type; + _data_type data; + + Char(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->data >> (8 * 0)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/Char"; }; + const char * getMD5(){ return "1bf77f25acecdedba0e224b162199717"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/ColorRGBA.h b/source/ros-max-lib/ros_lib/std_msgs/ColorRGBA.h new file mode 100644 index 0000000000000000000000000000000000000000..e782d2fd0ee1e1d82601d6d4afae55ab330dc071 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/ColorRGBA.h @@ -0,0 +1,134 @@ +#ifndef _ROS_std_msgs_ColorRGBA_h +#define _ROS_std_msgs_ColorRGBA_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class ColorRGBA : public ros::Msg + { + public: + typedef float _r_type; + _r_type r; + typedef float _g_type; + _g_type g; + typedef float _b_type; + _b_type b; + typedef float _a_type; + _a_type a; + + ColorRGBA(): + r(0), + g(0), + b(0), + a(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_r; + u_r.real = this->r; + *(outbuffer + offset + 0) = (u_r.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_r.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_r.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_r.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->r); + union { + float real; + uint32_t base; + } u_g; + u_g.real = this->g; + *(outbuffer + offset + 0) = (u_g.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_g.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_g.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_g.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->g); + union { + float real; + uint32_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; + offset += sizeof(this->b); + union { + float real; + uint32_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; + offset += sizeof(this->a); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_r; + u_r.base = 0; + u_r.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_r.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_r.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_r.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->r = u_r.real; + offset += sizeof(this->r); + union { + float real; + uint32_t base; + } u_g; + u_g.base = 0; + u_g.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_g.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_g.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_g.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->g = u_g.real; + offset += sizeof(this->g); + union { + float real; + uint32_t base; + } u_b; + u_b.base = 0; + u_b.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_b.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_b.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_b.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->b = u_b.real; + offset += sizeof(this->b); + union { + float real; + uint32_t base; + } u_a; + u_a.base = 0; + u_a.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_a.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_a.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_a.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->a = u_a.real; + offset += sizeof(this->a); + return offset; + } + + const char * getType(){ return "std_msgs/ColorRGBA"; }; + const char * getMD5(){ return "a29a96539573343b1310c73607334b00"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/Duration.h b/source/ros-max-lib/ros_lib/std_msgs/Duration.h new file mode 100644 index 0000000000000000000000000000000000000000..9373f3569e0b9eece42305e3e592d81cb2e2f15b --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/Duration.h @@ -0,0 +1,62 @@ +#ifndef _ROS_std_msgs_Duration_h +#define _ROS_std_msgs_Duration_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/duration.h" + +namespace std_msgs +{ + + class Duration : public ros::Msg + { + public: + typedef ros::Duration _data_type; + _data_type data; + + Duration(): + data() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->data.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->data.sec); + *(outbuffer + offset + 0) = (this->data.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->data.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->data.sec = ((uint32_t) (*(inbuffer + offset))); + this->data.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->data.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->data.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data.sec); + this->data.nsec = ((uint32_t) (*(inbuffer + offset))); + this->data.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->data.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->data.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data.nsec); + return offset; + } + + const char * getType(){ return "std_msgs/Duration"; }; + const char * getMD5(){ return "3e286caf4241d664e55f3ad380e2ae46"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/Empty.h b/source/ros-max-lib/ros_lib/std_msgs/Empty.h new file mode 100644 index 0000000000000000000000000000000000000000..440e5edc4bab6237b1d90e82e59fa46140bd02db --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/Empty.h @@ -0,0 +1,38 @@ +#ifndef _ROS_std_msgs_Empty_h +#define _ROS_std_msgs_Empty_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Empty : public ros::Msg + { + public: + + Empty() + { + } + + 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 "std_msgs/Empty"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/Float32.h b/source/ros-max-lib/ros_lib/std_msgs/Float32.h new file mode 100644 index 0000000000000000000000000000000000000000..07fc43525ae393efae8f1f1c0ef0dd27c0961d83 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/Float32.h @@ -0,0 +1,62 @@ +#ifndef _ROS_std_msgs_Float32_h +#define _ROS_std_msgs_Float32_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Float32 : public ros::Msg + { + public: + typedef float _data_type; + _data_type data; + + Float32(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + 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); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + 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); + return offset; + } + + const char * getType(){ return "std_msgs/Float32"; }; + const char * getMD5(){ return "73fcbf46b49191e672908e50842a83d4"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/Float32MultiArray.h b/source/ros-max-lib/ros_lib/std_msgs/Float32MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..08800d06623b38a7f350ef62b97b822cb7d11cad --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/Float32MultiArray.h @@ -0,0 +1,88 @@ +#ifndef _ROS_std_msgs_Float32MultiArray_h +#define _ROS_std_msgs_Float32MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class Float32MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef float _data_type; + _data_type st_data; + _data_type * data; + + Float32MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + float real; + uint32_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_datai.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_datai.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_datai.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (float*)realloc(this->data, data_lengthT * sizeof(float)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + float real; + uint32_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(float)); + } + return offset; + } + + const char * getType(){ return "std_msgs/Float32MultiArray"; }; + const char * getMD5(){ return "6a40e0ffa6a17a503ac3f8616991b1f6"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/Float64.h b/source/ros-max-lib/ros_lib/std_msgs/Float64.h new file mode 100644 index 0000000000000000000000000000000000000000..b566cb64b3de0c033e4e299b75cf6d44a48e2472 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/Float64.h @@ -0,0 +1,70 @@ +#ifndef _ROS_std_msgs_Float64_h +#define _ROS_std_msgs_Float64_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Float64 : public ros::Msg + { + public: + typedef double _data_type; + _data_type data; + + Float64(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_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; + *(outbuffer + offset + 4) = (u_data.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_data.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_data.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_data.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_data; + u_data.base = 0; + u_data.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->data = u_data.real; + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/Float64"; }; + const char * getMD5(){ return "fdb28210bfa9d7c91146260178d9a584"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/Float64MultiArray.h b/source/ros-max-lib/ros_lib/std_msgs/Float64MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..219abe6b20ef3648b8309367c488f32dd2a1e8d4 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/Float64MultiArray.h @@ -0,0 +1,96 @@ +#ifndef _ROS_std_msgs_Float64MultiArray_h +#define _ROS_std_msgs_Float64MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class Float64MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef double _data_type; + _data_type st_data; + _data_type * data; + + Float64MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + double real; + uint64_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_datai.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_datai.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_datai.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_datai.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_datai.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_datai.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_datai.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (double*)realloc(this->data, data_lengthT * sizeof(double)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + double real; + uint64_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(double)); + } + return offset; + } + + const char * getType(){ return "std_msgs/Float64MultiArray"; }; + const char * getMD5(){ return "4b7d974086d4060e7db4613a7e6c3ba4"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/Header.h b/source/ros-max-lib/ros_lib/std_msgs/Header.h new file mode 100644 index 0000000000000000000000000000000000000000..658bd8434f8f93964a8cccff93dc9f7604640734 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/Header.h @@ -0,0 +1,92 @@ +#ifndef _ROS_std_msgs_Header_h +#define _ROS_std_msgs_Header_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../ros/time.h" + +namespace std_msgs +{ + + class Header : public ros::Msg + { + public: + typedef uint32_t _seq_type; + _seq_type seq; + typedef ros::Time _stamp_type; + _stamp_type stamp; + typedef const char* _frame_id_type; + _frame_id_type frame_id; + + Header(): + seq(0), + stamp(), + frame_id("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->seq >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->seq >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->seq >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->seq >> (8 * 3)) & 0xFF; + offset += sizeof(this->seq); + *(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_frame_id = strlen(this->frame_id); + varToArr(outbuffer + offset, length_frame_id); + offset += 4; + memcpy(outbuffer + offset, this->frame_id, length_frame_id); + offset += length_frame_id; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->seq = ((uint32_t) (*(inbuffer + offset))); + this->seq |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->seq |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->seq |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->seq); + 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_frame_id; + arrToVar(length_frame_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_frame_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_frame_id-1]=0; + this->frame_id = (char *)(inbuffer + offset-1); + offset += length_frame_id; + return offset; + } + + const char * getType(){ return "std_msgs/Header"; }; + const char * getMD5(){ return "2176decaecbce78abc3b96ef049fabed"; }; + + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/std_msgs/Int16.h b/source/ros-max-lib/ros_lib/std_msgs/Int16.h new file mode 100644 index 0000000000000000000000000000000000000000..8699431c0ef3f2fdb38d8fd0855abb60b70e5233 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/Int16.h @@ -0,0 +1,58 @@ +#ifndef _ROS_std_msgs_Int16_h +#define _ROS_std_msgs_Int16_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Int16 : public ros::Msg + { + public: + typedef int16_t _data_type; + _data_type data; + + Int16(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int16_t real; + uint16_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; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int16_t real; + uint16_t base; + } u_data; + u_data.base = 0; + u_data.base |= ((uint16_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_data.base |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->data = u_data.real; + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/Int16"; }; + const char * getMD5(){ return "8524586e34fbd7cb1c08c5f5f1ca0e57"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/Int16MultiArray.h b/source/ros-max-lib/ros_lib/std_msgs/Int16MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..09a685a7713378d2e8fab337778d410665d77218 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/Int16MultiArray.h @@ -0,0 +1,84 @@ +#ifndef _ROS_std_msgs_Int16MultiArray_h +#define _ROS_std_msgs_Int16MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class Int16MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef int16_t _data_type; + _data_type st_data; + _data_type * data; + + Int16MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + int16_t real; + uint16_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_datai.base >> (8 * 1)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (int16_t*)realloc(this->data, data_lengthT * sizeof(int16_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + int16_t real; + uint16_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint16_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_data.base |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(int16_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/Int16MultiArray"; }; + const char * getMD5(){ return "d9338d7f523fcb692fae9d0a0e9f067c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/Int32.h b/source/ros-max-lib/ros_lib/std_msgs/Int32.h new file mode 100644 index 0000000000000000000000000000000000000000..1f33bbd7b7970a9041d5aee3b7a91c02c7aec373 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/Int32.h @@ -0,0 +1,62 @@ +#ifndef _ROS_std_msgs_Int32_h +#define _ROS_std_msgs_Int32_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Int32 : public ros::Msg + { + public: + typedef int32_t _data_type; + _data_type data; + + Int32(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int32_t 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); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int32_t 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); + return offset; + } + + const char * getType(){ return "std_msgs/Int32"; }; + const char * getMD5(){ return "da5909fbe378aeaf85e547e830cc1bb7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/Int32MultiArray.h b/source/ros-max-lib/ros_lib/std_msgs/Int32MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..9dc349dddca047ef9cb3b7a88264fa95024b20b5 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/Int32MultiArray.h @@ -0,0 +1,88 @@ +#ifndef _ROS_std_msgs_Int32MultiArray_h +#define _ROS_std_msgs_Int32MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class Int32MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef int32_t _data_type; + _data_type st_data; + _data_type * data; + + Int32MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + int32_t real; + uint32_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_datai.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_datai.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_datai.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (int32_t*)realloc(this->data, data_lengthT * sizeof(int32_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + int32_t real; + uint32_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(int32_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/Int32MultiArray"; }; + const char * getMD5(){ return "1d99f79f8b325b44fee908053e9c945b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/Int64.h b/source/ros-max-lib/ros_lib/std_msgs/Int64.h new file mode 100644 index 0000000000000000000000000000000000000000..9edec3b1675050fe1707ae48c4334a70754b7bc5 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/Int64.h @@ -0,0 +1,70 @@ +#ifndef _ROS_std_msgs_Int64_h +#define _ROS_std_msgs_Int64_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Int64 : public ros::Msg + { + public: + typedef int64_t _data_type; + _data_type data; + + Int64(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int64_t real; + uint64_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; + *(outbuffer + offset + 4) = (u_data.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_data.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_data.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_data.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int64_t real; + uint64_t base; + } u_data; + u_data.base = 0; + u_data.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_data.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->data = u_data.real; + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/Int64"; }; + const char * getMD5(){ return "34add168574510e6e17f5d23ecc077ef"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/Int64MultiArray.h b/source/ros-max-lib/ros_lib/std_msgs/Int64MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..78157568ca5718f5872b2bbfe10d33b844ccf951 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/Int64MultiArray.h @@ -0,0 +1,96 @@ +#ifndef _ROS_std_msgs_Int64MultiArray_h +#define _ROS_std_msgs_Int64MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class Int64MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef int64_t _data_type; + _data_type st_data; + _data_type * data; + + Int64MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + int64_t real; + uint64_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_datai.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_datai.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_datai.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_datai.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_datai.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_datai.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_datai.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (int64_t*)realloc(this->data, data_lengthT * sizeof(int64_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + int64_t real; + uint64_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_data.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(int64_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/Int64MultiArray"; }; + const char * getMD5(){ return "54865aa6c65be0448113a2afc6a49270"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/Int8.h b/source/ros-max-lib/ros_lib/std_msgs/Int8.h new file mode 100644 index 0000000000000000000000000000000000000000..9509136e8945d06cee88db19972e01d603b6ae5d --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/Int8.h @@ -0,0 +1,56 @@ +#ifndef _ROS_std_msgs_Int8_h +#define _ROS_std_msgs_Int8_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class Int8 : public ros::Msg + { + public: + typedef int8_t _data_type; + _data_type data; + + Int8(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_data; + u_data.real = this->data; + *(outbuffer + offset + 0) = (u_data.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_data; + u_data.base = 0; + u_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->data = u_data.real; + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/Int8"; }; + const char * getMD5(){ return "27ffa0c9c4b8fb8492252bcad9e5c57b"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/Int8MultiArray.h b/source/ros-max-lib/ros_lib/std_msgs/Int8MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..38921a955e2e7ea7baaea1a4bee3a71e3be12bc1 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/Int8MultiArray.h @@ -0,0 +1,82 @@ +#ifndef _ROS_std_msgs_Int8MultiArray_h +#define _ROS_std_msgs_Int8MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class Int8MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef int8_t _data_type; + _data_type st_data; + _data_type * data; + + Int8MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (int8_t*)realloc(this->data, data_lengthT * sizeof(int8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + int8_t real; + uint8_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(int8_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/Int8MultiArray"; }; + const char * getMD5(){ return "d7c1af35a1b4781bbe79e03dd94b7c13"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/MultiArrayDimension.h b/source/ros-max-lib/ros_lib/std_msgs/MultiArrayDimension.h new file mode 100644 index 0000000000000000000000000000000000000000..72cb41645270f1df1f9a39f28abd392eedd82460 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/MultiArrayDimension.h @@ -0,0 +1,81 @@ +#ifndef _ROS_std_msgs_MultiArrayDimension_h +#define _ROS_std_msgs_MultiArrayDimension_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class MultiArrayDimension : public ros::Msg + { + public: + typedef const char* _label_type; + _label_type label; + typedef uint32_t _size_type; + _size_type size; + typedef uint32_t _stride_type; + _stride_type stride; + + MultiArrayDimension(): + label(""), + size(0), + stride(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_label = strlen(this->label); + varToArr(outbuffer + offset, length_label); + offset += 4; + memcpy(outbuffer + offset, this->label, length_label); + offset += length_label; + *(outbuffer + offset + 0) = (this->size >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->size >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->size >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->size >> (8 * 3)) & 0xFF; + offset += sizeof(this->size); + *(outbuffer + offset + 0) = (this->stride >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->stride >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->stride >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->stride >> (8 * 3)) & 0xFF; + offset += sizeof(this->stride); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_label; + arrToVar(length_label, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_label; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_label-1]=0; + this->label = (char *)(inbuffer + offset-1); + offset += length_label; + this->size = ((uint32_t) (*(inbuffer + offset))); + this->size |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->size |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->size |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->size); + this->stride = ((uint32_t) (*(inbuffer + offset))); + this->stride |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->stride |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->stride |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->stride); + return offset; + } + + const char * getType(){ return "std_msgs/MultiArrayDimension"; }; + const char * getMD5(){ return "4cd0c83a8683deae40ecdac60e53bfa8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/MultiArrayLayout.h b/source/ros-max-lib/ros_lib/std_msgs/MultiArrayLayout.h new file mode 100644 index 0000000000000000000000000000000000000000..3cf3cfbade7c2676aa6f86813ff00991e953fe8c --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/MultiArrayLayout.h @@ -0,0 +1,77 @@ +#ifndef _ROS_std_msgs_MultiArrayLayout_h +#define _ROS_std_msgs_MultiArrayLayout_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayDimension.h" + +namespace std_msgs +{ + + class MultiArrayLayout : public ros::Msg + { + public: + uint32_t dim_length; + typedef std_msgs::MultiArrayDimension _dim_type; + _dim_type st_dim; + _dim_type * dim; + typedef uint32_t _data_offset_type; + _data_offset_type data_offset; + + MultiArrayLayout(): + dim_length(0), dim(NULL), + data_offset(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->dim_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->dim_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->dim_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->dim_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->dim_length); + for( uint32_t i = 0; i < dim_length; i++){ + offset += this->dim[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->data_offset >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_offset >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_offset >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_offset >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t dim_lengthT = ((uint32_t) (*(inbuffer + offset))); + dim_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + dim_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + dim_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->dim_length); + if(dim_lengthT > dim_length) + this->dim = (std_msgs::MultiArrayDimension*)realloc(this->dim, dim_lengthT * sizeof(std_msgs::MultiArrayDimension)); + dim_length = dim_lengthT; + for( uint32_t i = 0; i < dim_length; i++){ + offset += this->st_dim.deserialize(inbuffer + offset); + memcpy( &(this->dim[i]), &(this->st_dim), sizeof(std_msgs::MultiArrayDimension)); + } + this->data_offset = ((uint32_t) (*(inbuffer + offset))); + this->data_offset |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->data_offset |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->data_offset |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_offset); + return offset; + } + + const char * getType(){ return "std_msgs/MultiArrayLayout"; }; + const char * getMD5(){ return "0fed2a11c13e11c5571b4e2a995a91a3"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/String.h b/source/ros-max-lib/ros_lib/std_msgs/String.h new file mode 100644 index 0000000000000000000000000000000000000000..de0bfa02cfb0f5af3bea1b892aafb8cd202162fd --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/String.h @@ -0,0 +1,55 @@ +#ifndef _ROS_std_msgs_String_h +#define _ROS_std_msgs_String_h + +#include +#include +#include +#include "../ros/msg.h" + +namespace std_msgs +{ + + class String : public ros::Msg + { + public: + typedef const char* _data_type; + _data_type data; + + String(): + data("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_data = strlen(this->data); + varToArr(outbuffer + offset, length_data); + offset += 4; + memcpy(outbuffer + offset, this->data, length_data); + offset += length_data; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_data; + arrToVar(length_data, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data-1]=0; + this->data = (char *)(inbuffer + offset-1); + offset += length_data; + return offset; + } + + const char * getType(){ return "std_msgs/String"; }; + const char * getMD5(){ return "992ce8a1687cec8c8bd883ec73ca41d1"; }; + + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/std_msgs/Time.h b/source/ros-max-lib/ros_lib/std_msgs/Time.h new file mode 100644 index 0000000000000000000000000000000000000000..2a6dd260a5734cd9ee4335d4177fbe96b31c6e39 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/Time.h @@ -0,0 +1,62 @@ +#ifndef _ROS_std_msgs_Time_h +#define _ROS_std_msgs_Time_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../ros/time.h" + +namespace std_msgs +{ + + class Time : public ros::Msg + { + public: + typedef ros::Time _data_type; + _data_type data; + + Time(): + data() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->data.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->data.sec); + *(outbuffer + offset + 0) = (this->data.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->data.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->data.sec = ((uint32_t) (*(inbuffer + offset))); + this->data.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->data.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->data.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data.sec); + this->data.nsec = ((uint32_t) (*(inbuffer + offset))); + this->data.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->data.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->data.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data.nsec); + return offset; + } + + const char * getType(){ return "std_msgs/Time"; }; + const char * getMD5(){ return "cd7166c74c552c311fbcc2fe5a7bc289"; }; + + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/std_msgs/UInt16.h b/source/ros-max-lib/ros_lib/std_msgs/UInt16.h new file mode 100644 index 0000000000000000000000000000000000000000..4da6884762ab2c6b573ec5adc7f226277eb95a48 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/UInt16.h @@ -0,0 +1,47 @@ +#ifndef _ROS_std_msgs_UInt16_h +#define _ROS_std_msgs_UInt16_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class UInt16 : public ros::Msg + { + public: + typedef uint16_t _data_type; + _data_type data; + + UInt16(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->data >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data >> (8 * 1)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->data = ((uint16_t) (*(inbuffer + offset))); + this->data |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/UInt16"; }; + const char * getMD5(){ return "1df79edf208b629fe6b81923a544552d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/UInt16MultiArray.h b/source/ros-max-lib/ros_lib/std_msgs/UInt16MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..26c0e8fed59987079d2d44e44cfaf696a0489caa --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/UInt16MultiArray.h @@ -0,0 +1,73 @@ +#ifndef _ROS_std_msgs_UInt16MultiArray_h +#define _ROS_std_msgs_UInt16MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class UInt16MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef uint16_t _data_type; + _data_type st_data; + _data_type * data; + + UInt16MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data[i] >> (8 * 1)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint16_t*)realloc(this->data, data_lengthT * sizeof(uint16_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint16_t) (*(inbuffer + offset))); + this->st_data |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint16_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/UInt16MultiArray"; }; + const char * getMD5(){ return "52f264f1c973c4b73790d384c6cb4484"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/UInt32.h b/source/ros-max-lib/ros_lib/std_msgs/UInt32.h new file mode 100644 index 0000000000000000000000000000000000000000..30ae02b445636dad4d7903743d8024ef98cab7eb --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/UInt32.h @@ -0,0 +1,51 @@ +#ifndef _ROS_std_msgs_UInt32_h +#define _ROS_std_msgs_UInt32_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class UInt32 : public ros::Msg + { + public: + typedef uint32_t _data_type; + _data_type data; + + UInt32(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->data >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data >> (8 * 3)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->data = ((uint32_t) (*(inbuffer + offset))); + this->data |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->data |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->data |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/UInt32"; }; + const char * getMD5(){ return "304a39449588c7f8ce2df6e8001c5fce"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/UInt32MultiArray.h b/source/ros-max-lib/ros_lib/std_msgs/UInt32MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..af46e7954e9ed5fd63e935d495d6ca72b3042954 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/UInt32MultiArray.h @@ -0,0 +1,77 @@ +#ifndef _ROS_std_msgs_UInt32MultiArray_h +#define _ROS_std_msgs_UInt32MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class UInt32MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef uint32_t _data_type; + _data_type st_data; + _data_type * data; + + UInt32MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data[i] >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data[i] >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data[i] >> (8 * 3)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint32_t*)realloc(this->data, data_lengthT * sizeof(uint32_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint32_t) (*(inbuffer + offset))); + this->st_data |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->st_data |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->st_data |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint32_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/UInt32MultiArray"; }; + const char * getMD5(){ return "4d6a180abc9be191b96a7eda6c8a233d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/UInt64.h b/source/ros-max-lib/ros_lib/std_msgs/UInt64.h new file mode 100644 index 0000000000000000000000000000000000000000..b7ab02dd2b61eead046cabe9e767954d6e376071 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/UInt64.h @@ -0,0 +1,62 @@ +#ifndef _ROS_std_msgs_UInt64_h +#define _ROS_std_msgs_UInt64_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class UInt64 : public ros::Msg + { + public: + typedef uint64_t _data_type; + _data_type data; + + UInt64(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + uint64_t 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); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + uint64_t 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); + return offset; + } + + const char * getType(){ return "std_msgs/UInt64"; }; + const char * getMD5(){ return "1b2a79973e8bf53d7b53acb71299cb57"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/UInt64MultiArray.h b/source/ros-max-lib/ros_lib/std_msgs/UInt64MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..4401271222df8f77e9814561859813e9f581e9d2 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/UInt64MultiArray.h @@ -0,0 +1,88 @@ +#ifndef _ROS_std_msgs_UInt64MultiArray_h +#define _ROS_std_msgs_UInt64MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class UInt64MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef uint64_t _data_type; + _data_type st_data; + _data_type * data; + + UInt64MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + union { + uint64_t real; + uint32_t base; + } u_datai; + u_datai.real = this->data[i]; + *(outbuffer + offset + 0) = (u_datai.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_datai.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_datai.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_datai.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint64_t*)realloc(this->data, data_lengthT * sizeof(uint64_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + union { + uint64_t real; + uint32_t base; + } u_st_data; + u_st_data.base = 0; + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_data.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_data = u_st_data.real; + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint64_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/UInt64MultiArray"; }; + const char * getMD5(){ return "6088f127afb1d6c72927aa1247e945af"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/UInt8.h b/source/ros-max-lib/ros_lib/std_msgs/UInt8.h new file mode 100644 index 0000000000000000000000000000000000000000..e41b04be21be8ee6f20fb9105da9b06042f22ca7 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/UInt8.h @@ -0,0 +1,45 @@ +#ifndef _ROS_std_msgs_UInt8_h +#define _ROS_std_msgs_UInt8_h + +#include +#include +#include +#include "ros/msg.h" + +namespace std_msgs +{ + + class UInt8 : public ros::Msg + { + public: + typedef uint8_t _data_type; + _data_type data; + + UInt8(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->data >> (8 * 0)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return "std_msgs/UInt8"; }; + const char * getMD5(){ return "7c8164229e7d2c17eb95e9231617fdee"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_msgs/UInt8MultiArray.h b/source/ros-max-lib/ros_lib/std_msgs/UInt8MultiArray.h new file mode 100644 index 0000000000000000000000000000000000000000..9ca2ac2e9bed363ba9a625d813e185eae4ac783e --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_msgs/UInt8MultiArray.h @@ -0,0 +1,71 @@ +#ifndef _ROS_std_msgs_UInt8MultiArray_h +#define _ROS_std_msgs_UInt8MultiArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/MultiArrayLayout.h" + +namespace std_msgs +{ + + class UInt8MultiArray : public ros::Msg + { + public: + typedef std_msgs::MultiArrayLayout _layout_type; + _layout_type layout; + uint32_t data_length; + typedef uint8_t _data_type; + _data_type st_data; + _data_type * data; + + UInt8MultiArray(): + layout(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->layout.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->layout.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint8_t*)realloc(this->data, data_lengthT * sizeof(uint8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint8_t)); + } + return offset; + } + + const char * getType(){ return "std_msgs/UInt8MultiArray"; }; + const char * getMD5(){ return "82373f1612381bb6ee473b5cd6f5d89c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/std_srvs/Empty.h b/source/ros-max-lib/ros_lib/std_srvs/Empty.h new file mode 100644 index 0000000000000000000000000000000000000000..b040dd2e233bddb00f68b71f4e9a2f5dad3e1ddb --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_srvs/Empty.h @@ -0,0 +1,70 @@ +#ifndef _ROS_SERVICE_Empty_h +#define _ROS_SERVICE_Empty_h +#include +#include +#include +#include "ros/msg.h" + +namespace std_srvs +{ + +static const char EMPTY[] = "std_srvs/Empty"; + + class EmptyRequest : public ros::Msg + { + public: + + EmptyRequest() + { + } + + 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 EMPTY; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class EmptyResponse : public ros::Msg + { + public: + + EmptyResponse() + { + } + + 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 EMPTY; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class Empty { + public: + typedef EmptyRequest Request; + typedef EmptyResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/std_srvs/SetBool.h b/source/ros-max-lib/ros_lib/std_srvs/SetBool.h new file mode 100644 index 0000000000000000000000000000000000000000..1feb34e2974a7ed2febe462bc34b4df4e91178e7 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_srvs/SetBool.h @@ -0,0 +1,123 @@ +#ifndef _ROS_SERVICE_SetBool_h +#define _ROS_SERVICE_SetBool_h +#include +#include +#include +#include "ros/msg.h" + +namespace std_srvs +{ + +static const char SETBOOL[] = "std_srvs/SetBool"; + + class SetBoolRequest : public ros::Msg + { + public: + typedef bool _data_type; + _data_type data; + + SetBoolRequest(): + data(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_data; + u_data.real = this->data; + *(outbuffer + offset + 0) = (u_data.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->data); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_data; + u_data.base = 0; + u_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->data = u_data.real; + offset += sizeof(this->data); + return offset; + } + + const char * getType(){ return SETBOOL; }; + const char * getMD5(){ return "8b94c1b53db61fb6aed406028ad6332a"; }; + + }; + + class SetBoolResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _message_type; + _message_type message; + + SetBoolResponse(): + success(0), + message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_message = strlen(this->message); + varToArr(outbuffer + offset, length_message); + offset += 4; + memcpy(outbuffer + offset, this->message, length_message); + offset += length_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_message; + arrToVar(length_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message-1]=0; + this->message = (char *)(inbuffer + offset-1); + offset += length_message; + return offset; + } + + const char * getType(){ return SETBOOL; }; + const char * getMD5(){ return "937c9679a518e3a18d831e57125ea522"; }; + + }; + + class SetBool { + public: + typedef SetBoolRequest Request; + typedef SetBoolResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/std_srvs/Trigger.h b/source/ros-max-lib/ros_lib/std_srvs/Trigger.h new file mode 100644 index 0000000000000000000000000000000000000000..34d1e48f7b57ba24b1e5888090a1369b2dedac85 --- /dev/null +++ b/source/ros-max-lib/ros_lib/std_srvs/Trigger.h @@ -0,0 +1,105 @@ +#ifndef _ROS_SERVICE_Trigger_h +#define _ROS_SERVICE_Trigger_h +#include +#include +#include +#include "ros/msg.h" + +namespace std_srvs +{ + +static const char TRIGGER[] = "std_srvs/Trigger"; + + class TriggerRequest : public ros::Msg + { + public: + + TriggerRequest() + { + } + + 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 TRIGGER; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class TriggerResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef const char* _message_type; + _message_type message; + + TriggerResponse(): + success(0), + message("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + uint32_t length_message = strlen(this->message); + varToArr(outbuffer + offset, length_message); + offset += 4; + memcpy(outbuffer + offset, this->message, length_message); + offset += length_message; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + uint32_t length_message; + arrToVar(length_message, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_message; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_message-1]=0; + this->message = (char *)(inbuffer + offset-1); + offset += length_message; + return offset; + } + + const char * getType(){ return TRIGGER; }; + const char * getMD5(){ return "937c9679a518e3a18d831e57125ea522"; }; + + }; + + class Trigger { + public: + typedef TriggerRequest Request; + typedef TriggerResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/stereo_msgs/DisparityImage.h b/source/ros-max-lib/ros_lib/stereo_msgs/DisparityImage.h new file mode 100644 index 0000000000000000000000000000000000000000..90b3f28673e9d90c8515a93d8a92bdfed911db77 --- /dev/null +++ b/source/ros-max-lib/ros_lib/stereo_msgs/DisparityImage.h @@ -0,0 +1,176 @@ +#ifndef _ROS_stereo_msgs_DisparityImage_h +#define _ROS_stereo_msgs_DisparityImage_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/Image.h" +#include "sensor_msgs/RegionOfInterest.h" + +namespace stereo_msgs +{ + + class DisparityImage : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef sensor_msgs::Image _image_type; + _image_type image; + typedef float _f_type; + _f_type f; + typedef float _T_type; + _T_type T; + typedef sensor_msgs::RegionOfInterest _valid_window_type; + _valid_window_type valid_window; + typedef float _min_disparity_type; + _min_disparity_type min_disparity; + typedef float _max_disparity_type; + _max_disparity_type max_disparity; + typedef float _delta_d_type; + _delta_d_type delta_d; + + DisparityImage(): + header(), + image(), + f(0), + T(0), + valid_window(), + min_disparity(0), + max_disparity(0), + delta_d(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->image.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_f; + u_f.real = this->f; + *(outbuffer + offset + 0) = (u_f.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_f.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_f.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_f.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->f); + union { + float real; + uint32_t base; + } u_T; + u_T.real = this->T; + *(outbuffer + offset + 0) = (u_T.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_T.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_T.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_T.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->T); + offset += this->valid_window.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_min_disparity; + u_min_disparity.real = this->min_disparity; + *(outbuffer + offset + 0) = (u_min_disparity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_min_disparity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_min_disparity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_min_disparity.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->min_disparity); + union { + float real; + uint32_t base; + } u_max_disparity; + u_max_disparity.real = this->max_disparity; + *(outbuffer + offset + 0) = (u_max_disparity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_max_disparity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_max_disparity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_max_disparity.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->max_disparity); + union { + float real; + uint32_t base; + } u_delta_d; + u_delta_d.real = this->delta_d; + *(outbuffer + offset + 0) = (u_delta_d.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_delta_d.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_delta_d.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_delta_d.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->delta_d); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->image.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_f; + u_f.base = 0; + u_f.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_f.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_f.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_f.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->f = u_f.real; + offset += sizeof(this->f); + union { + float real; + uint32_t base; + } u_T; + u_T.base = 0; + u_T.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_T.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_T.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_T.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->T = u_T.real; + offset += sizeof(this->T); + offset += this->valid_window.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_min_disparity; + u_min_disparity.base = 0; + u_min_disparity.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_min_disparity.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_min_disparity.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_min_disparity.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->min_disparity = u_min_disparity.real; + offset += sizeof(this->min_disparity); + union { + float real; + uint32_t base; + } u_max_disparity; + u_max_disparity.base = 0; + u_max_disparity.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_max_disparity.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_max_disparity.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_max_disparity.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->max_disparity = u_max_disparity.real; + offset += sizeof(this->max_disparity); + union { + float real; + uint32_t base; + } u_delta_d; + u_delta_d.base = 0; + u_delta_d.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_delta_d.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_delta_d.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_delta_d.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->delta_d = u_delta_d.real; + offset += sizeof(this->delta_d); + return offset; + } + + const char * getType(){ return "stereo_msgs/DisparityImage"; }; + const char * getMD5(){ return "04a177815f75271039fa21f16acad8c9"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/tf/FrameGraph.h b/source/ros-max-lib/ros_lib/tf/FrameGraph.h new file mode 100644 index 0000000000000000000000000000000000000000..e95a945708916458c0e6dd4710b24edd2953176a --- /dev/null +++ b/source/ros-max-lib/ros_lib/tf/FrameGraph.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_FrameGraph_h +#define _ROS_SERVICE_FrameGraph_h +#include +#include +#include +#include "ros/msg.h" + +namespace tf +{ + +static const char FRAMEGRAPH[] = "tf/FrameGraph"; + + class FrameGraphRequest : public ros::Msg + { + public: + + FrameGraphRequest() + { + } + + 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 FRAMEGRAPH; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class FrameGraphResponse : public ros::Msg + { + public: + typedef const char* _dot_graph_type; + _dot_graph_type dot_graph; + + FrameGraphResponse(): + dot_graph("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_dot_graph = strlen(this->dot_graph); + varToArr(outbuffer + offset, length_dot_graph); + offset += 4; + memcpy(outbuffer + offset, this->dot_graph, length_dot_graph); + offset += length_dot_graph; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_dot_graph; + arrToVar(length_dot_graph, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_dot_graph; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_dot_graph-1]=0; + this->dot_graph = (char *)(inbuffer + offset-1); + offset += length_dot_graph; + return offset; + } + + const char * getType(){ return FRAMEGRAPH; }; + const char * getMD5(){ return "c4af9ac907e58e906eb0b6e3c58478c0"; }; + + }; + + class FrameGraph { + public: + typedef FrameGraphRequest Request; + typedef FrameGraphResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/tf/tf.h b/source/ros-max-lib/ros_lib/tf/tf.h new file mode 100644 index 0000000000000000000000000000000000000000..97858fe2e3cc32a8725a9b9d08e98c85f5c97ad5 --- /dev/null +++ b/source/ros-max-lib/ros_lib/tf/tf.h @@ -0,0 +1,56 @@ +/* + * 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_TF_H_ +#define ROS_TF_H_ + +#include "geometry_msgs/TransformStamped.h" + +namespace tf +{ + +static inline geometry_msgs::Quaternion createQuaternionFromYaw(double yaw) +{ + geometry_msgs::Quaternion q; + q.x = 0; + q.y = 0; + q.z = sin(yaw * 0.5); + q.w = cos(yaw * 0.5); + return q; +} + +} + +#endif + diff --git a/source/ros-max-lib/ros_lib/tf/tfMessage.h b/source/ros-max-lib/ros_lib/tf/tfMessage.h new file mode 100644 index 0000000000000000000000000000000000000000..1f370d041a4e4b088cb1166da9e421e9f9bb63c5 --- /dev/null +++ b/source/ros-max-lib/ros_lib/tf/tfMessage.h @@ -0,0 +1,64 @@ +#ifndef _ROS_tf_tfMessage_h +#define _ROS_tf_tfMessage_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../geometry_msgs/TransformStamped.h" + +namespace tf +{ + + class tfMessage : public ros::Msg + { + public: + uint32_t transforms_length; + typedef geometry_msgs::TransformStamped _transforms_type; + _transforms_type st_transforms; + _transforms_type * transforms; + + tfMessage(): + transforms_length(0), transforms(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->transforms_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->transforms_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->transforms_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->transforms_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->transforms_length); + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->transforms[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t transforms_lengthT = ((uint32_t) (*(inbuffer + offset))); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->transforms_length); + if(transforms_lengthT > transforms_length) + this->transforms = (geometry_msgs::TransformStamped*)realloc(this->transforms, transforms_lengthT * sizeof(geometry_msgs::TransformStamped)); + transforms_length = transforms_lengthT; + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->st_transforms.deserialize(inbuffer + offset); + memcpy( &(this->transforms[i]), &(this->st_transforms), sizeof(geometry_msgs::TransformStamped)); + } + return offset; + } + + const char * getType(){ return "tf/tfMessage"; }; + const char * getMD5(){ return "94810edda583a504dfda3829e70d7eec"; }; + + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/tf/transform_broadcaster.h b/source/ros-max-lib/ros_lib/tf/transform_broadcaster.h new file mode 100644 index 0000000000000000000000000000000000000000..6c4e5fee719cdd0fd2bfe6eb26638999444d20de --- /dev/null +++ b/source/ros-max-lib/ros_lib/tf/transform_broadcaster.h @@ -0,0 +1,69 @@ +/* + * 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_TRANSFORM_BROADCASTER_H_ +#define ROS_TRANSFORM_BROADCASTER_H_ + +#include "ros.h" +#include "tfMessage.h" + +namespace tf +{ + +class TransformBroadcaster +{ +public: + TransformBroadcaster() : publisher_("/tf", &internal_msg) {} + + void init(ros::NodeHandle &nh) + { + nh.advertise(publisher_); + } + + void sendTransform(geometry_msgs::TransformStamped &transform) + { + internal_msg.transforms_length = 1; + internal_msg.transforms = &transform; + publisher_.publish(&internal_msg); + } + +private: + tf::tfMessage internal_msg; + ros::Publisher publisher_; +}; + +} + +#endif + diff --git a/source/ros-max-lib/ros_lib/tf2_msgs/FrameGraph.h b/source/ros-max-lib/ros_lib/tf2_msgs/FrameGraph.h new file mode 100644 index 0000000000000000000000000000000000000000..91456394569ab1f14bb94c4f2f9bfb5a4c76156b --- /dev/null +++ b/source/ros-max-lib/ros_lib/tf2_msgs/FrameGraph.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_FrameGraph_h +#define _ROS_SERVICE_FrameGraph_h +#include +#include +#include +#include "ros/msg.h" + +namespace tf2_msgs +{ + +static const char FRAMEGRAPH[] = "tf2_msgs/FrameGraph"; + + class FrameGraphRequest : public ros::Msg + { + public: + + FrameGraphRequest() + { + } + + 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 FRAMEGRAPH; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class FrameGraphResponse : public ros::Msg + { + public: + typedef const char* _frame_yaml_type; + _frame_yaml_type frame_yaml; + + FrameGraphResponse(): + frame_yaml("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_frame_yaml = strlen(this->frame_yaml); + varToArr(outbuffer + offset, length_frame_yaml); + offset += 4; + memcpy(outbuffer + offset, this->frame_yaml, length_frame_yaml); + offset += length_frame_yaml; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_frame_yaml; + arrToVar(length_frame_yaml, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_frame_yaml; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_frame_yaml-1]=0; + this->frame_yaml = (char *)(inbuffer + offset-1); + offset += length_frame_yaml; + return offset; + } + + const char * getType(){ return FRAMEGRAPH; }; + const char * getMD5(){ return "437ea58e9463815a0d511c7326b686b0"; }; + + }; + + class FrameGraph { + public: + typedef FrameGraphRequest Request; + typedef FrameGraphResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/tf2_msgs/LookupTransformAction.h b/source/ros-max-lib/ros_lib/tf2_msgs/LookupTransformAction.h new file mode 100644 index 0000000000000000000000000000000000000000..733d095dd1538c949996a22b19d513fe0ee43e41 --- /dev/null +++ b/source/ros-max-lib/ros_lib/tf2_msgs/LookupTransformAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_tf2_msgs_LookupTransformAction_h +#define _ROS_tf2_msgs_LookupTransformAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "tf2_msgs/LookupTransformActionGoal.h" +#include "tf2_msgs/LookupTransformActionResult.h" +#include "tf2_msgs/LookupTransformActionFeedback.h" + +namespace tf2_msgs +{ + + class LookupTransformAction : public ros::Msg + { + public: + typedef tf2_msgs::LookupTransformActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef tf2_msgs::LookupTransformActionResult _action_result_type; + _action_result_type action_result; + typedef tf2_msgs::LookupTransformActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + LookupTransformAction(): + 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 "tf2_msgs/LookupTransformAction"; }; + const char * getMD5(){ return "7ee01ba91a56c2245c610992dbaa3c37"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/tf2_msgs/LookupTransformActionFeedback.h b/source/ros-max-lib/ros_lib/tf2_msgs/LookupTransformActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..39bd3b4e0560edfaa1f15ad79d1852855bc7b058 --- /dev/null +++ b/source/ros-max-lib/ros_lib/tf2_msgs/LookupTransformActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_tf2_msgs_LookupTransformActionFeedback_h +#define _ROS_tf2_msgs_LookupTransformActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "tf2_msgs/LookupTransformFeedback.h" + +namespace tf2_msgs +{ + + class LookupTransformActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef tf2_msgs::LookupTransformFeedback _feedback_type; + _feedback_type feedback; + + LookupTransformActionFeedback(): + 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 "tf2_msgs/LookupTransformActionFeedback"; }; + const char * getMD5(){ return "aae20e09065c3809e8a8e87c4c8953fd"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/tf2_msgs/LookupTransformActionGoal.h b/source/ros-max-lib/ros_lib/tf2_msgs/LookupTransformActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..92bc163039dcf4e3882a686065ed1f5584b29840 --- /dev/null +++ b/source/ros-max-lib/ros_lib/tf2_msgs/LookupTransformActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_tf2_msgs_LookupTransformActionGoal_h +#define _ROS_tf2_msgs_LookupTransformActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "tf2_msgs/LookupTransformGoal.h" + +namespace tf2_msgs +{ + + class LookupTransformActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef tf2_msgs::LookupTransformGoal _goal_type; + _goal_type goal; + + LookupTransformActionGoal(): + 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 "tf2_msgs/LookupTransformActionGoal"; }; + const char * getMD5(){ return "f2e7bcdb75c847978d0351a13e699da5"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/tf2_msgs/LookupTransformActionResult.h b/source/ros-max-lib/ros_lib/tf2_msgs/LookupTransformActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..38a98bdf2abf62c27c97be3a14fc83f2d08f9906 --- /dev/null +++ b/source/ros-max-lib/ros_lib/tf2_msgs/LookupTransformActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_tf2_msgs_LookupTransformActionResult_h +#define _ROS_tf2_msgs_LookupTransformActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "tf2_msgs/LookupTransformResult.h" + +namespace tf2_msgs +{ + + class LookupTransformActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef tf2_msgs::LookupTransformResult _result_type; + _result_type result; + + LookupTransformActionResult(): + 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 "tf2_msgs/LookupTransformActionResult"; }; + const char * getMD5(){ return "ac26ce75a41384fa8bb4dc10f491ab90"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/tf2_msgs/LookupTransformFeedback.h b/source/ros-max-lib/ros_lib/tf2_msgs/LookupTransformFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..6be0748603229045e4d3a79e397858f4f6115c8a --- /dev/null +++ b/source/ros-max-lib/ros_lib/tf2_msgs/LookupTransformFeedback.h @@ -0,0 +1,38 @@ +#ifndef _ROS_tf2_msgs_LookupTransformFeedback_h +#define _ROS_tf2_msgs_LookupTransformFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace tf2_msgs +{ + + class LookupTransformFeedback : public ros::Msg + { + public: + + LookupTransformFeedback() + { + } + + 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 "tf2_msgs/LookupTransformFeedback"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/tf2_msgs/LookupTransformGoal.h b/source/ros-max-lib/ros_lib/tf2_msgs/LookupTransformGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..87a79ee055604a9ba6d3db9383e62c17b4f5ab7b --- /dev/null +++ b/source/ros-max-lib/ros_lib/tf2_msgs/LookupTransformGoal.h @@ -0,0 +1,178 @@ +#ifndef _ROS_tf2_msgs_LookupTransformGoal_h +#define _ROS_tf2_msgs_LookupTransformGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/time.h" +#include "ros/duration.h" + +namespace tf2_msgs +{ + + class LookupTransformGoal : public ros::Msg + { + public: + typedef const char* _target_frame_type; + _target_frame_type target_frame; + typedef const char* _source_frame_type; + _source_frame_type source_frame; + typedef ros::Time _source_time_type; + _source_time_type source_time; + typedef ros::Duration _timeout_type; + _timeout_type timeout; + typedef ros::Time _target_time_type; + _target_time_type target_time; + typedef const char* _fixed_frame_type; + _fixed_frame_type fixed_frame; + typedef bool _advanced_type; + _advanced_type advanced; + + LookupTransformGoal(): + target_frame(""), + source_frame(""), + source_time(), + timeout(), + target_time(), + fixed_frame(""), + advanced(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_target_frame = strlen(this->target_frame); + varToArr(outbuffer + offset, length_target_frame); + offset += 4; + memcpy(outbuffer + offset, this->target_frame, length_target_frame); + offset += length_target_frame; + uint32_t length_source_frame = strlen(this->source_frame); + varToArr(outbuffer + offset, length_source_frame); + offset += 4; + memcpy(outbuffer + offset, this->source_frame, length_source_frame); + offset += length_source_frame; + *(outbuffer + offset + 0) = (this->source_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->source_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->source_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->source_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->source_time.sec); + *(outbuffer + offset + 0) = (this->source_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->source_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->source_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->source_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->source_time.nsec); + *(outbuffer + offset + 0) = (this->timeout.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timeout.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timeout.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timeout.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timeout.sec); + *(outbuffer + offset + 0) = (this->timeout.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->timeout.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->timeout.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->timeout.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->timeout.nsec); + *(outbuffer + offset + 0) = (this->target_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->target_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->target_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->target_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->target_time.sec); + *(outbuffer + offset + 0) = (this->target_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->target_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->target_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->target_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->target_time.nsec); + uint32_t length_fixed_frame = strlen(this->fixed_frame); + varToArr(outbuffer + offset, length_fixed_frame); + offset += 4; + memcpy(outbuffer + offset, this->fixed_frame, length_fixed_frame); + offset += length_fixed_frame; + union { + bool real; + uint8_t base; + } u_advanced; + u_advanced.real = this->advanced; + *(outbuffer + offset + 0) = (u_advanced.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->advanced); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_target_frame; + arrToVar(length_target_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_target_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_target_frame-1]=0; + this->target_frame = (char *)(inbuffer + offset-1); + offset += length_target_frame; + uint32_t length_source_frame; + arrToVar(length_source_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_source_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_source_frame-1]=0; + this->source_frame = (char *)(inbuffer + offset-1); + offset += length_source_frame; + this->source_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->source_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->source_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->source_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->source_time.sec); + this->source_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->source_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->source_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->source_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->source_time.nsec); + this->timeout.sec = ((uint32_t) (*(inbuffer + offset))); + this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timeout.sec); + this->timeout.nsec = ((uint32_t) (*(inbuffer + offset))); + this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->timeout.nsec); + this->target_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->target_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->target_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->target_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->target_time.sec); + this->target_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->target_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->target_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->target_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->target_time.nsec); + uint32_t length_fixed_frame; + arrToVar(length_fixed_frame, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_fixed_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_fixed_frame-1]=0; + this->fixed_frame = (char *)(inbuffer + offset-1); + offset += length_fixed_frame; + union { + bool real; + uint8_t base; + } u_advanced; + u_advanced.base = 0; + u_advanced.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->advanced = u_advanced.real; + offset += sizeof(this->advanced); + return offset; + } + + const char * getType(){ return "tf2_msgs/LookupTransformGoal"; }; + const char * getMD5(){ return "35e3720468131d675a18bb6f3e5f22f8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/tf2_msgs/LookupTransformResult.h b/source/ros-max-lib/ros_lib/tf2_msgs/LookupTransformResult.h new file mode 100644 index 0000000000000000000000000000000000000000..5422d7e7fc6dbb7f6010a6a0c21a5fc652f2699b --- /dev/null +++ b/source/ros-max-lib/ros_lib/tf2_msgs/LookupTransformResult.h @@ -0,0 +1,50 @@ +#ifndef _ROS_tf2_msgs_LookupTransformResult_h +#define _ROS_tf2_msgs_LookupTransformResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/TransformStamped.h" +#include "tf2_msgs/TF2Error.h" + +namespace tf2_msgs +{ + + class LookupTransformResult : public ros::Msg + { + public: + typedef geometry_msgs::TransformStamped _transform_type; + _transform_type transform; + typedef tf2_msgs::TF2Error _error_type; + _error_type error; + + LookupTransformResult(): + transform(), + error() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->transform.serialize(outbuffer + offset); + offset += this->error.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->transform.deserialize(inbuffer + offset); + offset += this->error.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "tf2_msgs/LookupTransformResult"; }; + const char * getMD5(){ return "3fe5db6a19ca9cfb675418c5ad875c36"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/tf2_msgs/TF2Error.h b/source/ros-max-lib/ros_lib/tf2_msgs/TF2Error.h new file mode 100644 index 0000000000000000000000000000000000000000..e6efdce2e3d8f0da5c06e91704a34ac2fa924119 --- /dev/null +++ b/source/ros-max-lib/ros_lib/tf2_msgs/TF2Error.h @@ -0,0 +1,69 @@ +#ifndef _ROS_tf2_msgs_TF2Error_h +#define _ROS_tf2_msgs_TF2Error_h + +#include +#include +#include +#include "ros/msg.h" + +namespace tf2_msgs +{ + + class TF2Error : public ros::Msg + { + public: + typedef uint8_t _error_type; + _error_type error; + typedef const char* _error_string_type; + _error_string_type error_string; + enum { NO_ERROR = 0 }; + enum { LOOKUP_ERROR = 1 }; + enum { CONNECTIVITY_ERROR = 2 }; + enum { EXTRAPOLATION_ERROR = 3 }; + enum { INVALID_ARGUMENT_ERROR = 4 }; + enum { TIMEOUT_ERROR = 5 }; + enum { TRANSFORM_ERROR = 6 }; + + TF2Error(): + error(0), + error_string("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->error >> (8 * 0)) & 0xFF; + offset += sizeof(this->error); + uint32_t length_error_string = strlen(this->error_string); + varToArr(outbuffer + offset, length_error_string); + offset += 4; + memcpy(outbuffer + offset, this->error_string, length_error_string); + offset += length_error_string; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->error = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->error); + uint32_t length_error_string; + arrToVar(length_error_string, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_error_string; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_error_string-1]=0; + this->error_string = (char *)(inbuffer + offset-1); + offset += length_error_string; + return offset; + } + + const char * getType(){ return "tf2_msgs/TF2Error"; }; + const char * getMD5(){ return "bc6848fd6fd750c92e38575618a4917d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/tf2_msgs/TFMessage.h b/source/ros-max-lib/ros_lib/tf2_msgs/TFMessage.h new file mode 100644 index 0000000000000000000000000000000000000000..fd8ff10d8eba2b8c8125fa1365bc099c4b0c4807 --- /dev/null +++ b/source/ros-max-lib/ros_lib/tf2_msgs/TFMessage.h @@ -0,0 +1,64 @@ +#ifndef _ROS_tf2_msgs_TFMessage_h +#define _ROS_tf2_msgs_TFMessage_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/TransformStamped.h" + +namespace tf2_msgs +{ + + class TFMessage : public ros::Msg + { + public: + uint32_t transforms_length; + typedef geometry_msgs::TransformStamped _transforms_type; + _transforms_type st_transforms; + _transforms_type * transforms; + + TFMessage(): + transforms_length(0), transforms(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->transforms_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->transforms_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->transforms_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->transforms_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->transforms_length); + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->transforms[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t transforms_lengthT = ((uint32_t) (*(inbuffer + offset))); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->transforms_length); + if(transforms_lengthT > transforms_length) + this->transforms = (geometry_msgs::TransformStamped*)realloc(this->transforms, transforms_lengthT * sizeof(geometry_msgs::TransformStamped)); + transforms_length = transforms_lengthT; + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->st_transforms.deserialize(inbuffer + offset); + memcpy( &(this->transforms[i]), &(this->st_transforms), sizeof(geometry_msgs::TransformStamped)); + } + return offset; + } + + const char * getType(){ return "tf2_msgs/TFMessage"; }; + const char * getMD5(){ return "94810edda583a504dfda3829e70d7eec"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/theora_image_transport/Packet.h b/source/ros-max-lib/ros_lib/theora_image_transport/Packet.h new file mode 100644 index 0000000000000000000000000000000000000000..b35e696a540f772581534be0d29d49e976eab98b --- /dev/null +++ b/source/ros-max-lib/ros_lib/theora_image_transport/Packet.h @@ -0,0 +1,183 @@ +#ifndef _ROS_theora_image_transport_Packet_h +#define _ROS_theora_image_transport_Packet_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace theora_image_transport +{ + + class Packet : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t data_length; + typedef uint8_t _data_type; + _data_type st_data; + _data_type * data; + typedef int32_t _b_o_s_type; + _b_o_s_type b_o_s; + typedef int32_t _e_o_s_type; + _e_o_s_type e_o_s; + typedef int64_t _granulepos_type; + _granulepos_type granulepos; + typedef int64_t _packetno_type; + _packetno_type packetno; + + Packet(): + header(), + data_length(0), data(NULL), + b_o_s(0), + e_o_s(0), + granulepos(0), + packetno(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + union { + int32_t real; + uint32_t base; + } u_b_o_s; + u_b_o_s.real = this->b_o_s; + *(outbuffer + offset + 0) = (u_b_o_s.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_b_o_s.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_b_o_s.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_b_o_s.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->b_o_s); + union { + int32_t real; + uint32_t base; + } u_e_o_s; + u_e_o_s.real = this->e_o_s; + *(outbuffer + offset + 0) = (u_e_o_s.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_e_o_s.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_e_o_s.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_e_o_s.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->e_o_s); + union { + int64_t real; + uint64_t base; + } u_granulepos; + u_granulepos.real = this->granulepos; + *(outbuffer + offset + 0) = (u_granulepos.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_granulepos.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_granulepos.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_granulepos.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_granulepos.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_granulepos.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_granulepos.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_granulepos.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->granulepos); + union { + int64_t real; + uint64_t base; + } u_packetno; + u_packetno.real = this->packetno; + *(outbuffer + offset + 0) = (u_packetno.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_packetno.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_packetno.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_packetno.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_packetno.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_packetno.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_packetno.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_packetno.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->packetno); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint8_t*)realloc(this->data, data_lengthT * sizeof(uint8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint8_t)); + } + union { + int32_t real; + uint32_t base; + } u_b_o_s; + u_b_o_s.base = 0; + u_b_o_s.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_b_o_s.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_b_o_s.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_b_o_s.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->b_o_s = u_b_o_s.real; + offset += sizeof(this->b_o_s); + union { + int32_t real; + uint32_t base; + } u_e_o_s; + u_e_o_s.base = 0; + u_e_o_s.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_e_o_s.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_e_o_s.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_e_o_s.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->e_o_s = u_e_o_s.real; + offset += sizeof(this->e_o_s); + union { + int64_t real; + uint64_t base; + } u_granulepos; + u_granulepos.base = 0; + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_granulepos.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->granulepos = u_granulepos.real; + offset += sizeof(this->granulepos); + union { + int64_t real; + uint64_t base; + } u_packetno; + u_packetno.base = 0; + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_packetno.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->packetno = u_packetno.real; + offset += sizeof(this->packetno); + return offset; + } + + const char * getType(){ return "theora_image_transport/Packet"; }; + const char * getMD5(){ return "33ac4e14a7cff32e7e0d65f18bb410f3"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/time.cpp b/source/ros-max-lib/ros_lib/time.cpp new file mode 100644 index 0000000000000000000000000000000000000000..86221f9465940f7acb3131657a39aed293814869 --- /dev/null +++ b/source/ros-max-lib/ros_lib/time.cpp @@ -0,0 +1,70 @@ +/* + * 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. + */ + +#include "ros/time.h" + +namespace ros +{ +void normalizeSecNSec(uint32_t& sec, uint32_t& nsec) +{ + uint32_t nsec_part = nsec % 1000000000UL; + uint32_t sec_part = nsec / 1000000000UL; + sec += sec_part; + nsec = nsec_part; +} + +Time& Time::fromNSec(int32_t t) +{ + sec = t / 1000000000; + nsec = t % 1000000000; + normalizeSecNSec(sec, nsec); + return *this; +} + +Time& Time::operator +=(const Duration &rhs) +{ + sec += rhs.sec; + nsec += rhs.nsec; + normalizeSecNSec(sec, nsec); + return *this; +} + +Time& Time::operator -=(const Duration &rhs) +{ + sec += -rhs.sec; + nsec += -rhs.nsec; + normalizeSecNSec(sec, nsec); + return *this; +} +} diff --git a/source/ros-max-lib/ros_lib/topic_tools/DemuxAdd.h b/source/ros-max-lib/ros_lib/topic_tools/DemuxAdd.h new file mode 100644 index 0000000000000000000000000000000000000000..d8016c6b3be2ce47b0964355fb2ae14108fcae5e --- /dev/null +++ b/source/ros-max-lib/ros_lib/topic_tools/DemuxAdd.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_DemuxAdd_h +#define _ROS_SERVICE_DemuxAdd_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char DEMUXADD[] = "topic_tools/DemuxAdd"; + + class DemuxAddRequest : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + + DemuxAddRequest(): + topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + return offset; + } + + const char * getType(){ return DEMUXADD; }; + const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; }; + + }; + + class DemuxAddResponse : public ros::Msg + { + public: + + DemuxAddResponse() + { + } + + 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 DEMUXADD; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class DemuxAdd { + public: + typedef DemuxAddRequest Request; + typedef DemuxAddResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/topic_tools/DemuxDelete.h b/source/ros-max-lib/ros_lib/topic_tools/DemuxDelete.h new file mode 100644 index 0000000000000000000000000000000000000000..3f030aae4b640a778866bc9c21c0b2fb080c28e9 --- /dev/null +++ b/source/ros-max-lib/ros_lib/topic_tools/DemuxDelete.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_DemuxDelete_h +#define _ROS_SERVICE_DemuxDelete_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char DEMUXDELETE[] = "topic_tools/DemuxDelete"; + + class DemuxDeleteRequest : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + + DemuxDeleteRequest(): + topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + return offset; + } + + const char * getType(){ return DEMUXDELETE; }; + const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; }; + + }; + + class DemuxDeleteResponse : public ros::Msg + { + public: + + DemuxDeleteResponse() + { + } + + 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 DEMUXDELETE; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class DemuxDelete { + public: + typedef DemuxDeleteRequest Request; + typedef DemuxDeleteResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/topic_tools/DemuxList.h b/source/ros-max-lib/ros_lib/topic_tools/DemuxList.h new file mode 100644 index 0000000000000000000000000000000000000000..05533298fa43da3e375c1dfdbdc22a2c375972e3 --- /dev/null +++ b/source/ros-max-lib/ros_lib/topic_tools/DemuxList.h @@ -0,0 +1,107 @@ +#ifndef _ROS_SERVICE_DemuxList_h +#define _ROS_SERVICE_DemuxList_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char DEMUXLIST[] = "topic_tools/DemuxList"; + + class DemuxListRequest : public ros::Msg + { + public: + + DemuxListRequest() + { + } + + 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 DEMUXLIST; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class DemuxListResponse : public ros::Msg + { + public: + uint32_t topics_length; + typedef char* _topics_type; + _topics_type st_topics; + _topics_type * topics; + + DemuxListResponse(): + topics_length(0), topics(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->topics_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->topics_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->topics_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->topics_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->topics_length); + for( uint32_t i = 0; i < topics_length; i++){ + uint32_t length_topicsi = strlen(this->topics[i]); + varToArr(outbuffer + offset, length_topicsi); + offset += 4; + memcpy(outbuffer + offset, this->topics[i], length_topicsi); + offset += length_topicsi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t topics_lengthT = ((uint32_t) (*(inbuffer + offset))); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->topics_length); + if(topics_lengthT > topics_length) + this->topics = (char**)realloc(this->topics, topics_lengthT * sizeof(char*)); + topics_length = topics_lengthT; + for( uint32_t i = 0; i < topics_length; i++){ + uint32_t length_st_topics; + arrToVar(length_st_topics, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_topics; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_topics-1]=0; + this->st_topics = (char *)(inbuffer + offset-1); + offset += length_st_topics; + memcpy( &(this->topics[i]), &(this->st_topics), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return DEMUXLIST; }; + const char * getMD5(){ return "b0eef9a05d4e829092fc2f2c3c2aad3d"; }; + + }; + + class DemuxList { + public: + typedef DemuxListRequest Request; + typedef DemuxListResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/topic_tools/DemuxSelect.h b/source/ros-max-lib/ros_lib/topic_tools/DemuxSelect.h new file mode 100644 index 0000000000000000000000000000000000000000..17a6d9b2ceae2dc7f165ac1cd30ab38fc9c6d01f --- /dev/null +++ b/source/ros-max-lib/ros_lib/topic_tools/DemuxSelect.h @@ -0,0 +1,104 @@ +#ifndef _ROS_SERVICE_DemuxSelect_h +#define _ROS_SERVICE_DemuxSelect_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char DEMUXSELECT[] = "topic_tools/DemuxSelect"; + + class DemuxSelectRequest : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + + DemuxSelectRequest(): + topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + return offset; + } + + const char * getType(){ return DEMUXSELECT; }; + const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; }; + + }; + + class DemuxSelectResponse : public ros::Msg + { + public: + typedef const char* _prev_topic_type; + _prev_topic_type prev_topic; + + DemuxSelectResponse(): + prev_topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_prev_topic = strlen(this->prev_topic); + varToArr(outbuffer + offset, length_prev_topic); + offset += 4; + memcpy(outbuffer + offset, this->prev_topic, length_prev_topic); + offset += length_prev_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_prev_topic; + arrToVar(length_prev_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_prev_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_prev_topic-1]=0; + this->prev_topic = (char *)(inbuffer + offset-1); + offset += length_prev_topic; + return offset; + } + + const char * getType(){ return DEMUXSELECT; }; + const char * getMD5(){ return "3db0a473debdbafea387c9e49358c320"; }; + + }; + + class DemuxSelect { + public: + typedef DemuxSelectRequest Request; + typedef DemuxSelectResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/topic_tools/MuxAdd.h b/source/ros-max-lib/ros_lib/topic_tools/MuxAdd.h new file mode 100644 index 0000000000000000000000000000000000000000..25a649ad8fa1fe6b54d06df66ea5ad367d1546fa --- /dev/null +++ b/source/ros-max-lib/ros_lib/topic_tools/MuxAdd.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_MuxAdd_h +#define _ROS_SERVICE_MuxAdd_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char MUXADD[] = "topic_tools/MuxAdd"; + + class MuxAddRequest : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + + MuxAddRequest(): + topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + return offset; + } + + const char * getType(){ return MUXADD; }; + const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; }; + + }; + + class MuxAddResponse : public ros::Msg + { + public: + + MuxAddResponse() + { + } + + 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 MUXADD; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class MuxAdd { + public: + typedef MuxAddRequest Request; + typedef MuxAddResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/topic_tools/MuxDelete.h b/source/ros-max-lib/ros_lib/topic_tools/MuxDelete.h new file mode 100644 index 0000000000000000000000000000000000000000..3672ad57d2fab86d9d4d0d308f018d110271000c --- /dev/null +++ b/source/ros-max-lib/ros_lib/topic_tools/MuxDelete.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_MuxDelete_h +#define _ROS_SERVICE_MuxDelete_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char MUXDELETE[] = "topic_tools/MuxDelete"; + + class MuxDeleteRequest : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + + MuxDeleteRequest(): + topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + return offset; + } + + const char * getType(){ return MUXDELETE; }; + const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; }; + + }; + + class MuxDeleteResponse : public ros::Msg + { + public: + + MuxDeleteResponse() + { + } + + 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 MUXDELETE; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class MuxDelete { + public: + typedef MuxDeleteRequest Request; + typedef MuxDeleteResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/topic_tools/MuxList.h b/source/ros-max-lib/ros_lib/topic_tools/MuxList.h new file mode 100644 index 0000000000000000000000000000000000000000..5d7936d8501a1ef462133d8accc95d56296633fc --- /dev/null +++ b/source/ros-max-lib/ros_lib/topic_tools/MuxList.h @@ -0,0 +1,107 @@ +#ifndef _ROS_SERVICE_MuxList_h +#define _ROS_SERVICE_MuxList_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char MUXLIST[] = "topic_tools/MuxList"; + + class MuxListRequest : public ros::Msg + { + public: + + MuxListRequest() + { + } + + 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 MUXLIST; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class MuxListResponse : public ros::Msg + { + public: + uint32_t topics_length; + typedef char* _topics_type; + _topics_type st_topics; + _topics_type * topics; + + MuxListResponse(): + topics_length(0), topics(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->topics_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->topics_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->topics_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->topics_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->topics_length); + for( uint32_t i = 0; i < topics_length; i++){ + uint32_t length_topicsi = strlen(this->topics[i]); + varToArr(outbuffer + offset, length_topicsi); + offset += 4; + memcpy(outbuffer + offset, this->topics[i], length_topicsi); + offset += length_topicsi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t topics_lengthT = ((uint32_t) (*(inbuffer + offset))); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + topics_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->topics_length); + if(topics_lengthT > topics_length) + this->topics = (char**)realloc(this->topics, topics_lengthT * sizeof(char*)); + topics_length = topics_lengthT; + for( uint32_t i = 0; i < topics_length; i++){ + uint32_t length_st_topics; + arrToVar(length_st_topics, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_topics; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_topics-1]=0; + this->st_topics = (char *)(inbuffer + offset-1); + offset += length_st_topics; + memcpy( &(this->topics[i]), &(this->st_topics), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return MUXLIST; }; + const char * getMD5(){ return "b0eef9a05d4e829092fc2f2c3c2aad3d"; }; + + }; + + class MuxList { + public: + typedef MuxListRequest Request; + typedef MuxListResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/topic_tools/MuxSelect.h b/source/ros-max-lib/ros_lib/topic_tools/MuxSelect.h new file mode 100644 index 0000000000000000000000000000000000000000..67324a85aafb78f8e22fdfe934a60e4a96729d94 --- /dev/null +++ b/source/ros-max-lib/ros_lib/topic_tools/MuxSelect.h @@ -0,0 +1,104 @@ +#ifndef _ROS_SERVICE_MuxSelect_h +#define _ROS_SERVICE_MuxSelect_h +#include +#include +#include +#include "ros/msg.h" + +namespace topic_tools +{ + +static const char MUXSELECT[] = "topic_tools/MuxSelect"; + + class MuxSelectRequest : public ros::Msg + { + public: + typedef const char* _topic_type; + _topic_type topic; + + MuxSelectRequest(): + topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + return offset; + } + + const char * getType(){ return MUXSELECT; }; + const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; }; + + }; + + class MuxSelectResponse : public ros::Msg + { + public: + typedef const char* _prev_topic_type; + _prev_topic_type prev_topic; + + MuxSelectResponse(): + prev_topic("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_prev_topic = strlen(this->prev_topic); + varToArr(outbuffer + offset, length_prev_topic); + offset += 4; + memcpy(outbuffer + offset, this->prev_topic, length_prev_topic); + offset += length_prev_topic; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_prev_topic; + arrToVar(length_prev_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_prev_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_prev_topic-1]=0; + this->prev_topic = (char *)(inbuffer + offset-1); + offset += length_prev_topic; + return offset; + } + + const char * getType(){ return MUXSELECT; }; + const char * getMD5(){ return "3db0a473debdbafea387c9e49358c320"; }; + + }; + + class MuxSelect { + public: + typedef MuxSelectRequest Request; + typedef MuxSelectResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/trajectory_msgs/JointTrajectory.h b/source/ros-max-lib/ros_lib/trajectory_msgs/JointTrajectory.h new file mode 100644 index 0000000000000000000000000000000000000000..f03d5373eec7a5d022c683801114590bbfde5498 --- /dev/null +++ b/source/ros-max-lib/ros_lib/trajectory_msgs/JointTrajectory.h @@ -0,0 +1,107 @@ +#ifndef _ROS_trajectory_msgs_JointTrajectory_h +#define _ROS_trajectory_msgs_JointTrajectory_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "trajectory_msgs/JointTrajectoryPoint.h" + +namespace trajectory_msgs +{ + + class JointTrajectory : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t joint_names_length; + typedef char* _joint_names_type; + _joint_names_type st_joint_names; + _joint_names_type * joint_names; + uint32_t points_length; + typedef trajectory_msgs::JointTrajectoryPoint _points_type; + _points_type st_points; + _points_type * points; + + JointTrajectory(): + header(), + joint_names_length(0), joint_names(NULL), + points_length(0), points(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_names_length); + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_joint_namesi = strlen(this->joint_names[i]); + varToArr(outbuffer + offset, length_joint_namesi); + offset += 4; + memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); + offset += length_joint_namesi; + } + *(outbuffer + offset + 0) = (this->points_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->points_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->points_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->points_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->points_length); + for( uint32_t i = 0; i < points_length; i++){ + offset += this->points[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_names_length); + if(joint_names_lengthT > joint_names_length) + this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); + joint_names_length = joint_names_lengthT; + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_st_joint_names; + arrToVar(length_st_joint_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_joint_names-1]=0; + this->st_joint_names = (char *)(inbuffer + offset-1); + offset += length_st_joint_names; + memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); + } + uint32_t points_lengthT = ((uint32_t) (*(inbuffer + offset))); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->points_length); + if(points_lengthT > points_length) + this->points = (trajectory_msgs::JointTrajectoryPoint*)realloc(this->points, points_lengthT * sizeof(trajectory_msgs::JointTrajectoryPoint)); + points_length = points_lengthT; + for( uint32_t i = 0; i < points_length; i++){ + offset += this->st_points.deserialize(inbuffer + offset); + memcpy( &(this->points[i]), &(this->st_points), sizeof(trajectory_msgs::JointTrajectoryPoint)); + } + return offset; + } + + const char * getType(){ return "trajectory_msgs/JointTrajectory"; }; + const char * getMD5(){ return "65b4f94a94d1ed67169da35a02f33d3f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/trajectory_msgs/JointTrajectoryPoint.h b/source/ros-max-lib/ros_lib/trajectory_msgs/JointTrajectoryPoint.h new file mode 100644 index 0000000000000000000000000000000000000000..dac669be42d38cbfbb7fd56c76bd2902de76b88f --- /dev/null +++ b/source/ros-max-lib/ros_lib/trajectory_msgs/JointTrajectoryPoint.h @@ -0,0 +1,270 @@ +#ifndef _ROS_trajectory_msgs_JointTrajectoryPoint_h +#define _ROS_trajectory_msgs_JointTrajectoryPoint_h + +#include +#include +#include +#include "ros/msg.h" +#include "ros/duration.h" + +namespace trajectory_msgs +{ + + class JointTrajectoryPoint : public ros::Msg + { + public: + uint32_t positions_length; + typedef double _positions_type; + _positions_type st_positions; + _positions_type * positions; + uint32_t velocities_length; + typedef double _velocities_type; + _velocities_type st_velocities; + _velocities_type * velocities; + uint32_t accelerations_length; + typedef double _accelerations_type; + _accelerations_type st_accelerations; + _accelerations_type * accelerations; + uint32_t effort_length; + typedef double _effort_type; + _effort_type st_effort; + _effort_type * effort; + typedef ros::Duration _time_from_start_type; + _time_from_start_type time_from_start; + + JointTrajectoryPoint(): + positions_length(0), positions(NULL), + velocities_length(0), velocities(NULL), + accelerations_length(0), accelerations(NULL), + effort_length(0), effort(NULL), + time_from_start() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->positions_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->positions_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->positions_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->positions_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->positions_length); + for( uint32_t i = 0; i < positions_length; i++){ + union { + double real; + uint64_t base; + } u_positionsi; + u_positionsi.real = this->positions[i]; + *(outbuffer + offset + 0) = (u_positionsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_positionsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_positionsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_positionsi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_positionsi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_positionsi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_positionsi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_positionsi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->positions[i]); + } + *(outbuffer + offset + 0) = (this->velocities_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->velocities_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->velocities_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->velocities_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->velocities_length); + for( uint32_t i = 0; i < velocities_length; i++){ + union { + double real; + uint64_t base; + } u_velocitiesi; + u_velocitiesi.real = this->velocities[i]; + *(outbuffer + offset + 0) = (u_velocitiesi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_velocitiesi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_velocitiesi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_velocitiesi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_velocitiesi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_velocitiesi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_velocitiesi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_velocitiesi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->velocities[i]); + } + *(outbuffer + offset + 0) = (this->accelerations_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->accelerations_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->accelerations_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->accelerations_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->accelerations_length); + for( uint32_t i = 0; i < accelerations_length; i++){ + union { + double real; + uint64_t base; + } u_accelerationsi; + u_accelerationsi.real = this->accelerations[i]; + *(outbuffer + offset + 0) = (u_accelerationsi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_accelerationsi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_accelerationsi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_accelerationsi.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_accelerationsi.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_accelerationsi.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_accelerationsi.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_accelerationsi.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->accelerations[i]); + } + *(outbuffer + offset + 0) = (this->effort_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->effort_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->effort_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->effort_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->effort_length); + for( uint32_t i = 0; i < effort_length; i++){ + union { + double real; + uint64_t base; + } u_efforti; + u_efforti.real = this->effort[i]; + *(outbuffer + offset + 0) = (u_efforti.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_efforti.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_efforti.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_efforti.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_efforti.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_efforti.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_efforti.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_efforti.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->effort[i]); + } + *(outbuffer + offset + 0) = (this->time_from_start.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_from_start.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_from_start.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_from_start.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_from_start.sec); + *(outbuffer + offset + 0) = (this->time_from_start.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_from_start.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_from_start.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_from_start.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_from_start.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t positions_lengthT = ((uint32_t) (*(inbuffer + offset))); + positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + positions_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->positions_length); + if(positions_lengthT > positions_length) + this->positions = (double*)realloc(this->positions, positions_lengthT * sizeof(double)); + positions_length = positions_lengthT; + for( uint32_t i = 0; i < positions_length; i++){ + union { + double real; + uint64_t base; + } u_st_positions; + u_st_positions.base = 0; + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_positions.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_positions = u_st_positions.real; + offset += sizeof(this->st_positions); + memcpy( &(this->positions[i]), &(this->st_positions), sizeof(double)); + } + uint32_t velocities_lengthT = ((uint32_t) (*(inbuffer + offset))); + velocities_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + velocities_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + velocities_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->velocities_length); + if(velocities_lengthT > velocities_length) + this->velocities = (double*)realloc(this->velocities, velocities_lengthT * sizeof(double)); + velocities_length = velocities_lengthT; + for( uint32_t i = 0; i < velocities_length; i++){ + union { + double real; + uint64_t base; + } u_st_velocities; + u_st_velocities.base = 0; + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_velocities.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_velocities = u_st_velocities.real; + offset += sizeof(this->st_velocities); + memcpy( &(this->velocities[i]), &(this->st_velocities), sizeof(double)); + } + uint32_t accelerations_lengthT = ((uint32_t) (*(inbuffer + offset))); + accelerations_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + accelerations_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + accelerations_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->accelerations_length); + if(accelerations_lengthT > accelerations_length) + this->accelerations = (double*)realloc(this->accelerations, accelerations_lengthT * sizeof(double)); + accelerations_length = accelerations_lengthT; + for( uint32_t i = 0; i < accelerations_length; i++){ + union { + double real; + uint64_t base; + } u_st_accelerations; + u_st_accelerations.base = 0; + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_accelerations.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_accelerations = u_st_accelerations.real; + offset += sizeof(this->st_accelerations); + memcpy( &(this->accelerations[i]), &(this->st_accelerations), sizeof(double)); + } + uint32_t effort_lengthT = ((uint32_t) (*(inbuffer + offset))); + effort_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + effort_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + effort_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->effort_length); + if(effort_lengthT > effort_length) + this->effort = (double*)realloc(this->effort, effort_lengthT * sizeof(double)); + effort_length = effort_lengthT; + for( uint32_t i = 0; i < effort_length; i++){ + union { + double real; + uint64_t base; + } u_st_effort; + u_st_effort.base = 0; + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_st_effort.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->st_effort = u_st_effort.real; + offset += sizeof(this->st_effort); + memcpy( &(this->effort[i]), &(this->st_effort), sizeof(double)); + } + this->time_from_start.sec = ((uint32_t) (*(inbuffer + offset))); + this->time_from_start.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_from_start.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_from_start.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_from_start.sec); + this->time_from_start.nsec = ((uint32_t) (*(inbuffer + offset))); + this->time_from_start.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_from_start.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_from_start.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_from_start.nsec); + return offset; + } + + const char * getType(){ return "trajectory_msgs/JointTrajectoryPoint"; }; + const char * getMD5(){ return "f3cd1e1c4d320c79d6985c904ae5dcd3"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/trajectory_msgs/MultiDOFJointTrajectory.h b/source/ros-max-lib/ros_lib/trajectory_msgs/MultiDOFJointTrajectory.h new file mode 100644 index 0000000000000000000000000000000000000000..2ab653c72856477147a03c7419198ddad4a72920 --- /dev/null +++ b/source/ros-max-lib/ros_lib/trajectory_msgs/MultiDOFJointTrajectory.h @@ -0,0 +1,107 @@ +#ifndef _ROS_trajectory_msgs_MultiDOFJointTrajectory_h +#define _ROS_trajectory_msgs_MultiDOFJointTrajectory_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "trajectory_msgs/MultiDOFJointTrajectoryPoint.h" + +namespace trajectory_msgs +{ + + class MultiDOFJointTrajectory : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t joint_names_length; + typedef char* _joint_names_type; + _joint_names_type st_joint_names; + _joint_names_type * joint_names; + uint32_t points_length; + typedef trajectory_msgs::MultiDOFJointTrajectoryPoint _points_type; + _points_type st_points; + _points_type * points; + + MultiDOFJointTrajectory(): + header(), + joint_names_length(0), joint_names(NULL), + points_length(0), points(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->joint_names_length); + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_joint_namesi = strlen(this->joint_names[i]); + varToArr(outbuffer + offset, length_joint_namesi); + offset += 4; + memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); + offset += length_joint_namesi; + } + *(outbuffer + offset + 0) = (this->points_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->points_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->points_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->points_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->points_length); + for( uint32_t i = 0; i < points_length; i++){ + offset += this->points[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->joint_names_length); + if(joint_names_lengthT > joint_names_length) + this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); + joint_names_length = joint_names_lengthT; + for( uint32_t i = 0; i < joint_names_length; i++){ + uint32_t length_st_joint_names; + arrToVar(length_st_joint_names, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_joint_names-1]=0; + this->st_joint_names = (char *)(inbuffer + offset-1); + offset += length_st_joint_names; + memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); + } + uint32_t points_lengthT = ((uint32_t) (*(inbuffer + offset))); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->points_length); + if(points_lengthT > points_length) + this->points = (trajectory_msgs::MultiDOFJointTrajectoryPoint*)realloc(this->points, points_lengthT * sizeof(trajectory_msgs::MultiDOFJointTrajectoryPoint)); + points_length = points_lengthT; + for( uint32_t i = 0; i < points_length; i++){ + offset += this->st_points.deserialize(inbuffer + offset); + memcpy( &(this->points[i]), &(this->st_points), sizeof(trajectory_msgs::MultiDOFJointTrajectoryPoint)); + } + return offset; + } + + const char * getType(){ return "trajectory_msgs/MultiDOFJointTrajectory"; }; + const char * getMD5(){ return "ef145a45a5f47b77b7f5cdde4b16c942"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/trajectory_msgs/MultiDOFJointTrajectoryPoint.h b/source/ros-max-lib/ros_lib/trajectory_msgs/MultiDOFJointTrajectoryPoint.h new file mode 100644 index 0000000000000000000000000000000000000000..88b4564e28d54b46c78d25c13ef46c57fae43c8b --- /dev/null +++ b/source/ros-max-lib/ros_lib/trajectory_msgs/MultiDOFJointTrajectoryPoint.h @@ -0,0 +1,139 @@ +#ifndef _ROS_trajectory_msgs_MultiDOFJointTrajectoryPoint_h +#define _ROS_trajectory_msgs_MultiDOFJointTrajectoryPoint_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Transform.h" +#include "geometry_msgs/Twist.h" +#include "ros/duration.h" + +namespace trajectory_msgs +{ + + class MultiDOFJointTrajectoryPoint : public ros::Msg + { + public: + uint32_t transforms_length; + typedef geometry_msgs::Transform _transforms_type; + _transforms_type st_transforms; + _transforms_type * transforms; + uint32_t velocities_length; + typedef geometry_msgs::Twist _velocities_type; + _velocities_type st_velocities; + _velocities_type * velocities; + uint32_t accelerations_length; + typedef geometry_msgs::Twist _accelerations_type; + _accelerations_type st_accelerations; + _accelerations_type * accelerations; + typedef ros::Duration _time_from_start_type; + _time_from_start_type time_from_start; + + MultiDOFJointTrajectoryPoint(): + transforms_length(0), transforms(NULL), + velocities_length(0), velocities(NULL), + accelerations_length(0), accelerations(NULL), + time_from_start() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->transforms_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->transforms_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->transforms_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->transforms_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->transforms_length); + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->transforms[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->velocities_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->velocities_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->velocities_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->velocities_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->velocities_length); + for( uint32_t i = 0; i < velocities_length; i++){ + offset += this->velocities[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->accelerations_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->accelerations_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->accelerations_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->accelerations_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->accelerations_length); + for( uint32_t i = 0; i < accelerations_length; i++){ + offset += this->accelerations[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->time_from_start.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_from_start.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_from_start.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_from_start.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_from_start.sec); + *(outbuffer + offset + 0) = (this->time_from_start.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->time_from_start.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->time_from_start.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->time_from_start.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->time_from_start.nsec); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t transforms_lengthT = ((uint32_t) (*(inbuffer + offset))); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + transforms_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->transforms_length); + if(transforms_lengthT > transforms_length) + this->transforms = (geometry_msgs::Transform*)realloc(this->transforms, transforms_lengthT * sizeof(geometry_msgs::Transform)); + transforms_length = transforms_lengthT; + for( uint32_t i = 0; i < transforms_length; i++){ + offset += this->st_transforms.deserialize(inbuffer + offset); + memcpy( &(this->transforms[i]), &(this->st_transforms), sizeof(geometry_msgs::Transform)); + } + uint32_t velocities_lengthT = ((uint32_t) (*(inbuffer + offset))); + velocities_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + velocities_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + velocities_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->velocities_length); + if(velocities_lengthT > velocities_length) + this->velocities = (geometry_msgs::Twist*)realloc(this->velocities, velocities_lengthT * sizeof(geometry_msgs::Twist)); + velocities_length = velocities_lengthT; + for( uint32_t i = 0; i < velocities_length; i++){ + offset += this->st_velocities.deserialize(inbuffer + offset); + memcpy( &(this->velocities[i]), &(this->st_velocities), sizeof(geometry_msgs::Twist)); + } + uint32_t accelerations_lengthT = ((uint32_t) (*(inbuffer + offset))); + accelerations_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + accelerations_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + accelerations_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->accelerations_length); + if(accelerations_lengthT > accelerations_length) + this->accelerations = (geometry_msgs::Twist*)realloc(this->accelerations, accelerations_lengthT * sizeof(geometry_msgs::Twist)); + accelerations_length = accelerations_lengthT; + for( uint32_t i = 0; i < accelerations_length; i++){ + offset += this->st_accelerations.deserialize(inbuffer + offset); + memcpy( &(this->accelerations[i]), &(this->st_accelerations), sizeof(geometry_msgs::Twist)); + } + this->time_from_start.sec = ((uint32_t) (*(inbuffer + offset))); + this->time_from_start.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_from_start.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_from_start.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_from_start.sec); + this->time_from_start.nsec = ((uint32_t) (*(inbuffer + offset))); + this->time_from_start.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->time_from_start.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->time_from_start.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->time_from_start.nsec); + return offset; + } + + const char * getType(){ return "trajectory_msgs/MultiDOFJointTrajectoryPoint"; }; + const char * getMD5(){ return "3ebe08d1abd5b65862d50e09430db776"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/turtle_actionlib/ShapeAction.h b/source/ros-max-lib/ros_lib/turtle_actionlib/ShapeAction.h new file mode 100644 index 0000000000000000000000000000000000000000..f100e9ae652ac1761b33bf184c1db44a3c2e23a7 --- /dev/null +++ b/source/ros-max-lib/ros_lib/turtle_actionlib/ShapeAction.h @@ -0,0 +1,56 @@ +#ifndef _ROS_turtle_actionlib_ShapeAction_h +#define _ROS_turtle_actionlib_ShapeAction_h + +#include +#include +#include +#include "ros/msg.h" +#include "turtle_actionlib/ShapeActionGoal.h" +#include "turtle_actionlib/ShapeActionResult.h" +#include "turtle_actionlib/ShapeActionFeedback.h" + +namespace turtle_actionlib +{ + + class ShapeAction : public ros::Msg + { + public: + typedef turtle_actionlib::ShapeActionGoal _action_goal_type; + _action_goal_type action_goal; + typedef turtle_actionlib::ShapeActionResult _action_result_type; + _action_result_type action_result; + typedef turtle_actionlib::ShapeActionFeedback _action_feedback_type; + _action_feedback_type action_feedback; + + ShapeAction(): + 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 "turtle_actionlib/ShapeAction"; }; + const char * getMD5(){ return "d73b17d6237a925511f5d7727a1dc903"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/turtle_actionlib/ShapeActionFeedback.h b/source/ros-max-lib/ros_lib/turtle_actionlib/ShapeActionFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..b57b28c3569bb7686288e96de331520af7b7b0d1 --- /dev/null +++ b/source/ros-max-lib/ros_lib/turtle_actionlib/ShapeActionFeedback.h @@ -0,0 +1,56 @@ +#ifndef _ROS_turtle_actionlib_ShapeActionFeedback_h +#define _ROS_turtle_actionlib_ShapeActionFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "turtle_actionlib/ShapeFeedback.h" + +namespace turtle_actionlib +{ + + class ShapeActionFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef turtle_actionlib::ShapeFeedback _feedback_type; + _feedback_type feedback; + + ShapeActionFeedback(): + 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 "turtle_actionlib/ShapeActionFeedback"; }; + const char * getMD5(){ return "aae20e09065c3809e8a8e87c4c8953fd"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/turtle_actionlib/ShapeActionGoal.h b/source/ros-max-lib/ros_lib/turtle_actionlib/ShapeActionGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..732215e4f56c463a32bfcde4d0485511d2bf4893 --- /dev/null +++ b/source/ros-max-lib/ros_lib/turtle_actionlib/ShapeActionGoal.h @@ -0,0 +1,56 @@ +#ifndef _ROS_turtle_actionlib_ShapeActionGoal_h +#define _ROS_turtle_actionlib_ShapeActionGoal_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalID.h" +#include "turtle_actionlib/ShapeGoal.h" + +namespace turtle_actionlib +{ + + class ShapeActionGoal : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalID _goal_id_type; + _goal_id_type goal_id; + typedef turtle_actionlib::ShapeGoal _goal_type; + _goal_type goal; + + ShapeActionGoal(): + 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 "turtle_actionlib/ShapeActionGoal"; }; + const char * getMD5(){ return "dbfccd187f2ec9c593916447ffd6cc77"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/turtle_actionlib/ShapeActionResult.h b/source/ros-max-lib/ros_lib/turtle_actionlib/ShapeActionResult.h new file mode 100644 index 0000000000000000000000000000000000000000..b4e4213d00a713411d6a7ac52ff101ae362521a1 --- /dev/null +++ b/source/ros-max-lib/ros_lib/turtle_actionlib/ShapeActionResult.h @@ -0,0 +1,56 @@ +#ifndef _ROS_turtle_actionlib_ShapeActionResult_h +#define _ROS_turtle_actionlib_ShapeActionResult_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "actionlib_msgs/GoalStatus.h" +#include "turtle_actionlib/ShapeResult.h" + +namespace turtle_actionlib +{ + + class ShapeActionResult : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef actionlib_msgs::GoalStatus _status_type; + _status_type status; + typedef turtle_actionlib::ShapeResult _result_type; + _result_type result; + + ShapeActionResult(): + 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 "turtle_actionlib/ShapeActionResult"; }; + const char * getMD5(){ return "c8d13d5d140f1047a2e4d3bf5c045822"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/turtle_actionlib/ShapeFeedback.h b/source/ros-max-lib/ros_lib/turtle_actionlib/ShapeFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..6c00c073a29dbc79e2ac4684b25cce7e593811e6 --- /dev/null +++ b/source/ros-max-lib/ros_lib/turtle_actionlib/ShapeFeedback.h @@ -0,0 +1,38 @@ +#ifndef _ROS_turtle_actionlib_ShapeFeedback_h +#define _ROS_turtle_actionlib_ShapeFeedback_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtle_actionlib +{ + + class ShapeFeedback : public ros::Msg + { + public: + + ShapeFeedback() + { + } + + 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 "turtle_actionlib/ShapeFeedback"; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/turtle_actionlib/ShapeGoal.h b/source/ros-max-lib/ros_lib/turtle_actionlib/ShapeGoal.h new file mode 100644 index 0000000000000000000000000000000000000000..bb72d11ed8a1890563a2d5418f99bdb7cb52cce5 --- /dev/null +++ b/source/ros-max-lib/ros_lib/turtle_actionlib/ShapeGoal.h @@ -0,0 +1,86 @@ +#ifndef _ROS_turtle_actionlib_ShapeGoal_h +#define _ROS_turtle_actionlib_ShapeGoal_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtle_actionlib +{ + + class ShapeGoal : public ros::Msg + { + public: + typedef int32_t _edges_type; + _edges_type edges; + typedef float _radius_type; + _radius_type radius; + + ShapeGoal(): + edges(0), + radius(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int32_t real; + uint32_t base; + } u_edges; + u_edges.real = this->edges; + *(outbuffer + offset + 0) = (u_edges.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_edges.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_edges.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_edges.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->edges); + union { + float real; + uint32_t base; + } u_radius; + u_radius.real = this->radius; + *(outbuffer + offset + 0) = (u_radius.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_radius.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_radius.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_radius.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->radius); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int32_t real; + uint32_t base; + } u_edges; + u_edges.base = 0; + u_edges.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_edges.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_edges.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_edges.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->edges = u_edges.real; + offset += sizeof(this->edges); + union { + float real; + uint32_t base; + } u_radius; + u_radius.base = 0; + u_radius.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_radius.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_radius.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_radius.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->radius = u_radius.real; + offset += sizeof(this->radius); + return offset; + } + + const char * getType(){ return "turtle_actionlib/ShapeGoal"; }; + const char * getMD5(){ return "3b9202ab7292cebe5a95ab2bf6b9c091"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/turtle_actionlib/ShapeResult.h b/source/ros-max-lib/ros_lib/turtle_actionlib/ShapeResult.h new file mode 100644 index 0000000000000000000000000000000000000000..2a9127d8804c634ee2e0c93c319388b3f7299cd0 --- /dev/null +++ b/source/ros-max-lib/ros_lib/turtle_actionlib/ShapeResult.h @@ -0,0 +1,86 @@ +#ifndef _ROS_turtle_actionlib_ShapeResult_h +#define _ROS_turtle_actionlib_ShapeResult_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtle_actionlib +{ + + class ShapeResult : public ros::Msg + { + public: + typedef float _interior_angle_type; + _interior_angle_type interior_angle; + typedef float _apothem_type; + _apothem_type apothem; + + ShapeResult(): + interior_angle(0), + apothem(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_interior_angle; + u_interior_angle.real = this->interior_angle; + *(outbuffer + offset + 0) = (u_interior_angle.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_interior_angle.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_interior_angle.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_interior_angle.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->interior_angle); + union { + float real; + uint32_t base; + } u_apothem; + u_apothem.real = this->apothem; + *(outbuffer + offset + 0) = (u_apothem.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_apothem.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_apothem.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_apothem.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->apothem); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_interior_angle; + u_interior_angle.base = 0; + u_interior_angle.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_interior_angle.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_interior_angle.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_interior_angle.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->interior_angle = u_interior_angle.real; + offset += sizeof(this->interior_angle); + union { + float real; + uint32_t base; + } u_apothem; + u_apothem.base = 0; + u_apothem.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_apothem.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_apothem.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_apothem.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->apothem = u_apothem.real; + offset += sizeof(this->apothem); + return offset; + } + + const char * getType(){ return "turtle_actionlib/ShapeResult"; }; + const char * getMD5(){ return "b06c6e2225f820dbc644270387cd1a7c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/turtle_actionlib/Velocity.h b/source/ros-max-lib/ros_lib/turtle_actionlib/Velocity.h new file mode 100644 index 0000000000000000000000000000000000000000..ab7141effc3f2c8815f22d1fb540bf6b8db17b71 --- /dev/null +++ b/source/ros-max-lib/ros_lib/turtle_actionlib/Velocity.h @@ -0,0 +1,86 @@ +#ifndef _ROS_turtle_actionlib_Velocity_h +#define _ROS_turtle_actionlib_Velocity_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtle_actionlib +{ + + class Velocity : public ros::Msg + { + public: + typedef float _linear_type; + _linear_type linear; + typedef float _angular_type; + _angular_type angular; + + Velocity(): + linear(0), + angular(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_linear; + u_linear.real = this->linear; + *(outbuffer + offset + 0) = (u_linear.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_linear.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_linear.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_linear.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->linear); + union { + float real; + uint32_t base; + } u_angular; + u_angular.real = this->angular; + *(outbuffer + offset + 0) = (u_angular.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angular.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angular.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angular.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angular); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_linear; + u_linear.base = 0; + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->linear = u_linear.real; + offset += sizeof(this->linear); + union { + float real; + uint32_t base; + } u_angular; + u_angular.base = 0; + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angular = u_angular.real; + offset += sizeof(this->angular); + return offset; + } + + const char * getType(){ return "turtle_actionlib/Velocity"; }; + const char * getMD5(){ return "9d5c2dcd348ac8f76ce2a4307bd63a13"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/turtlebot3_msgs/MotorPower.h b/source/ros-max-lib/ros_lib/turtlebot3_msgs/MotorPower.h new file mode 100644 index 0000000000000000000000000000000000000000..a22dc41ad20c32c319ba1fff21dc67a32b94653a --- /dev/null +++ b/source/ros-max-lib/ros_lib/turtlebot3_msgs/MotorPower.h @@ -0,0 +1,47 @@ +#ifndef _ROS_turtlebot3_msgs_MotorPower_h +#define _ROS_turtlebot3_msgs_MotorPower_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtlebot3_msgs +{ + + class MotorPower : public ros::Msg + { + public: + typedef uint8_t _state_type; + _state_type state; + enum { OFF = 0 }; + enum { ON = 1 }; + + MotorPower(): + state(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->state >> (8 * 0)) & 0xFF; + offset += sizeof(this->state); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->state = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->state); + return offset; + } + + const char * getType(){ return "turtlebot3_msgs/MotorPower"; }; + const char * getMD5(){ return "8f77c0161e0f2021493136bb5f3f0e51"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/turtlebot3_msgs/PanoramaImg.h b/source/ros-max-lib/ros_lib/turtlebot3_msgs/PanoramaImg.h new file mode 100644 index 0000000000000000000000000000000000000000..7d29869a7755fd6e0bb39d18ddbfe30dda3e6822 --- /dev/null +++ b/source/ros-max-lib/ros_lib/turtlebot3_msgs/PanoramaImg.h @@ -0,0 +1,180 @@ +#ifndef _ROS_turtlebot3_msgs_PanoramaImg_h +#define _ROS_turtlebot3_msgs_PanoramaImg_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/Image.h" + +namespace turtlebot3_msgs +{ + + class PanoramaImg : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _pano_id_type; + _pano_id_type pano_id; + typedef double _latitude_type; + _latitude_type latitude; + typedef double _longitude_type; + _longitude_type longitude; + typedef double _heading_type; + _heading_type heading; + typedef const char* _geo_tag_type; + _geo_tag_type geo_tag; + typedef sensor_msgs::Image _image_type; + _image_type image; + + PanoramaImg(): + header(), + pano_id(""), + latitude(0), + longitude(0), + heading(0), + geo_tag(""), + image() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_pano_id = strlen(this->pano_id); + varToArr(outbuffer + offset, length_pano_id); + offset += 4; + memcpy(outbuffer + offset, this->pano_id, length_pano_id); + offset += length_pano_id; + union { + double real; + uint64_t base; + } u_latitude; + u_latitude.real = this->latitude; + *(outbuffer + offset + 0) = (u_latitude.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_latitude.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_latitude.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_latitude.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_latitude.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_latitude.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_latitude.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_latitude.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->latitude); + union { + double real; + uint64_t base; + } u_longitude; + u_longitude.real = this->longitude; + *(outbuffer + offset + 0) = (u_longitude.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_longitude.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_longitude.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_longitude.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_longitude.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_longitude.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_longitude.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_longitude.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->longitude); + union { + double real; + uint64_t base; + } u_heading; + u_heading.real = this->heading; + *(outbuffer + offset + 0) = (u_heading.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_heading.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_heading.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_heading.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_heading.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_heading.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_heading.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_heading.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->heading); + uint32_t length_geo_tag = strlen(this->geo_tag); + varToArr(outbuffer + offset, length_geo_tag); + offset += 4; + memcpy(outbuffer + offset, this->geo_tag, length_geo_tag); + offset += length_geo_tag; + offset += this->image.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_pano_id; + arrToVar(length_pano_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_pano_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_pano_id-1]=0; + this->pano_id = (char *)(inbuffer + offset-1); + offset += length_pano_id; + union { + double real; + uint64_t base; + } u_latitude; + u_latitude.base = 0; + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_latitude.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->latitude = u_latitude.real; + offset += sizeof(this->latitude); + union { + double real; + uint64_t base; + } u_longitude; + u_longitude.base = 0; + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_longitude.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->longitude = u_longitude.real; + offset += sizeof(this->longitude); + union { + double real; + uint64_t base; + } u_heading; + u_heading.base = 0; + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_heading.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->heading = u_heading.real; + offset += sizeof(this->heading); + uint32_t length_geo_tag; + arrToVar(length_geo_tag, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_geo_tag; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_geo_tag-1]=0; + this->geo_tag = (char *)(inbuffer + offset-1); + offset += length_geo_tag; + offset += this->image.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "turtlebot3_msgs/PanoramaImg"; }; + const char * getMD5(){ return "aedf66295b374a7249a786af27aecc87"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/turtlebot3_msgs/SensorState.h b/source/ros-max-lib/ros_lib/turtlebot3_msgs/SensorState.h new file mode 100644 index 0000000000000000000000000000000000000000..34b624ab9751a80939c7475d87fd516b65c32ffe --- /dev/null +++ b/source/ros-max-lib/ros_lib/turtlebot3_msgs/SensorState.h @@ -0,0 +1,166 @@ +#ifndef _ROS_turtlebot3_msgs_SensorState_h +#define _ROS_turtlebot3_msgs_SensorState_h + +#include +#include +#include +#include "../ros/msg.h" +#include "../ros/time.h" + +namespace turtlebot3_msgs +{ + + class SensorState : public ros::Msg + { + public: + typedef ros::Time _stamp_type; + _stamp_type stamp; + typedef uint8_t _bumper_type; + _bumper_type bumper; + typedef uint8_t _cliff_type; + _cliff_type cliff; + typedef uint8_t _button_type; + _button_type button; + typedef int32_t _left_encoder_type; + _left_encoder_type left_encoder; + typedef int32_t _right_encoder_type; + _right_encoder_type right_encoder; + typedef float _battery_type; + _battery_type battery; + enum { BUMPER_RIGHT = 1 }; + enum { BUMPER_CENTER = 2 }; + enum { BUMPER_LEFT = 4 }; + enum { CLIFF_RIGHT = 1 }; + enum { CLIFF_CENTER = 2 }; + enum { CLIFF_LEFT = 4 }; + enum { BUTTON0 = 1 }; + enum { BUTTON1 = 2 }; + enum { BUTTON2 = 4 }; + enum { ERROR_LEFT_MOTOR = 1 }; + enum { ERROR_RIGHT_MOTOR = 2 }; + + SensorState(): + stamp(), + bumper(0), + cliff(0), + button(0), + left_encoder(0), + right_encoder(0), + battery(0) + { + } + + 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); + *(outbuffer + offset + 0) = (this->bumper >> (8 * 0)) & 0xFF; + offset += sizeof(this->bumper); + *(outbuffer + offset + 0) = (this->cliff >> (8 * 0)) & 0xFF; + offset += sizeof(this->cliff); + *(outbuffer + offset + 0) = (this->button >> (8 * 0)) & 0xFF; + offset += sizeof(this->button); + union { + int32_t real; + uint32_t base; + } u_left_encoder; + u_left_encoder.real = this->left_encoder; + *(outbuffer + offset + 0) = (u_left_encoder.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_left_encoder.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_left_encoder.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_left_encoder.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->left_encoder); + union { + int32_t real; + uint32_t base; + } u_right_encoder; + u_right_encoder.real = this->right_encoder; + *(outbuffer + offset + 0) = (u_right_encoder.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_right_encoder.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_right_encoder.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_right_encoder.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->right_encoder); + union { + float real; + uint32_t base; + } u_battery; + u_battery.real = this->battery; + *(outbuffer + offset + 0) = (u_battery.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_battery.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_battery.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_battery.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->battery); + 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); + this->bumper = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->bumper); + this->cliff = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->cliff); + this->button = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->button); + union { + int32_t real; + uint32_t base; + } u_left_encoder; + u_left_encoder.base = 0; + u_left_encoder.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_left_encoder.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_left_encoder.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_left_encoder.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->left_encoder = u_left_encoder.real; + offset += sizeof(this->left_encoder); + union { + int32_t real; + uint32_t base; + } u_right_encoder; + u_right_encoder.base = 0; + u_right_encoder.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_right_encoder.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_right_encoder.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_right_encoder.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->right_encoder = u_right_encoder.real; + offset += sizeof(this->right_encoder); + union { + float real; + uint32_t base; + } u_battery; + u_battery.base = 0; + u_battery.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_battery.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_battery.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_battery.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->battery = u_battery.real; + offset += sizeof(this->battery); + return offset; + } + + const char * getType(){ return "turtlebot3_msgs/SensorState"; }; + const char * getMD5(){ return "427f77f85da38bc1aa3f65ffb673c94c"; }; + + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/turtlebot3_msgs/SetFollowState.h b/source/ros-max-lib/ros_lib/turtlebot3_msgs/SetFollowState.h new file mode 100644 index 0000000000000000000000000000000000000000..cb16e5cdaca0e2fff97ad52acad4a631c46c60ca --- /dev/null +++ b/source/ros-max-lib/ros_lib/turtlebot3_msgs/SetFollowState.h @@ -0,0 +1,88 @@ +#ifndef _ROS_SERVICE_SetFollowState_h +#define _ROS_SERVICE_SetFollowState_h +#include +#include +#include +#include "ros/msg.h" + +namespace turtlebot3_msgs +{ + +static const char SETFOLLOWSTATE[] = "turtlebot3_msgs/SetFollowState"; + + class SetFollowStateRequest : public ros::Msg + { + public: + typedef uint8_t _state_type; + _state_type state; + enum { STOPPED = 0 }; + enum { FOLLOW = 1 }; + + SetFollowStateRequest(): + state(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->state >> (8 * 0)) & 0xFF; + offset += sizeof(this->state); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->state = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->state); + return offset; + } + + const char * getType(){ return SETFOLLOWSTATE; }; + const char * getMD5(){ return "92b912c48c68248015bb32deb0bf7713"; }; + + }; + + class SetFollowStateResponse : public ros::Msg + { + public: + typedef uint8_t _result_type; + _result_type result; + enum { OK = 0 }; + enum { ERROR = 1 }; + + SetFollowStateResponse(): + result(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->result >> (8 * 0)) & 0xFF; + offset += sizeof(this->result); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->result = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->result); + return offset; + } + + const char * getType(){ return SETFOLLOWSTATE; }; + const char * getMD5(){ return "37065417175a2f4a49100bc798e5ee49"; }; + + }; + + class SetFollowState { + public: + typedef SetFollowStateRequest Request; + typedef SetFollowStateResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/turtlebot3_msgs/TakePanorama.h b/source/ros-max-lib/ros_lib/turtlebot3_msgs/TakePanorama.h new file mode 100644 index 0000000000000000000000000000000000000000..4adde3721add99eccb02d19e1eeeaddcd3c388e1 --- /dev/null +++ b/source/ros-max-lib/ros_lib/turtlebot3_msgs/TakePanorama.h @@ -0,0 +1,162 @@ +#ifndef _ROS_SERVICE_TakePanorama_h +#define _ROS_SERVICE_TakePanorama_h +#include +#include +#include +#include "ros/msg.h" + +namespace turtlebot3_msgs +{ + +static const char TAKEPANORAMA[] = "turtlebot3_msgs/TakePanorama"; + + class TakePanoramaRequest : public ros::Msg + { + public: + typedef uint8_t _mode_type; + _mode_type mode; + typedef float _pano_angle_type; + _pano_angle_type pano_angle; + typedef float _snap_interval_type; + _snap_interval_type snap_interval; + typedef float _rot_vel_type; + _rot_vel_type rot_vel; + enum { SNAPANDROTATE = 0 }; + enum { CONTINUOUS = 1 }; + enum { STOP = 2 }; + + TakePanoramaRequest(): + mode(0), + pano_angle(0), + snap_interval(0), + rot_vel(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->mode >> (8 * 0)) & 0xFF; + offset += sizeof(this->mode); + union { + float real; + uint32_t base; + } u_pano_angle; + u_pano_angle.real = this->pano_angle; + *(outbuffer + offset + 0) = (u_pano_angle.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_pano_angle.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_pano_angle.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_pano_angle.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->pano_angle); + union { + float real; + uint32_t base; + } u_snap_interval; + u_snap_interval.real = this->snap_interval; + *(outbuffer + offset + 0) = (u_snap_interval.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_snap_interval.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_snap_interval.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_snap_interval.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->snap_interval); + union { + float real; + uint32_t base; + } u_rot_vel; + u_rot_vel.real = this->rot_vel; + *(outbuffer + offset + 0) = (u_rot_vel.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_rot_vel.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_rot_vel.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_rot_vel.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->rot_vel); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->mode = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->mode); + union { + float real; + uint32_t base; + } u_pano_angle; + u_pano_angle.base = 0; + u_pano_angle.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_pano_angle.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_pano_angle.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_pano_angle.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->pano_angle = u_pano_angle.real; + offset += sizeof(this->pano_angle); + union { + float real; + uint32_t base; + } u_snap_interval; + u_snap_interval.base = 0; + u_snap_interval.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_snap_interval.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_snap_interval.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_snap_interval.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->snap_interval = u_snap_interval.real; + offset += sizeof(this->snap_interval); + union { + float real; + uint32_t base; + } u_rot_vel; + u_rot_vel.base = 0; + u_rot_vel.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_rot_vel.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_rot_vel.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_rot_vel.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->rot_vel = u_rot_vel.real; + offset += sizeof(this->rot_vel); + return offset; + } + + const char * getType(){ return TAKEPANORAMA; }; + const char * getMD5(){ return "f52c694c82704221735cc576c7587ecc"; }; + + }; + + class TakePanoramaResponse : public ros::Msg + { + public: + typedef uint8_t _status_type; + _status_type status; + enum { STARTED = 0 }; + enum { IN_PROGRESS = 1 }; + enum { STOPPED = 2 }; + + TakePanoramaResponse(): + status(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->status >> (8 * 0)) & 0xFF; + offset += sizeof(this->status); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->status = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->status); + return offset; + } + + const char * getType(){ return TAKEPANORAMA; }; + const char * getMD5(){ return "1ebe3e03b034aa9578d367d7cf6ed627"; }; + + }; + + class TakePanorama { + public: + typedef TakePanoramaRequest Request; + typedef TakePanoramaResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/turtlebot3_msgs/VersionInfo.h b/source/ros-max-lib/ros_lib/turtlebot3_msgs/VersionInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..3d81b30c650570f10d881aecf86f3ff39b82d3bb --- /dev/null +++ b/source/ros-max-lib/ros_lib/turtlebot3_msgs/VersionInfo.h @@ -0,0 +1,89 @@ +#ifndef _ROS_turtlebot3_msgs_VersionInfo_h +#define _ROS_turtlebot3_msgs_VersionInfo_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtlebot3_msgs +{ + + class VersionInfo : public ros::Msg + { + public: + typedef const char* _hardware_type; + _hardware_type hardware; + typedef const char* _firmware_type; + _firmware_type firmware; + typedef const char* _software_type; + _software_type software; + + VersionInfo(): + hardware(""), + firmware(""), + software("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_hardware = strlen(this->hardware); + varToArr(outbuffer + offset, length_hardware); + offset += 4; + memcpy(outbuffer + offset, this->hardware, length_hardware); + offset += length_hardware; + uint32_t length_firmware = strlen(this->firmware); + varToArr(outbuffer + offset, length_firmware); + offset += 4; + memcpy(outbuffer + offset, this->firmware, length_firmware); + offset += length_firmware; + uint32_t length_software = strlen(this->software); + varToArr(outbuffer + offset, length_software); + offset += 4; + memcpy(outbuffer + offset, this->software, length_software); + offset += length_software; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_hardware; + arrToVar(length_hardware, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_hardware; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_hardware-1]=0; + this->hardware = (char *)(inbuffer + offset-1); + offset += length_hardware; + uint32_t length_firmware; + arrToVar(length_firmware, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_firmware; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_firmware-1]=0; + this->firmware = (char *)(inbuffer + offset-1); + offset += length_firmware; + uint32_t length_software; + arrToVar(length_software, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_software; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_software-1]=0; + this->software = (char *)(inbuffer + offset-1); + offset += length_software; + return offset; + } + + const char * getType(){ return "turtlebot3_msgs/VersionInfo"; }; + const char * getMD5(){ return "43e0361461af2970a33107409403ef3c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/turtlesim/Color.h b/source/ros-max-lib/ros_lib/turtlesim/Color.h new file mode 100644 index 0000000000000000000000000000000000000000..de802907bd3c787692d47611bee45ba7ea25da46 --- /dev/null +++ b/source/ros-max-lib/ros_lib/turtlesim/Color.h @@ -0,0 +1,59 @@ +#ifndef _ROS_turtlesim_Color_h +#define _ROS_turtlesim_Color_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtlesim +{ + + class Color : public ros::Msg + { + public: + typedef uint8_t _r_type; + _r_type r; + typedef uint8_t _g_type; + _g_type g; + typedef uint8_t _b_type; + _b_type b; + + Color(): + r(0), + g(0), + b(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->r >> (8 * 0)) & 0xFF; + offset += sizeof(this->r); + *(outbuffer + offset + 0) = (this->g >> (8 * 0)) & 0xFF; + offset += sizeof(this->g); + *(outbuffer + offset + 0) = (this->b >> (8 * 0)) & 0xFF; + offset += sizeof(this->b); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->r = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->r); + this->g = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->g); + this->b = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->b); + return offset; + } + + const char * getType(){ return "turtlesim/Color"; }; + const char * getMD5(){ return "353891e354491c51aabe32df673fb446"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/turtlesim/Kill.h b/source/ros-max-lib/ros_lib/turtlesim/Kill.h new file mode 100644 index 0000000000000000000000000000000000000000..086f2bbd01569bec4341a6f9ca65228806723fae --- /dev/null +++ b/source/ros-max-lib/ros_lib/turtlesim/Kill.h @@ -0,0 +1,87 @@ +#ifndef _ROS_SERVICE_Kill_h +#define _ROS_SERVICE_Kill_h +#include +#include +#include +#include "ros/msg.h" + +namespace turtlesim +{ + +static const char KILL[] = "turtlesim/Kill"; + + class KillRequest : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + + KillRequest(): + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return KILL; }; + const char * getMD5(){ return "c1f3d28f1b044c871e6eff2e9fc3c667"; }; + + }; + + class KillResponse : public ros::Msg + { + public: + + KillResponse() + { + } + + 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 KILL; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class Kill { + public: + typedef KillRequest Request; + typedef KillResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/turtlesim/Pose.h b/source/ros-max-lib/ros_lib/turtlesim/Pose.h new file mode 100644 index 0000000000000000000000000000000000000000..7dede410337f904c20040c565f061c40ea597257 --- /dev/null +++ b/source/ros-max-lib/ros_lib/turtlesim/Pose.h @@ -0,0 +1,158 @@ +#ifndef _ROS_turtlesim_Pose_h +#define _ROS_turtlesim_Pose_h + +#include +#include +#include +#include "ros/msg.h" + +namespace turtlesim +{ + + class Pose : public ros::Msg + { + public: + typedef float _x_type; + _x_type x; + typedef float _y_type; + _y_type y; + typedef float _theta_type; + _theta_type theta; + typedef float _linear_velocity_type; + _linear_velocity_type linear_velocity; + typedef float _angular_velocity_type; + _angular_velocity_type angular_velocity; + + Pose(): + x(0), + y(0), + theta(0), + linear_velocity(0), + angular_velocity(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_theta; + u_theta.real = this->theta; + *(outbuffer + offset + 0) = (u_theta.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_theta.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_theta.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_theta.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->theta); + union { + float real; + uint32_t base; + } u_linear_velocity; + u_linear_velocity.real = this->linear_velocity; + *(outbuffer + offset + 0) = (u_linear_velocity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_linear_velocity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_linear_velocity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_linear_velocity.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->linear_velocity); + union { + float real; + uint32_t base; + } u_angular_velocity; + u_angular_velocity.real = this->angular_velocity; + *(outbuffer + offset + 0) = (u_angular_velocity.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angular_velocity.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angular_velocity.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angular_velocity.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angular_velocity); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->x = u_x.real; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->y = u_y.real; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_theta; + u_theta.base = 0; + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->theta = u_theta.real; + offset += sizeof(this->theta); + union { + float real; + uint32_t base; + } u_linear_velocity; + u_linear_velocity.base = 0; + u_linear_velocity.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_linear_velocity.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_linear_velocity.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_linear_velocity.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->linear_velocity = u_linear_velocity.real; + offset += sizeof(this->linear_velocity); + union { + float real; + uint32_t base; + } u_angular_velocity; + u_angular_velocity.base = 0; + u_angular_velocity.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angular_velocity.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angular_velocity.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angular_velocity.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angular_velocity = u_angular_velocity.real; + offset += sizeof(this->angular_velocity); + return offset; + } + + const char * getType(){ return "turtlesim/Pose"; }; + const char * getMD5(){ return "863b248d5016ca62ea2e895ae5265cf9"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/turtlesim/SetPen.h b/source/ros-max-lib/ros_lib/turtlesim/SetPen.h new file mode 100644 index 0000000000000000000000000000000000000000..a0e32c046c8b2b7066107e6b424c15455fddc9cc --- /dev/null +++ b/source/ros-max-lib/ros_lib/turtlesim/SetPen.h @@ -0,0 +1,105 @@ +#ifndef _ROS_SERVICE_SetPen_h +#define _ROS_SERVICE_SetPen_h +#include +#include +#include +#include "ros/msg.h" + +namespace turtlesim +{ + +static const char SETPEN[] = "turtlesim/SetPen"; + + class SetPenRequest : public ros::Msg + { + public: + typedef uint8_t _r_type; + _r_type r; + typedef uint8_t _g_type; + _g_type g; + typedef uint8_t _b_type; + _b_type b; + typedef uint8_t _width_type; + _width_type width; + typedef uint8_t _off_type; + _off_type off; + + SetPenRequest(): + r(0), + g(0), + b(0), + width(0), + off(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->r >> (8 * 0)) & 0xFF; + offset += sizeof(this->r); + *(outbuffer + offset + 0) = (this->g >> (8 * 0)) & 0xFF; + offset += sizeof(this->g); + *(outbuffer + offset + 0) = (this->b >> (8 * 0)) & 0xFF; + offset += sizeof(this->b); + *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF; + offset += sizeof(this->width); + *(outbuffer + offset + 0) = (this->off >> (8 * 0)) & 0xFF; + offset += sizeof(this->off); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->r = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->r); + this->g = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->g); + this->b = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->b); + this->width = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->width); + this->off = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->off); + return offset; + } + + const char * getType(){ return SETPEN; }; + const char * getMD5(){ return "9f452acce566bf0c0954594f69a8e41b"; }; + + }; + + class SetPenResponse : public ros::Msg + { + public: + + SetPenResponse() + { + } + + 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 SETPEN; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class SetPen { + public: + typedef SetPenRequest Request; + typedef SetPenResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/turtlesim/Spawn.h b/source/ros-max-lib/ros_lib/turtlesim/Spawn.h new file mode 100644 index 0000000000000000000000000000000000000000..f69b42febadf0ad50bd0d59d8c15fbdd0aa095be --- /dev/null +++ b/source/ros-max-lib/ros_lib/turtlesim/Spawn.h @@ -0,0 +1,176 @@ +#ifndef _ROS_SERVICE_Spawn_h +#define _ROS_SERVICE_Spawn_h +#include +#include +#include +#include "ros/msg.h" + +namespace turtlesim +{ + +static const char SPAWN[] = "turtlesim/Spawn"; + + class SpawnRequest : public ros::Msg + { + public: + typedef float _x_type; + _x_type x; + typedef float _y_type; + _y_type y; + typedef float _theta_type; + _theta_type theta; + typedef const char* _name_type; + _name_type name; + + SpawnRequest(): + x(0), + y(0), + theta(0), + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_theta; + u_theta.real = this->theta; + *(outbuffer + offset + 0) = (u_theta.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_theta.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_theta.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_theta.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->theta); + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->x = u_x.real; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->y = u_y.real; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_theta; + u_theta.base = 0; + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->theta = u_theta.real; + offset += sizeof(this->theta); + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return SPAWN; }; + const char * getMD5(){ return "57f001c49ab7b11d699f8606c1f4f7ff"; }; + + }; + + class SpawnResponse : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + + SpawnResponse(): + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return SPAWN; }; + const char * getMD5(){ return "c1f3d28f1b044c871e6eff2e9fc3c667"; }; + + }; + + class Spawn { + public: + typedef SpawnRequest Request; + typedef SpawnResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/turtlesim/TeleportAbsolute.h b/source/ros-max-lib/ros_lib/turtlesim/TeleportAbsolute.h new file mode 100644 index 0000000000000000000000000000000000000000..c81489b06319ff7d1e7f41b194b0db5d2df23532 --- /dev/null +++ b/source/ros-max-lib/ros_lib/turtlesim/TeleportAbsolute.h @@ -0,0 +1,142 @@ +#ifndef _ROS_SERVICE_TeleportAbsolute_h +#define _ROS_SERVICE_TeleportAbsolute_h +#include +#include +#include +#include "ros/msg.h" + +namespace turtlesim +{ + +static const char TELEPORTABSOLUTE[] = "turtlesim/TeleportAbsolute"; + + class TeleportAbsoluteRequest : public ros::Msg + { + public: + typedef float _x_type; + _x_type x; + typedef float _y_type; + _y_type y; + typedef float _theta_type; + _theta_type theta; + + TeleportAbsoluteRequest(): + x(0), + y(0), + theta(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_theta; + u_theta.real = this->theta; + *(outbuffer + offset + 0) = (u_theta.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_theta.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_theta.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_theta.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->theta); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->x = u_x.real; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->y = u_y.real; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_theta; + u_theta.base = 0; + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_theta.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->theta = u_theta.real; + offset += sizeof(this->theta); + return offset; + } + + const char * getType(){ return TELEPORTABSOLUTE; }; + const char * getMD5(){ return "a130bc60ee6513855dc62ea83fcc5b20"; }; + + }; + + class TeleportAbsoluteResponse : public ros::Msg + { + public: + + TeleportAbsoluteResponse() + { + } + + 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 TELEPORTABSOLUTE; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class TeleportAbsolute { + public: + typedef TeleportAbsoluteRequest Request; + typedef TeleportAbsoluteResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/turtlesim/TeleportRelative.h b/source/ros-max-lib/ros_lib/turtlesim/TeleportRelative.h new file mode 100644 index 0000000000000000000000000000000000000000..2da96682a8e149a3f139fd0043c469a46a8e27cb --- /dev/null +++ b/source/ros-max-lib/ros_lib/turtlesim/TeleportRelative.h @@ -0,0 +1,118 @@ +#ifndef _ROS_SERVICE_TeleportRelative_h +#define _ROS_SERVICE_TeleportRelative_h +#include +#include +#include +#include "ros/msg.h" + +namespace turtlesim +{ + +static const char TELEPORTRELATIVE[] = "turtlesim/TeleportRelative"; + + class TeleportRelativeRequest : public ros::Msg + { + public: + typedef float _linear_type; + _linear_type linear; + typedef float _angular_type; + _angular_type angular; + + TeleportRelativeRequest(): + linear(0), + angular(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_linear; + u_linear.real = this->linear; + *(outbuffer + offset + 0) = (u_linear.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_linear.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_linear.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_linear.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->linear); + union { + float real; + uint32_t base; + } u_angular; + u_angular.real = this->angular; + *(outbuffer + offset + 0) = (u_angular.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_angular.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_angular.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_angular.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->angular); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_linear; + u_linear.base = 0; + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_linear.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->linear = u_linear.real; + offset += sizeof(this->linear); + union { + float real; + uint32_t base; + } u_angular; + u_angular.base = 0; + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_angular.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->angular = u_angular.real; + offset += sizeof(this->angular); + return offset; + } + + const char * getType(){ return TELEPORTRELATIVE; }; + const char * getMD5(){ return "9d5c2dcd348ac8f76ce2a4307bd63a13"; }; + + }; + + class TeleportRelativeResponse : public ros::Msg + { + public: + + TeleportRelativeResponse() + { + } + + 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 TELEPORTRELATIVE; }; + const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; + + }; + + class TeleportRelative { + public: + typedef TeleportRelativeRequest Request; + typedef TeleportRelativeResponse Response; + }; + +} +#endif diff --git a/source/ros-max-lib/ros_lib/uuid_msgs/UniqueID.h b/source/ros-max-lib/ros_lib/uuid_msgs/UniqueID.h new file mode 100644 index 0000000000000000000000000000000000000000..bf14c401a33fc3184d2b03c39d88ed674e57045c --- /dev/null +++ b/source/ros-max-lib/ros_lib/uuid_msgs/UniqueID.h @@ -0,0 +1,48 @@ +#ifndef _ROS_uuid_msgs_UniqueID_h +#define _ROS_uuid_msgs_UniqueID_h + +#include +#include +#include +#include "ros/msg.h" + +namespace uuid_msgs +{ + + class UniqueID : public ros::Msg + { + public: + uint8_t uuid[16]; + + UniqueID(): + uuid() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + for( uint32_t i = 0; i < 16; i++){ + *(outbuffer + offset + 0) = (this->uuid[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->uuid[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + for( uint32_t i = 0; i < 16; i++){ + this->uuid[i] = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->uuid[i]); + } + return offset; + } + + const char * getType(){ return "uuid_msgs/UniqueID"; }; + const char * getMD5(){ return "fec2a93b6f5367ee8112c9c0b41ff310"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/variant_msgs/Test.h b/source/ros-max-lib/ros_lib/variant_msgs/Test.h new file mode 100644 index 0000000000000000000000000000000000000000..4316dfeb0bb4aa556803377025230b19de1165e8 --- /dev/null +++ b/source/ros-max-lib/ros_lib/variant_msgs/Test.h @@ -0,0 +1,241 @@ +#ifndef _ROS_variant_msgs_Test_h +#define _ROS_variant_msgs_Test_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "std_msgs/Bool.h" +#include "std_msgs/String.h" + +namespace variant_msgs +{ + + class Test : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef int32_t _builtin_int_type; + _builtin_int_type builtin_int; + typedef bool _builtin_boolean_type; + _builtin_boolean_type builtin_boolean; + typedef std_msgs::Bool _boolean_type; + _boolean_type boolean; + typedef const char* _builtin_string_type; + _builtin_string_type builtin_string; + typedef std_msgs::String _string_type; + _string_type string; + int32_t builtin_int_array[3]; + uint32_t builtin_int_vector_length; + typedef int32_t _builtin_int_vector_type; + _builtin_int_vector_type st_builtin_int_vector; + _builtin_int_vector_type * builtin_int_vector; + std_msgs::String string_array[3]; + uint32_t string_vector_length; + typedef std_msgs::String _string_vector_type; + _string_vector_type st_string_vector; + _string_vector_type * string_vector; + bool builtin_boolean_array[3]; + enum { byte_constant = 42 }; + + Test(): + header(), + builtin_int(0), + builtin_boolean(0), + boolean(), + builtin_string(""), + string(), + builtin_int_array(), + builtin_int_vector_length(0), builtin_int_vector(NULL), + string_array(), + string_vector_length(0), string_vector(NULL), + builtin_boolean_array() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + int32_t real; + uint32_t base; + } u_builtin_int; + u_builtin_int.real = this->builtin_int; + *(outbuffer + offset + 0) = (u_builtin_int.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_builtin_int.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_builtin_int.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_builtin_int.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->builtin_int); + union { + bool real; + uint8_t base; + } u_builtin_boolean; + u_builtin_boolean.real = this->builtin_boolean; + *(outbuffer + offset + 0) = (u_builtin_boolean.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->builtin_boolean); + offset += this->boolean.serialize(outbuffer + offset); + uint32_t length_builtin_string = strlen(this->builtin_string); + varToArr(outbuffer + offset, length_builtin_string); + offset += 4; + memcpy(outbuffer + offset, this->builtin_string, length_builtin_string); + offset += length_builtin_string; + offset += this->string.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 3; i++){ + union { + int32_t real; + uint32_t base; + } u_builtin_int_arrayi; + u_builtin_int_arrayi.real = this->builtin_int_array[i]; + *(outbuffer + offset + 0) = (u_builtin_int_arrayi.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_builtin_int_arrayi.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_builtin_int_arrayi.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_builtin_int_arrayi.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->builtin_int_array[i]); + } + *(outbuffer + offset + 0) = (this->builtin_int_vector_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->builtin_int_vector_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->builtin_int_vector_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->builtin_int_vector_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->builtin_int_vector_length); + for( uint32_t i = 0; i < builtin_int_vector_length; i++){ + union { + int32_t real; + uint32_t base; + } u_builtin_int_vectori; + u_builtin_int_vectori.real = this->builtin_int_vector[i]; + *(outbuffer + offset + 0) = (u_builtin_int_vectori.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_builtin_int_vectori.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_builtin_int_vectori.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_builtin_int_vectori.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->builtin_int_vector[i]); + } + for( uint32_t i = 0; i < 3; i++){ + offset += this->string_array[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->string_vector_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->string_vector_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->string_vector_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->string_vector_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->string_vector_length); + for( uint32_t i = 0; i < string_vector_length; i++){ + offset += this->string_vector[i].serialize(outbuffer + offset); + } + for( uint32_t i = 0; i < 3; i++){ + union { + bool real; + uint8_t base; + } u_builtin_boolean_arrayi; + u_builtin_boolean_arrayi.real = this->builtin_boolean_array[i]; + *(outbuffer + offset + 0) = (u_builtin_boolean_arrayi.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->builtin_boolean_array[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + int32_t real; + uint32_t base; + } u_builtin_int; + u_builtin_int.base = 0; + u_builtin_int.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_builtin_int.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_builtin_int.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_builtin_int.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->builtin_int = u_builtin_int.real; + offset += sizeof(this->builtin_int); + union { + bool real; + uint8_t base; + } u_builtin_boolean; + u_builtin_boolean.base = 0; + u_builtin_boolean.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->builtin_boolean = u_builtin_boolean.real; + offset += sizeof(this->builtin_boolean); + offset += this->boolean.deserialize(inbuffer + offset); + uint32_t length_builtin_string; + arrToVar(length_builtin_string, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_builtin_string; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_builtin_string-1]=0; + this->builtin_string = (char *)(inbuffer + offset-1); + offset += length_builtin_string; + offset += this->string.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 3; i++){ + union { + int32_t real; + uint32_t base; + } u_builtin_int_arrayi; + u_builtin_int_arrayi.base = 0; + u_builtin_int_arrayi.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_builtin_int_arrayi.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_builtin_int_arrayi.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_builtin_int_arrayi.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->builtin_int_array[i] = u_builtin_int_arrayi.real; + offset += sizeof(this->builtin_int_array[i]); + } + uint32_t builtin_int_vector_lengthT = ((uint32_t) (*(inbuffer + offset))); + builtin_int_vector_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + builtin_int_vector_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + builtin_int_vector_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->builtin_int_vector_length); + if(builtin_int_vector_lengthT > builtin_int_vector_length) + this->builtin_int_vector = (int32_t*)realloc(this->builtin_int_vector, builtin_int_vector_lengthT * sizeof(int32_t)); + builtin_int_vector_length = builtin_int_vector_lengthT; + for( uint32_t i = 0; i < builtin_int_vector_length; i++){ + union { + int32_t real; + uint32_t base; + } u_st_builtin_int_vector; + u_st_builtin_int_vector.base = 0; + u_st_builtin_int_vector.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_st_builtin_int_vector.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_st_builtin_int_vector.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_st_builtin_int_vector.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->st_builtin_int_vector = u_st_builtin_int_vector.real; + offset += sizeof(this->st_builtin_int_vector); + memcpy( &(this->builtin_int_vector[i]), &(this->st_builtin_int_vector), sizeof(int32_t)); + } + for( uint32_t i = 0; i < 3; i++){ + offset += this->string_array[i].deserialize(inbuffer + offset); + } + uint32_t string_vector_lengthT = ((uint32_t) (*(inbuffer + offset))); + string_vector_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + string_vector_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + string_vector_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->string_vector_length); + if(string_vector_lengthT > string_vector_length) + this->string_vector = (std_msgs::String*)realloc(this->string_vector, string_vector_lengthT * sizeof(std_msgs::String)); + string_vector_length = string_vector_lengthT; + for( uint32_t i = 0; i < string_vector_length; i++){ + offset += this->st_string_vector.deserialize(inbuffer + offset); + memcpy( &(this->string_vector[i]), &(this->st_string_vector), sizeof(std_msgs::String)); + } + for( uint32_t i = 0; i < 3; i++){ + union { + bool real; + uint8_t base; + } u_builtin_boolean_arrayi; + u_builtin_boolean_arrayi.base = 0; + u_builtin_boolean_arrayi.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->builtin_boolean_array[i] = u_builtin_boolean_arrayi.real; + offset += sizeof(this->builtin_boolean_array[i]); + } + return offset; + } + + const char * getType(){ return "variant_msgs/Test"; }; + const char * getMD5(){ return "17d92d9cea3499753cb392766b3203a1"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/variant_msgs/Variant.h b/source/ros-max-lib/ros_lib/variant_msgs/Variant.h new file mode 100644 index 0000000000000000000000000000000000000000..c62dd4429cf993c3ab3214cd8771b034aaa6880c --- /dev/null +++ b/source/ros-max-lib/ros_lib/variant_msgs/Variant.h @@ -0,0 +1,77 @@ +#ifndef _ROS_variant_msgs_Variant_h +#define _ROS_variant_msgs_Variant_h + +#include +#include +#include +#include "ros/msg.h" +#include "variant_msgs/VariantHeader.h" +#include "variant_msgs/VariantType.h" + +namespace variant_msgs +{ + + class Variant : public ros::Msg + { + public: + typedef variant_msgs::VariantHeader _header_type; + _header_type header; + typedef variant_msgs::VariantType _type_type; + _type_type type; + uint32_t data_length; + typedef uint8_t _data_type; + _data_type st_data; + _data_type * data; + + Variant(): + header(), + type(), + data_length(0), data(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->type.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->data_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->data_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->data_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->data_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->data_length); + for( uint32_t i = 0; i < data_length; i++){ + *(outbuffer + offset + 0) = (this->data[i] >> (8 * 0)) & 0xFF; + offset += sizeof(this->data[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->type.deserialize(inbuffer + offset); + uint32_t data_lengthT = ((uint32_t) (*(inbuffer + offset))); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + data_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->data_length); + if(data_lengthT > data_length) + this->data = (uint8_t*)realloc(this->data, data_lengthT * sizeof(uint8_t)); + data_length = data_lengthT; + for( uint32_t i = 0; i < data_length; i++){ + this->st_data = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->st_data); + memcpy( &(this->data[i]), &(this->st_data), sizeof(uint8_t)); + } + return offset; + } + + const char * getType(){ return "variant_msgs/Variant"; }; + const char * getMD5(){ return "01c24cd44ef34b0c6a309bcafb6bdfab"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/variant_msgs/VariantHeader.h b/source/ros-max-lib/ros_lib/variant_msgs/VariantHeader.h new file mode 100644 index 0000000000000000000000000000000000000000..236b5cbaf6fb1fa1739423e9311c91cf218dd936 --- /dev/null +++ b/source/ros-max-lib/ros_lib/variant_msgs/VariantHeader.h @@ -0,0 +1,90 @@ +#ifndef _ROS_variant_msgs_VariantHeader_h +#define _ROS_variant_msgs_VariantHeader_h + +#include +#include +#include +#include "ros/msg.h" + +namespace variant_msgs +{ + + class VariantHeader : public ros::Msg + { + public: + typedef const char* _publisher_type; + _publisher_type publisher; + typedef const char* _topic_type; + _topic_type topic; + typedef bool _latched_type; + _latched_type latched; + + VariantHeader(): + publisher(""), + topic(""), + latched(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_publisher = strlen(this->publisher); + varToArr(outbuffer + offset, length_publisher); + offset += 4; + memcpy(outbuffer + offset, this->publisher, length_publisher); + offset += length_publisher; + uint32_t length_topic = strlen(this->topic); + varToArr(outbuffer + offset, length_topic); + offset += 4; + memcpy(outbuffer + offset, this->topic, length_topic); + offset += length_topic; + union { + bool real; + uint8_t base; + } u_latched; + u_latched.real = this->latched; + *(outbuffer + offset + 0) = (u_latched.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->latched); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_publisher; + arrToVar(length_publisher, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_publisher; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_publisher-1]=0; + this->publisher = (char *)(inbuffer + offset-1); + offset += length_publisher; + uint32_t length_topic; + arrToVar(length_topic, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_topic; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_topic-1]=0; + this->topic = (char *)(inbuffer + offset-1); + offset += length_topic; + union { + bool real; + uint8_t base; + } u_latched; + u_latched.base = 0; + u_latched.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->latched = u_latched.real; + offset += sizeof(this->latched); + return offset; + } + + const char * getType(){ return "variant_msgs/VariantHeader"; }; + const char * getMD5(){ return "e4adbe277ed51d50644d64067b86c73d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/variant_msgs/VariantType.h b/source/ros-max-lib/ros_lib/variant_msgs/VariantType.h new file mode 100644 index 0000000000000000000000000000000000000000..66c7ac73d7769bbf59d7a0056cbc575d89616617 --- /dev/null +++ b/source/ros-max-lib/ros_lib/variant_msgs/VariantType.h @@ -0,0 +1,89 @@ +#ifndef _ROS_variant_msgs_VariantType_h +#define _ROS_variant_msgs_VariantType_h + +#include +#include +#include +#include "ros/msg.h" + +namespace variant_msgs +{ + + class VariantType : public ros::Msg + { + public: + typedef const char* _md5_sum_type; + _md5_sum_type md5_sum; + typedef const char* _data_type_type; + _data_type_type data_type; + typedef const char* _definition_type; + _definition_type definition; + + VariantType(): + md5_sum(""), + data_type(""), + definition("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_md5_sum = strlen(this->md5_sum); + varToArr(outbuffer + offset, length_md5_sum); + offset += 4; + memcpy(outbuffer + offset, this->md5_sum, length_md5_sum); + offset += length_md5_sum; + uint32_t length_data_type = strlen(this->data_type); + varToArr(outbuffer + offset, length_data_type); + offset += 4; + memcpy(outbuffer + offset, this->data_type, length_data_type); + offset += length_data_type; + uint32_t length_definition = strlen(this->definition); + varToArr(outbuffer + offset, length_definition); + offset += 4; + memcpy(outbuffer + offset, this->definition, length_definition); + offset += length_definition; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_md5_sum; + arrToVar(length_md5_sum, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_md5_sum; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_md5_sum-1]=0; + this->md5_sum = (char *)(inbuffer + offset-1); + offset += length_md5_sum; + uint32_t length_data_type; + arrToVar(length_data_type, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_data_type; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_data_type-1]=0; + this->data_type = (char *)(inbuffer + offset-1); + offset += length_data_type; + uint32_t length_definition; + arrToVar(length_definition, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_definition; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_definition-1]=0; + this->definition = (char *)(inbuffer + offset-1); + offset += length_definition; + return offset; + } + + const char * getType(){ return "variant_msgs/VariantType"; }; + const char * getMD5(){ return "ea49579a10d85560b62a77e2f2f84caf"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/visualization_msgs/ImageMarker.h b/source/ros-max-lib/ros_lib/visualization_msgs/ImageMarker.h new file mode 100644 index 0000000000000000000000000000000000000000..c69577ad449ffefc3e898f61cd93e657ce5d1b5a --- /dev/null +++ b/source/ros-max-lib/ros_lib/visualization_msgs/ImageMarker.h @@ -0,0 +1,262 @@ +#ifndef _ROS_visualization_msgs_ImageMarker_h +#define _ROS_visualization_msgs_ImageMarker_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Point.h" +#include "std_msgs/ColorRGBA.h" +#include "ros/duration.h" + +namespace visualization_msgs +{ + + class ImageMarker : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _ns_type; + _ns_type ns; + typedef int32_t _id_type; + _id_type id; + typedef int32_t _type_type; + _type_type type; + typedef int32_t _action_type; + _action_type action; + typedef geometry_msgs::Point _position_type; + _position_type position; + typedef float _scale_type; + _scale_type scale; + typedef std_msgs::ColorRGBA _outline_color_type; + _outline_color_type outline_color; + typedef uint8_t _filled_type; + _filled_type filled; + typedef std_msgs::ColorRGBA _fill_color_type; + _fill_color_type fill_color; + typedef ros::Duration _lifetime_type; + _lifetime_type lifetime; + uint32_t points_length; + typedef geometry_msgs::Point _points_type; + _points_type st_points; + _points_type * points; + uint32_t outline_colors_length; + typedef std_msgs::ColorRGBA _outline_colors_type; + _outline_colors_type st_outline_colors; + _outline_colors_type * outline_colors; + enum { CIRCLE = 0 }; + enum { LINE_STRIP = 1 }; + enum { LINE_LIST = 2 }; + enum { POLYGON = 3 }; + enum { POINTS = 4 }; + enum { ADD = 0 }; + enum { REMOVE = 1 }; + + ImageMarker(): + header(), + ns(""), + id(0), + type(0), + action(0), + position(), + scale(0), + outline_color(), + filled(0), + fill_color(), + lifetime(), + points_length(0), points(NULL), + outline_colors_length(0), outline_colors(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_ns = strlen(this->ns); + varToArr(outbuffer + offset, length_ns); + offset += 4; + memcpy(outbuffer + offset, this->ns, length_ns); + offset += length_ns; + union { + int32_t real; + uint32_t base; + } u_id; + u_id.real = this->id; + *(outbuffer + offset + 0) = (u_id.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_id.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_id.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_id.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->id); + union { + int32_t real; + uint32_t base; + } u_type; + u_type.real = this->type; + *(outbuffer + offset + 0) = (u_type.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_type.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_type.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_type.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->type); + union { + int32_t real; + uint32_t base; + } u_action; + u_action.real = this->action; + *(outbuffer + offset + 0) = (u_action.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_action.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_action.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_action.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->action); + offset += this->position.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_scale; + u_scale.real = this->scale; + *(outbuffer + offset + 0) = (u_scale.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_scale.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_scale.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_scale.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->scale); + offset += this->outline_color.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->filled >> (8 * 0)) & 0xFF; + offset += sizeof(this->filled); + offset += this->fill_color.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->lifetime.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->lifetime.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->lifetime.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->lifetime.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->lifetime.sec); + *(outbuffer + offset + 0) = (this->lifetime.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->lifetime.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->lifetime.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->lifetime.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->lifetime.nsec); + *(outbuffer + offset + 0) = (this->points_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->points_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->points_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->points_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->points_length); + for( uint32_t i = 0; i < points_length; i++){ + offset += this->points[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->outline_colors_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->outline_colors_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->outline_colors_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->outline_colors_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->outline_colors_length); + for( uint32_t i = 0; i < outline_colors_length; i++){ + offset += this->outline_colors[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_ns; + arrToVar(length_ns, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_ns; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_ns-1]=0; + this->ns = (char *)(inbuffer + offset-1); + offset += length_ns; + union { + int32_t real; + uint32_t base; + } u_id; + u_id.base = 0; + u_id.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->id = u_id.real; + offset += sizeof(this->id); + union { + int32_t real; + uint32_t base; + } u_type; + u_type.base = 0; + u_type.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_type.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_type.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_type.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->type = u_type.real; + offset += sizeof(this->type); + union { + int32_t real; + uint32_t base; + } u_action; + u_action.base = 0; + u_action.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_action.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_action.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_action.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->action = u_action.real; + offset += sizeof(this->action); + offset += this->position.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_scale; + u_scale.base = 0; + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->scale = u_scale.real; + offset += sizeof(this->scale); + offset += this->outline_color.deserialize(inbuffer + offset); + this->filled = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->filled); + offset += this->fill_color.deserialize(inbuffer + offset); + this->lifetime.sec = ((uint32_t) (*(inbuffer + offset))); + this->lifetime.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->lifetime.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->lifetime.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->lifetime.sec); + this->lifetime.nsec = ((uint32_t) (*(inbuffer + offset))); + this->lifetime.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->lifetime.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->lifetime.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->lifetime.nsec); + uint32_t points_lengthT = ((uint32_t) (*(inbuffer + offset))); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->points_length); + if(points_lengthT > points_length) + this->points = (geometry_msgs::Point*)realloc(this->points, points_lengthT * sizeof(geometry_msgs::Point)); + points_length = points_lengthT; + for( uint32_t i = 0; i < points_length; i++){ + offset += this->st_points.deserialize(inbuffer + offset); + memcpy( &(this->points[i]), &(this->st_points), sizeof(geometry_msgs::Point)); + } + uint32_t outline_colors_lengthT = ((uint32_t) (*(inbuffer + offset))); + outline_colors_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + outline_colors_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + outline_colors_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->outline_colors_length); + if(outline_colors_lengthT > outline_colors_length) + this->outline_colors = (std_msgs::ColorRGBA*)realloc(this->outline_colors, outline_colors_lengthT * sizeof(std_msgs::ColorRGBA)); + outline_colors_length = outline_colors_lengthT; + for( uint32_t i = 0; i < outline_colors_length; i++){ + offset += this->st_outline_colors.deserialize(inbuffer + offset); + memcpy( &(this->outline_colors[i]), &(this->st_outline_colors), sizeof(std_msgs::ColorRGBA)); + } + return offset; + } + + const char * getType(){ return "visualization_msgs/ImageMarker"; }; + const char * getMD5(){ return "1de93c67ec8858b831025a08fbf1b35c"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/visualization_msgs/InteractiveMarker.h b/source/ros-max-lib/ros_lib/visualization_msgs/InteractiveMarker.h new file mode 100644 index 0000000000000000000000000000000000000000..8752679cd6d2c7b442ddbca122f2c9cc28db0bb4 --- /dev/null +++ b/source/ros-max-lib/ros_lib/visualization_msgs/InteractiveMarker.h @@ -0,0 +1,160 @@ +#ifndef _ROS_visualization_msgs_InteractiveMarker_h +#define _ROS_visualization_msgs_InteractiveMarker_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" +#include "visualization_msgs/MenuEntry.h" +#include "visualization_msgs/InteractiveMarkerControl.h" + +namespace visualization_msgs +{ + + class InteractiveMarker : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + typedef const char* _name_type; + _name_type name; + typedef const char* _description_type; + _description_type description; + typedef float _scale_type; + _scale_type scale; + uint32_t menu_entries_length; + typedef visualization_msgs::MenuEntry _menu_entries_type; + _menu_entries_type st_menu_entries; + _menu_entries_type * menu_entries; + uint32_t controls_length; + typedef visualization_msgs::InteractiveMarkerControl _controls_type; + _controls_type st_controls; + _controls_type * controls; + + InteractiveMarker(): + header(), + pose(), + name(""), + description(""), + scale(0), + menu_entries_length(0), menu_entries(NULL), + controls_length(0), controls(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->pose.serialize(outbuffer + offset); + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + uint32_t length_description = strlen(this->description); + varToArr(outbuffer + offset, length_description); + offset += 4; + memcpy(outbuffer + offset, this->description, length_description); + offset += length_description; + union { + float real; + uint32_t base; + } u_scale; + u_scale.real = this->scale; + *(outbuffer + offset + 0) = (u_scale.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_scale.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_scale.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_scale.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->scale); + *(outbuffer + offset + 0) = (this->menu_entries_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->menu_entries_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->menu_entries_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->menu_entries_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->menu_entries_length); + for( uint32_t i = 0; i < menu_entries_length; i++){ + offset += this->menu_entries[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->controls_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->controls_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->controls_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->controls_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->controls_length); + for( uint32_t i = 0; i < controls_length; i++){ + offset += this->controls[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->pose.deserialize(inbuffer + offset); + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + uint32_t length_description; + arrToVar(length_description, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_description; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_description-1]=0; + this->description = (char *)(inbuffer + offset-1); + offset += length_description; + union { + float real; + uint32_t base; + } u_scale; + u_scale.base = 0; + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_scale.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->scale = u_scale.real; + offset += sizeof(this->scale); + uint32_t menu_entries_lengthT = ((uint32_t) (*(inbuffer + offset))); + menu_entries_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + menu_entries_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + menu_entries_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->menu_entries_length); + if(menu_entries_lengthT > menu_entries_length) + this->menu_entries = (visualization_msgs::MenuEntry*)realloc(this->menu_entries, menu_entries_lengthT * sizeof(visualization_msgs::MenuEntry)); + menu_entries_length = menu_entries_lengthT; + for( uint32_t i = 0; i < menu_entries_length; i++){ + offset += this->st_menu_entries.deserialize(inbuffer + offset); + memcpy( &(this->menu_entries[i]), &(this->st_menu_entries), sizeof(visualization_msgs::MenuEntry)); + } + uint32_t controls_lengthT = ((uint32_t) (*(inbuffer + offset))); + controls_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + controls_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + controls_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->controls_length); + if(controls_lengthT > controls_length) + this->controls = (visualization_msgs::InteractiveMarkerControl*)realloc(this->controls, controls_lengthT * sizeof(visualization_msgs::InteractiveMarkerControl)); + controls_length = controls_lengthT; + for( uint32_t i = 0; i < controls_length; i++){ + offset += this->st_controls.deserialize(inbuffer + offset); + memcpy( &(this->controls[i]), &(this->st_controls), sizeof(visualization_msgs::InteractiveMarkerControl)); + } + return offset; + } + + const char * getType(){ return "visualization_msgs/InteractiveMarker"; }; + const char * getMD5(){ return "dd86d22909d5a3364b384492e35c10af"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/visualization_msgs/InteractiveMarkerControl.h b/source/ros-max-lib/ros_lib/visualization_msgs/InteractiveMarkerControl.h new file mode 100644 index 0000000000000000000000000000000000000000..0c905ce8b58099aa61ba90120fe7ef3ee5d74ec1 --- /dev/null +++ b/source/ros-max-lib/ros_lib/visualization_msgs/InteractiveMarkerControl.h @@ -0,0 +1,167 @@ +#ifndef _ROS_visualization_msgs_InteractiveMarkerControl_h +#define _ROS_visualization_msgs_InteractiveMarkerControl_h + +#include +#include +#include +#include "ros/msg.h" +#include "geometry_msgs/Quaternion.h" +#include "visualization_msgs/Marker.h" + +namespace visualization_msgs +{ + + class InteractiveMarkerControl : public ros::Msg + { + public: + typedef const char* _name_type; + _name_type name; + typedef geometry_msgs::Quaternion _orientation_type; + _orientation_type orientation; + typedef uint8_t _orientation_mode_type; + _orientation_mode_type orientation_mode; + typedef uint8_t _interaction_mode_type; + _interaction_mode_type interaction_mode; + typedef bool _always_visible_type; + _always_visible_type always_visible; + uint32_t markers_length; + typedef visualization_msgs::Marker _markers_type; + _markers_type st_markers; + _markers_type * markers; + typedef bool _independent_marker_orientation_type; + _independent_marker_orientation_type independent_marker_orientation; + typedef const char* _description_type; + _description_type description; + enum { INHERIT = 0 }; + enum { FIXED = 1 }; + enum { VIEW_FACING = 2 }; + enum { NONE = 0 }; + enum { MENU = 1 }; + enum { BUTTON = 2 }; + enum { MOVE_AXIS = 3 }; + enum { MOVE_PLANE = 4 }; + enum { ROTATE_AXIS = 5 }; + enum { MOVE_ROTATE = 6 }; + enum { MOVE_3D = 7 }; + enum { ROTATE_3D = 8 }; + enum { MOVE_ROTATE_3D = 9 }; + + InteractiveMarkerControl(): + name(""), + orientation(), + orientation_mode(0), + interaction_mode(0), + always_visible(0), + markers_length(0), markers(NULL), + independent_marker_orientation(0), + description("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + offset += this->orientation.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->orientation_mode >> (8 * 0)) & 0xFF; + offset += sizeof(this->orientation_mode); + *(outbuffer + offset + 0) = (this->interaction_mode >> (8 * 0)) & 0xFF; + offset += sizeof(this->interaction_mode); + union { + bool real; + uint8_t base; + } u_always_visible; + u_always_visible.real = this->always_visible; + *(outbuffer + offset + 0) = (u_always_visible.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->always_visible); + *(outbuffer + offset + 0) = (this->markers_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->markers_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->markers_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->markers_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->markers_length); + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->markers[i].serialize(outbuffer + offset); + } + union { + bool real; + uint8_t base; + } u_independent_marker_orientation; + u_independent_marker_orientation.real = this->independent_marker_orientation; + *(outbuffer + offset + 0) = (u_independent_marker_orientation.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->independent_marker_orientation); + uint32_t length_description = strlen(this->description); + varToArr(outbuffer + offset, length_description); + offset += 4; + memcpy(outbuffer + offset, this->description, length_description); + offset += length_description; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + offset += this->orientation.deserialize(inbuffer + offset); + this->orientation_mode = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->orientation_mode); + this->interaction_mode = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->interaction_mode); + union { + bool real; + uint8_t base; + } u_always_visible; + u_always_visible.base = 0; + u_always_visible.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->always_visible = u_always_visible.real; + offset += sizeof(this->always_visible); + uint32_t markers_lengthT = ((uint32_t) (*(inbuffer + offset))); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->markers_length); + if(markers_lengthT > markers_length) + this->markers = (visualization_msgs::Marker*)realloc(this->markers, markers_lengthT * sizeof(visualization_msgs::Marker)); + markers_length = markers_lengthT; + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->st_markers.deserialize(inbuffer + offset); + memcpy( &(this->markers[i]), &(this->st_markers), sizeof(visualization_msgs::Marker)); + } + union { + bool real; + uint8_t base; + } u_independent_marker_orientation; + u_independent_marker_orientation.base = 0; + u_independent_marker_orientation.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->independent_marker_orientation = u_independent_marker_orientation.real; + offset += sizeof(this->independent_marker_orientation); + uint32_t length_description; + arrToVar(length_description, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_description; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_description-1]=0; + this->description = (char *)(inbuffer + offset-1); + offset += length_description; + return offset; + } + + const char * getType(){ return "visualization_msgs/InteractiveMarkerControl"; }; + const char * getMD5(){ return "b3c81e785788195d1840b86c28da1aac"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/visualization_msgs/InteractiveMarkerFeedback.h b/source/ros-max-lib/ros_lib/visualization_msgs/InteractiveMarkerFeedback.h new file mode 100644 index 0000000000000000000000000000000000000000..3d5cebb2127b1da33f980f20b39b2ea302d1812b --- /dev/null +++ b/source/ros-max-lib/ros_lib/visualization_msgs/InteractiveMarkerFeedback.h @@ -0,0 +1,151 @@ +#ifndef _ROS_visualization_msgs_InteractiveMarkerFeedback_h +#define _ROS_visualization_msgs_InteractiveMarkerFeedback_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Point.h" + +namespace visualization_msgs +{ + + class InteractiveMarkerFeedback : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _client_id_type; + _client_id_type client_id; + typedef const char* _marker_name_type; + _marker_name_type marker_name; + typedef const char* _control_name_type; + _control_name_type control_name; + typedef uint8_t _event_type_type; + _event_type_type event_type; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + typedef uint32_t _menu_entry_id_type; + _menu_entry_id_type menu_entry_id; + typedef geometry_msgs::Point _mouse_point_type; + _mouse_point_type mouse_point; + typedef bool _mouse_point_valid_type; + _mouse_point_valid_type mouse_point_valid; + enum { KEEP_ALIVE = 0 }; + enum { POSE_UPDATE = 1 }; + enum { MENU_SELECT = 2 }; + enum { BUTTON_CLICK = 3 }; + enum { MOUSE_DOWN = 4 }; + enum { MOUSE_UP = 5 }; + + InteractiveMarkerFeedback(): + header(), + client_id(""), + marker_name(""), + control_name(""), + event_type(0), + pose(), + menu_entry_id(0), + mouse_point(), + mouse_point_valid(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_client_id = strlen(this->client_id); + varToArr(outbuffer + offset, length_client_id); + offset += 4; + memcpy(outbuffer + offset, this->client_id, length_client_id); + offset += length_client_id; + uint32_t length_marker_name = strlen(this->marker_name); + varToArr(outbuffer + offset, length_marker_name); + offset += 4; + memcpy(outbuffer + offset, this->marker_name, length_marker_name); + offset += length_marker_name; + uint32_t length_control_name = strlen(this->control_name); + varToArr(outbuffer + offset, length_control_name); + offset += 4; + memcpy(outbuffer + offset, this->control_name, length_control_name); + offset += length_control_name; + *(outbuffer + offset + 0) = (this->event_type >> (8 * 0)) & 0xFF; + offset += sizeof(this->event_type); + offset += this->pose.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->menu_entry_id >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->menu_entry_id >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->menu_entry_id >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->menu_entry_id >> (8 * 3)) & 0xFF; + offset += sizeof(this->menu_entry_id); + offset += this->mouse_point.serialize(outbuffer + offset); + union { + bool real; + uint8_t base; + } u_mouse_point_valid; + u_mouse_point_valid.real = this->mouse_point_valid; + *(outbuffer + offset + 0) = (u_mouse_point_valid.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->mouse_point_valid); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_client_id; + arrToVar(length_client_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_client_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_client_id-1]=0; + this->client_id = (char *)(inbuffer + offset-1); + offset += length_client_id; + uint32_t length_marker_name; + arrToVar(length_marker_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_marker_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_marker_name-1]=0; + this->marker_name = (char *)(inbuffer + offset-1); + offset += length_marker_name; + uint32_t length_control_name; + arrToVar(length_control_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_control_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_control_name-1]=0; + this->control_name = (char *)(inbuffer + offset-1); + offset += length_control_name; + this->event_type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->event_type); + offset += this->pose.deserialize(inbuffer + offset); + this->menu_entry_id = ((uint32_t) (*(inbuffer + offset))); + this->menu_entry_id |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->menu_entry_id |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->menu_entry_id |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->menu_entry_id); + offset += this->mouse_point.deserialize(inbuffer + offset); + union { + bool real; + uint8_t base; + } u_mouse_point_valid; + u_mouse_point_valid.base = 0; + u_mouse_point_valid.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->mouse_point_valid = u_mouse_point_valid.real; + offset += sizeof(this->mouse_point_valid); + return offset; + } + + const char * getType(){ return "visualization_msgs/InteractiveMarkerFeedback"; }; + const char * getMD5(){ return "ab0f1eee058667e28c19ff3ffc3f4b78"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/visualization_msgs/InteractiveMarkerInit.h b/source/ros-max-lib/ros_lib/visualization_msgs/InteractiveMarkerInit.h new file mode 100644 index 0000000000000000000000000000000000000000..a6fb154a839647e1720fc14cee0500fc35a302c8 --- /dev/null +++ b/source/ros-max-lib/ros_lib/visualization_msgs/InteractiveMarkerInit.h @@ -0,0 +1,105 @@ +#ifndef _ROS_visualization_msgs_InteractiveMarkerInit_h +#define _ROS_visualization_msgs_InteractiveMarkerInit_h + +#include +#include +#include +#include "ros/msg.h" +#include "visualization_msgs/InteractiveMarker.h" + +namespace visualization_msgs +{ + + class InteractiveMarkerInit : public ros::Msg + { + public: + typedef const char* _server_id_type; + _server_id_type server_id; + typedef uint64_t _seq_num_type; + _seq_num_type seq_num; + uint32_t markers_length; + typedef visualization_msgs::InteractiveMarker _markers_type; + _markers_type st_markers; + _markers_type * markers; + + InteractiveMarkerInit(): + server_id(""), + seq_num(0), + markers_length(0), markers(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_server_id = strlen(this->server_id); + varToArr(outbuffer + offset, length_server_id); + offset += 4; + memcpy(outbuffer + offset, this->server_id, length_server_id); + offset += length_server_id; + union { + uint64_t real; + uint32_t base; + } u_seq_num; + u_seq_num.real = this->seq_num; + *(outbuffer + offset + 0) = (u_seq_num.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_seq_num.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_seq_num.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_seq_num.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->seq_num); + *(outbuffer + offset + 0) = (this->markers_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->markers_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->markers_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->markers_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->markers_length); + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->markers[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_server_id; + arrToVar(length_server_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_server_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_server_id-1]=0; + this->server_id = (char *)(inbuffer + offset-1); + offset += length_server_id; + union { + uint64_t real; + uint32_t base; + } u_seq_num; + u_seq_num.base = 0; + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->seq_num = u_seq_num.real; + offset += sizeof(this->seq_num); + uint32_t markers_lengthT = ((uint32_t) (*(inbuffer + offset))); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->markers_length); + if(markers_lengthT > markers_length) + this->markers = (visualization_msgs::InteractiveMarker*)realloc(this->markers, markers_lengthT * sizeof(visualization_msgs::InteractiveMarker)); + markers_length = markers_lengthT; + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->st_markers.deserialize(inbuffer + offset); + memcpy( &(this->markers[i]), &(this->st_markers), sizeof(visualization_msgs::InteractiveMarker)); + } + return offset; + } + + const char * getType(){ return "visualization_msgs/InteractiveMarkerInit"; }; + const char * getMD5(){ return "d5f2c5045a72456d228676ab91048734"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/visualization_msgs/InteractiveMarkerPose.h b/source/ros-max-lib/ros_lib/visualization_msgs/InteractiveMarkerPose.h new file mode 100644 index 0000000000000000000000000000000000000000..f46032af0cc48ba76797cfb5ba82538ec9c04893 --- /dev/null +++ b/source/ros-max-lib/ros_lib/visualization_msgs/InteractiveMarkerPose.h @@ -0,0 +1,67 @@ +#ifndef _ROS_visualization_msgs_InteractiveMarkerPose_h +#define _ROS_visualization_msgs_InteractiveMarkerPose_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" + +namespace visualization_msgs +{ + + class InteractiveMarkerPose : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + typedef const char* _name_type; + _name_type name; + + InteractiveMarkerPose(): + header(), + pose(), + name("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->pose.serialize(outbuffer + offset); + uint32_t length_name = strlen(this->name); + varToArr(outbuffer + offset, length_name); + offset += 4; + memcpy(outbuffer + offset, this->name, length_name); + offset += length_name; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->pose.deserialize(inbuffer + offset); + uint32_t length_name; + arrToVar(length_name, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_name-1]=0; + this->name = (char *)(inbuffer + offset-1); + offset += length_name; + return offset; + } + + const char * getType(){ return "visualization_msgs/InteractiveMarkerPose"; }; + const char * getMD5(){ return "a6e6833209a196a38d798dadb02c81f8"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/visualization_msgs/InteractiveMarkerUpdate.h b/source/ros-max-lib/ros_lib/visualization_msgs/InteractiveMarkerUpdate.h new file mode 100644 index 0000000000000000000000000000000000000000..8cea6ca12571ee5aa8223d0a5f29b4c0b3a2427b --- /dev/null +++ b/source/ros-max-lib/ros_lib/visualization_msgs/InteractiveMarkerUpdate.h @@ -0,0 +1,177 @@ +#ifndef _ROS_visualization_msgs_InteractiveMarkerUpdate_h +#define _ROS_visualization_msgs_InteractiveMarkerUpdate_h + +#include +#include +#include +#include "ros/msg.h" +#include "visualization_msgs/InteractiveMarker.h" +#include "visualization_msgs/InteractiveMarkerPose.h" + +namespace visualization_msgs +{ + + class InteractiveMarkerUpdate : public ros::Msg + { + public: + typedef const char* _server_id_type; + _server_id_type server_id; + typedef uint64_t _seq_num_type; + _seq_num_type seq_num; + typedef uint8_t _type_type; + _type_type type; + uint32_t markers_length; + typedef visualization_msgs::InteractiveMarker _markers_type; + _markers_type st_markers; + _markers_type * markers; + uint32_t poses_length; + typedef visualization_msgs::InteractiveMarkerPose _poses_type; + _poses_type st_poses; + _poses_type * poses; + uint32_t erases_length; + typedef char* _erases_type; + _erases_type st_erases; + _erases_type * erases; + enum { KEEP_ALIVE = 0 }; + enum { UPDATE = 1 }; + + InteractiveMarkerUpdate(): + server_id(""), + seq_num(0), + type(0), + markers_length(0), markers(NULL), + poses_length(0), poses(NULL), + erases_length(0), erases(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_server_id = strlen(this->server_id); + varToArr(outbuffer + offset, length_server_id); + offset += 4; + memcpy(outbuffer + offset, this->server_id, length_server_id); + offset += length_server_id; + union { + uint64_t real; + uint32_t base; + } u_seq_num; + u_seq_num.real = this->seq_num; + *(outbuffer + offset + 0) = (u_seq_num.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_seq_num.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_seq_num.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_seq_num.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->seq_num); + *(outbuffer + offset + 0) = (this->type >> (8 * 0)) & 0xFF; + offset += sizeof(this->type); + *(outbuffer + offset + 0) = (this->markers_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->markers_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->markers_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->markers_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->markers_length); + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->markers[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->poses_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->poses_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->poses_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->poses_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->poses_length); + for( uint32_t i = 0; i < poses_length; i++){ + offset += this->poses[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->erases_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->erases_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->erases_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->erases_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->erases_length); + for( uint32_t i = 0; i < erases_length; i++){ + uint32_t length_erasesi = strlen(this->erases[i]); + varToArr(outbuffer + offset, length_erasesi); + offset += 4; + memcpy(outbuffer + offset, this->erases[i], length_erasesi); + offset += length_erasesi; + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_server_id; + arrToVar(length_server_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_server_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_server_id-1]=0; + this->server_id = (char *)(inbuffer + offset-1); + offset += length_server_id; + union { + uint64_t real; + uint32_t base; + } u_seq_num; + u_seq_num.base = 0; + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_seq_num.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->seq_num = u_seq_num.real; + offset += sizeof(this->seq_num); + this->type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->type); + uint32_t markers_lengthT = ((uint32_t) (*(inbuffer + offset))); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->markers_length); + if(markers_lengthT > markers_length) + this->markers = (visualization_msgs::InteractiveMarker*)realloc(this->markers, markers_lengthT * sizeof(visualization_msgs::InteractiveMarker)); + markers_length = markers_lengthT; + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->st_markers.deserialize(inbuffer + offset); + memcpy( &(this->markers[i]), &(this->st_markers), sizeof(visualization_msgs::InteractiveMarker)); + } + uint32_t poses_lengthT = ((uint32_t) (*(inbuffer + offset))); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->poses_length); + if(poses_lengthT > poses_length) + this->poses = (visualization_msgs::InteractiveMarkerPose*)realloc(this->poses, poses_lengthT * sizeof(visualization_msgs::InteractiveMarkerPose)); + poses_length = poses_lengthT; + for( uint32_t i = 0; i < poses_length; i++){ + offset += this->st_poses.deserialize(inbuffer + offset); + memcpy( &(this->poses[i]), &(this->st_poses), sizeof(visualization_msgs::InteractiveMarkerPose)); + } + uint32_t erases_lengthT = ((uint32_t) (*(inbuffer + offset))); + erases_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + erases_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + erases_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->erases_length); + if(erases_lengthT > erases_length) + this->erases = (char**)realloc(this->erases, erases_lengthT * sizeof(char*)); + erases_length = erases_lengthT; + for( uint32_t i = 0; i < erases_length; i++){ + uint32_t length_st_erases; + arrToVar(length_st_erases, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_st_erases; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_st_erases-1]=0; + this->st_erases = (char *)(inbuffer + offset-1); + offset += length_st_erases; + memcpy( &(this->erases[i]), &(this->st_erases), sizeof(char*)); + } + return offset; + } + + const char * getType(){ return "visualization_msgs/InteractiveMarkerUpdate"; }; + const char * getMD5(){ return "710d308d0a9276d65945e92dd30b3946"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/visualization_msgs/Marker.h b/source/ros-max-lib/ros_lib/visualization_msgs/Marker.h new file mode 100644 index 0000000000000000000000000000000000000000..1c6e1b2e428b68127a82a9b8f1451bd100ad21d9 --- /dev/null +++ b/source/ros-max-lib/ros_lib/visualization_msgs/Marker.h @@ -0,0 +1,312 @@ +#ifndef _ROS_visualization_msgs_Marker_h +#define _ROS_visualization_msgs_Marker_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Vector3.h" +#include "std_msgs/ColorRGBA.h" +#include "ros/duration.h" +#include "geometry_msgs/Point.h" + +namespace visualization_msgs +{ + + class Marker : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _ns_type; + _ns_type ns; + typedef int32_t _id_type; + _id_type id; + typedef int32_t _type_type; + _type_type type; + typedef int32_t _action_type; + _action_type action; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + typedef geometry_msgs::Vector3 _scale_type; + _scale_type scale; + typedef std_msgs::ColorRGBA _color_type; + _color_type color; + typedef ros::Duration _lifetime_type; + _lifetime_type lifetime; + typedef bool _frame_locked_type; + _frame_locked_type frame_locked; + uint32_t points_length; + typedef geometry_msgs::Point _points_type; + _points_type st_points; + _points_type * points; + uint32_t colors_length; + typedef std_msgs::ColorRGBA _colors_type; + _colors_type st_colors; + _colors_type * colors; + typedef const char* _text_type; + _text_type text; + typedef const char* _mesh_resource_type; + _mesh_resource_type mesh_resource; + typedef bool _mesh_use_embedded_materials_type; + _mesh_use_embedded_materials_type mesh_use_embedded_materials; + enum { ARROW = 0 }; + enum { CUBE = 1 }; + enum { SPHERE = 2 }; + enum { CYLINDER = 3 }; + enum { LINE_STRIP = 4 }; + enum { LINE_LIST = 5 }; + enum { CUBE_LIST = 6 }; + enum { SPHERE_LIST = 7 }; + enum { POINTS = 8 }; + enum { TEXT_VIEW_FACING = 9 }; + enum { MESH_RESOURCE = 10 }; + enum { TRIANGLE_LIST = 11 }; + enum { ADD = 0 }; + enum { MODIFY = 0 }; + enum { DELETE = 2 }; + enum { DELETEALL = 3 }; + + Marker(): + header(), + ns(""), + id(0), + type(0), + action(0), + pose(), + scale(), + color(), + lifetime(), + frame_locked(0), + points_length(0), points(NULL), + colors_length(0), colors(NULL), + text(""), + mesh_resource(""), + mesh_use_embedded_materials(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_ns = strlen(this->ns); + varToArr(outbuffer + offset, length_ns); + offset += 4; + memcpy(outbuffer + offset, this->ns, length_ns); + offset += length_ns; + union { + int32_t real; + uint32_t base; + } u_id; + u_id.real = this->id; + *(outbuffer + offset + 0) = (u_id.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_id.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_id.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_id.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->id); + union { + int32_t real; + uint32_t base; + } u_type; + u_type.real = this->type; + *(outbuffer + offset + 0) = (u_type.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_type.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_type.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_type.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->type); + union { + int32_t real; + uint32_t base; + } u_action; + u_action.real = this->action; + *(outbuffer + offset + 0) = (u_action.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_action.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_action.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_action.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->action); + offset += this->pose.serialize(outbuffer + offset); + offset += this->scale.serialize(outbuffer + offset); + offset += this->color.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->lifetime.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->lifetime.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->lifetime.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->lifetime.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->lifetime.sec); + *(outbuffer + offset + 0) = (this->lifetime.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->lifetime.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->lifetime.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->lifetime.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->lifetime.nsec); + union { + bool real; + uint8_t base; + } u_frame_locked; + u_frame_locked.real = this->frame_locked; + *(outbuffer + offset + 0) = (u_frame_locked.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->frame_locked); + *(outbuffer + offset + 0) = (this->points_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->points_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->points_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->points_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->points_length); + for( uint32_t i = 0; i < points_length; i++){ + offset += this->points[i].serialize(outbuffer + offset); + } + *(outbuffer + offset + 0) = (this->colors_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->colors_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->colors_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->colors_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->colors_length); + for( uint32_t i = 0; i < colors_length; i++){ + offset += this->colors[i].serialize(outbuffer + offset); + } + uint32_t length_text = strlen(this->text); + varToArr(outbuffer + offset, length_text); + offset += 4; + memcpy(outbuffer + offset, this->text, length_text); + offset += length_text; + uint32_t length_mesh_resource = strlen(this->mesh_resource); + varToArr(outbuffer + offset, length_mesh_resource); + offset += 4; + memcpy(outbuffer + offset, this->mesh_resource, length_mesh_resource); + offset += length_mesh_resource; + union { + bool real; + uint8_t base; + } u_mesh_use_embedded_materials; + u_mesh_use_embedded_materials.real = this->mesh_use_embedded_materials; + *(outbuffer + offset + 0) = (u_mesh_use_embedded_materials.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->mesh_use_embedded_materials); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_ns; + arrToVar(length_ns, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_ns; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_ns-1]=0; + this->ns = (char *)(inbuffer + offset-1); + offset += length_ns; + union { + int32_t real; + uint32_t base; + } u_id; + u_id.base = 0; + u_id.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_id.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->id = u_id.real; + offset += sizeof(this->id); + union { + int32_t real; + uint32_t base; + } u_type; + u_type.base = 0; + u_type.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_type.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_type.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_type.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->type = u_type.real; + offset += sizeof(this->type); + union { + int32_t real; + uint32_t base; + } u_action; + u_action.base = 0; + u_action.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_action.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_action.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_action.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->action = u_action.real; + offset += sizeof(this->action); + offset += this->pose.deserialize(inbuffer + offset); + offset += this->scale.deserialize(inbuffer + offset); + offset += this->color.deserialize(inbuffer + offset); + this->lifetime.sec = ((uint32_t) (*(inbuffer + offset))); + this->lifetime.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->lifetime.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->lifetime.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->lifetime.sec); + this->lifetime.nsec = ((uint32_t) (*(inbuffer + offset))); + this->lifetime.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->lifetime.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->lifetime.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->lifetime.nsec); + union { + bool real; + uint8_t base; + } u_frame_locked; + u_frame_locked.base = 0; + u_frame_locked.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->frame_locked = u_frame_locked.real; + offset += sizeof(this->frame_locked); + uint32_t points_lengthT = ((uint32_t) (*(inbuffer + offset))); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->points_length); + if(points_lengthT > points_length) + this->points = (geometry_msgs::Point*)realloc(this->points, points_lengthT * sizeof(geometry_msgs::Point)); + points_length = points_lengthT; + for( uint32_t i = 0; i < points_length; i++){ + offset += this->st_points.deserialize(inbuffer + offset); + memcpy( &(this->points[i]), &(this->st_points), sizeof(geometry_msgs::Point)); + } + uint32_t colors_lengthT = ((uint32_t) (*(inbuffer + offset))); + colors_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + colors_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + colors_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->colors_length); + if(colors_lengthT > colors_length) + this->colors = (std_msgs::ColorRGBA*)realloc(this->colors, colors_lengthT * sizeof(std_msgs::ColorRGBA)); + colors_length = colors_lengthT; + for( uint32_t i = 0; i < colors_length; i++){ + offset += this->st_colors.deserialize(inbuffer + offset); + memcpy( &(this->colors[i]), &(this->st_colors), sizeof(std_msgs::ColorRGBA)); + } + uint32_t length_text; + arrToVar(length_text, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_text; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_text-1]=0; + this->text = (char *)(inbuffer + offset-1); + offset += length_text; + uint32_t length_mesh_resource; + arrToVar(length_mesh_resource, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_mesh_resource; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_mesh_resource-1]=0; + this->mesh_resource = (char *)(inbuffer + offset-1); + offset += length_mesh_resource; + union { + bool real; + uint8_t base; + } u_mesh_use_embedded_materials; + u_mesh_use_embedded_materials.base = 0; + u_mesh_use_embedded_materials.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->mesh_use_embedded_materials = u_mesh_use_embedded_materials.real; + offset += sizeof(this->mesh_use_embedded_materials); + return offset; + } + + const char * getType(){ return "visualization_msgs/Marker"; }; + const char * getMD5(){ return "4048c9de2a16f4ae8e0538085ebf1b97"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/visualization_msgs/MarkerArray.h b/source/ros-max-lib/ros_lib/visualization_msgs/MarkerArray.h new file mode 100644 index 0000000000000000000000000000000000000000..20d1fce0a6bdd2f3889266d860c1a04834641ff3 --- /dev/null +++ b/source/ros-max-lib/ros_lib/visualization_msgs/MarkerArray.h @@ -0,0 +1,64 @@ +#ifndef _ROS_visualization_msgs_MarkerArray_h +#define _ROS_visualization_msgs_MarkerArray_h + +#include +#include +#include +#include "ros/msg.h" +#include "visualization_msgs/Marker.h" + +namespace visualization_msgs +{ + + class MarkerArray : public ros::Msg + { + public: + uint32_t markers_length; + typedef visualization_msgs::Marker _markers_type; + _markers_type st_markers; + _markers_type * markers; + + MarkerArray(): + markers_length(0), markers(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->markers_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->markers_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->markers_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->markers_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->markers_length); + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->markers[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t markers_lengthT = ((uint32_t) (*(inbuffer + offset))); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + markers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->markers_length); + if(markers_lengthT > markers_length) + this->markers = (visualization_msgs::Marker*)realloc(this->markers, markers_lengthT * sizeof(visualization_msgs::Marker)); + markers_length = markers_lengthT; + for( uint32_t i = 0; i < markers_length; i++){ + offset += this->st_markers.deserialize(inbuffer + offset); + memcpy( &(this->markers[i]), &(this->st_markers), sizeof(visualization_msgs::Marker)); + } + return offset; + } + + const char * getType(){ return "visualization_msgs/MarkerArray"; }; + const char * getMD5(){ return "d155b9ce5188fbaf89745847fd5882d7"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/visualization_msgs/MenuEntry.h b/source/ros-max-lib/ros_lib/visualization_msgs/MenuEntry.h new file mode 100644 index 0000000000000000000000000000000000000000..c7b6c2393ac3e1c78fab27caf77ba8fef349a712 --- /dev/null +++ b/source/ros-max-lib/ros_lib/visualization_msgs/MenuEntry.h @@ -0,0 +1,108 @@ +#ifndef _ROS_visualization_msgs_MenuEntry_h +#define _ROS_visualization_msgs_MenuEntry_h + +#include +#include +#include +#include "ros/msg.h" + +namespace visualization_msgs +{ + + class MenuEntry : public ros::Msg + { + public: + typedef uint32_t _id_type; + _id_type id; + typedef uint32_t _parent_id_type; + _parent_id_type parent_id; + typedef const char* _title_type; + _title_type title; + typedef const char* _command_type; + _command_type command; + typedef uint8_t _command_type_type; + _command_type_type command_type; + enum { FEEDBACK = 0 }; + enum { ROSRUN = 1 }; + enum { ROSLAUNCH = 2 }; + + MenuEntry(): + id(0), + parent_id(0), + title(""), + command(""), + command_type(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->id >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->id >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->id >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->id >> (8 * 3)) & 0xFF; + offset += sizeof(this->id); + *(outbuffer + offset + 0) = (this->parent_id >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->parent_id >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->parent_id >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->parent_id >> (8 * 3)) & 0xFF; + offset += sizeof(this->parent_id); + uint32_t length_title = strlen(this->title); + varToArr(outbuffer + offset, length_title); + offset += 4; + memcpy(outbuffer + offset, this->title, length_title); + offset += length_title; + uint32_t length_command = strlen(this->command); + varToArr(outbuffer + offset, length_command); + offset += 4; + memcpy(outbuffer + offset, this->command, length_command); + offset += length_command; + *(outbuffer + offset + 0) = (this->command_type >> (8 * 0)) & 0xFF; + offset += sizeof(this->command_type); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + this->id = ((uint32_t) (*(inbuffer + offset))); + this->id |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->id |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->id |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->id); + this->parent_id = ((uint32_t) (*(inbuffer + offset))); + this->parent_id |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->parent_id |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->parent_id |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->parent_id); + uint32_t length_title; + arrToVar(length_title, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_title; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_title-1]=0; + this->title = (char *)(inbuffer + offset-1); + offset += length_title; + uint32_t length_command; + arrToVar(length_command, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_command; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_command-1]=0; + this->command = (char *)(inbuffer + offset-1); + offset += length_command; + this->command_type = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->command_type); + return offset; + } + + const char * getType(){ return "visualization_msgs/MenuEntry"; }; + const char * getMD5(){ return "b90ec63024573de83b57aa93eb39be2d"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/wfov_camera_msgs/WFOVCompressedImage.h b/source/ros-max-lib/ros_lib/wfov_camera_msgs/WFOVCompressedImage.h new file mode 100644 index 0000000000000000000000000000000000000000..c6b05bc4138b685c531db1569b99420d5f777eab --- /dev/null +++ b/source/ros-max-lib/ros_lib/wfov_camera_msgs/WFOVCompressedImage.h @@ -0,0 +1,169 @@ +#ifndef _ROS_wfov_camera_msgs_WFOVCompressedImage_h +#define _ROS_wfov_camera_msgs_WFOVCompressedImage_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/CompressedImage.h" +#include "sensor_msgs/CameraInfo.h" +#include "geometry_msgs/TransformStamped.h" + +namespace wfov_camera_msgs +{ + + class WFOVCompressedImage : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _time_reference_type; + _time_reference_type time_reference; + typedef sensor_msgs::CompressedImage _image_type; + _image_type image; + typedef sensor_msgs::CameraInfo _info_type; + _info_type info; + typedef float _shutter_type; + _shutter_type shutter; + typedef float _gain_type; + _gain_type gain; + typedef uint16_t _white_balance_blue_type; + _white_balance_blue_type white_balance_blue; + typedef uint16_t _white_balance_red_type; + _white_balance_red_type white_balance_red; + typedef float _temperature_type; + _temperature_type temperature; + typedef geometry_msgs::TransformStamped _worldToCamera_type; + _worldToCamera_type worldToCamera; + + WFOVCompressedImage(): + header(), + time_reference(""), + image(), + info(), + shutter(0), + gain(0), + white_balance_blue(0), + white_balance_red(0), + temperature(0), + worldToCamera() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_time_reference = strlen(this->time_reference); + varToArr(outbuffer + offset, length_time_reference); + offset += 4; + memcpy(outbuffer + offset, this->time_reference, length_time_reference); + offset += length_time_reference; + offset += this->image.serialize(outbuffer + offset); + offset += this->info.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_shutter; + u_shutter.real = this->shutter; + *(outbuffer + offset + 0) = (u_shutter.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_shutter.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_shutter.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_shutter.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->shutter); + union { + float real; + uint32_t base; + } u_gain; + u_gain.real = this->gain; + *(outbuffer + offset + 0) = (u_gain.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_gain.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_gain.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_gain.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->gain); + *(outbuffer + offset + 0) = (this->white_balance_blue >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->white_balance_blue >> (8 * 1)) & 0xFF; + offset += sizeof(this->white_balance_blue); + *(outbuffer + offset + 0) = (this->white_balance_red >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->white_balance_red >> (8 * 1)) & 0xFF; + offset += sizeof(this->white_balance_red); + union { + float real; + uint32_t base; + } u_temperature; + u_temperature.real = this->temperature; + *(outbuffer + offset + 0) = (u_temperature.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_temperature.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_temperature.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_temperature.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->temperature); + offset += this->worldToCamera.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_time_reference; + arrToVar(length_time_reference, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_time_reference; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_time_reference-1]=0; + this->time_reference = (char *)(inbuffer + offset-1); + offset += length_time_reference; + offset += this->image.deserialize(inbuffer + offset); + offset += this->info.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_shutter; + u_shutter.base = 0; + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->shutter = u_shutter.real; + offset += sizeof(this->shutter); + union { + float real; + uint32_t base; + } u_gain; + u_gain.base = 0; + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->gain = u_gain.real; + offset += sizeof(this->gain); + this->white_balance_blue = ((uint16_t) (*(inbuffer + offset))); + this->white_balance_blue |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->white_balance_blue); + this->white_balance_red = ((uint16_t) (*(inbuffer + offset))); + this->white_balance_red |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->white_balance_red); + union { + float real; + uint32_t base; + } u_temperature; + u_temperature.base = 0; + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->temperature = u_temperature.real; + offset += sizeof(this->temperature); + offset += this->worldToCamera.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "wfov_camera_msgs/WFOVCompressedImage"; }; + const char * getMD5(){ return "5b0f85e79ffccd27dc377911c83e026f"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/wfov_camera_msgs/WFOVImage.h b/source/ros-max-lib/ros_lib/wfov_camera_msgs/WFOVImage.h new file mode 100644 index 0000000000000000000000000000000000000000..6ce4f0e281911555b7ca8e2e4128860d4bbef069 --- /dev/null +++ b/source/ros-max-lib/ros_lib/wfov_camera_msgs/WFOVImage.h @@ -0,0 +1,163 @@ +#ifndef _ROS_wfov_camera_msgs_WFOVImage_h +#define _ROS_wfov_camera_msgs_WFOVImage_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "sensor_msgs/Image.h" +#include "sensor_msgs/CameraInfo.h" + +namespace wfov_camera_msgs +{ + + class WFOVImage : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _time_reference_type; + _time_reference_type time_reference; + typedef sensor_msgs::Image _image_type; + _image_type image; + typedef sensor_msgs::CameraInfo _info_type; + _info_type info; + typedef float _shutter_type; + _shutter_type shutter; + typedef float _gain_type; + _gain_type gain; + typedef uint16_t _white_balance_blue_type; + _white_balance_blue_type white_balance_blue; + typedef uint16_t _white_balance_red_type; + _white_balance_red_type white_balance_red; + typedef float _temperature_type; + _temperature_type temperature; + + WFOVImage(): + header(), + time_reference(""), + image(), + info(), + shutter(0), + gain(0), + white_balance_blue(0), + white_balance_red(0), + temperature(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_time_reference = strlen(this->time_reference); + varToArr(outbuffer + offset, length_time_reference); + offset += 4; + memcpy(outbuffer + offset, this->time_reference, length_time_reference); + offset += length_time_reference; + offset += this->image.serialize(outbuffer + offset); + offset += this->info.serialize(outbuffer + offset); + union { + float real; + uint32_t base; + } u_shutter; + u_shutter.real = this->shutter; + *(outbuffer + offset + 0) = (u_shutter.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_shutter.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_shutter.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_shutter.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->shutter); + union { + float real; + uint32_t base; + } u_gain; + u_gain.real = this->gain; + *(outbuffer + offset + 0) = (u_gain.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_gain.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_gain.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_gain.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->gain); + *(outbuffer + offset + 0) = (this->white_balance_blue >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->white_balance_blue >> (8 * 1)) & 0xFF; + offset += sizeof(this->white_balance_blue); + *(outbuffer + offset + 0) = (this->white_balance_red >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->white_balance_red >> (8 * 1)) & 0xFF; + offset += sizeof(this->white_balance_red); + union { + float real; + uint32_t base; + } u_temperature; + u_temperature.real = this->temperature; + *(outbuffer + offset + 0) = (u_temperature.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_temperature.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_temperature.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_temperature.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->temperature); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_time_reference; + arrToVar(length_time_reference, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_time_reference; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_time_reference-1]=0; + this->time_reference = (char *)(inbuffer + offset-1); + offset += length_time_reference; + offset += this->image.deserialize(inbuffer + offset); + offset += this->info.deserialize(inbuffer + offset); + union { + float real; + uint32_t base; + } u_shutter; + u_shutter.base = 0; + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_shutter.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->shutter = u_shutter.real; + offset += sizeof(this->shutter); + union { + float real; + uint32_t base; + } u_gain; + u_gain.base = 0; + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_gain.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->gain = u_gain.real; + offset += sizeof(this->gain); + this->white_balance_blue = ((uint16_t) (*(inbuffer + offset))); + this->white_balance_blue |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->white_balance_blue); + this->white_balance_red = ((uint16_t) (*(inbuffer + offset))); + this->white_balance_red |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); + offset += sizeof(this->white_balance_red); + union { + float real; + uint32_t base; + } u_temperature; + u_temperature.base = 0; + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_temperature.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->temperature = u_temperature.real; + offset += sizeof(this->temperature); + return offset; + } + + const char * getType(){ return "wfov_camera_msgs/WFOVImage"; }; + const char * getMD5(){ return "807d0db423ab5e1561cfeba09a10bc88"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/ros_lib/wfov_camera_msgs/WFOVTrigger.h b/source/ros-max-lib/ros_lib/wfov_camera_msgs/WFOVTrigger.h new file mode 100644 index 0000000000000000000000000000000000000000..67b0d0f1ce5902acabb7f458639d06a3b700d7d5 --- /dev/null +++ b/source/ros-max-lib/ros_lib/wfov_camera_msgs/WFOVTrigger.h @@ -0,0 +1,141 @@ +#ifndef _ROS_wfov_camera_msgs_WFOVTrigger_h +#define _ROS_wfov_camera_msgs_WFOVTrigger_h + +#include +#include +#include +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "ros/time.h" + +namespace wfov_camera_msgs +{ + + class WFOVTrigger : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _time_reference_type; + _time_reference_type time_reference; + typedef ros::Time _trigger_time_type; + _trigger_time_type trigger_time; + typedef const char* _trigger_time_reference_type; + _trigger_time_reference_type trigger_time_reference; + typedef uint32_t _shutter_type; + _shutter_type shutter; + typedef uint32_t _id_type; + _id_type id; + typedef uint32_t _trigger_seq_type; + _trigger_seq_type trigger_seq; + + WFOVTrigger(): + header(), + time_reference(""), + trigger_time(), + trigger_time_reference(""), + shutter(0), + id(0), + trigger_seq(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_time_reference = strlen(this->time_reference); + varToArr(outbuffer + offset, length_time_reference); + offset += 4; + memcpy(outbuffer + offset, this->time_reference, length_time_reference); + offset += length_time_reference; + *(outbuffer + offset + 0) = (this->trigger_time.sec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->trigger_time.sec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->trigger_time.sec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->trigger_time.sec >> (8 * 3)) & 0xFF; + offset += sizeof(this->trigger_time.sec); + *(outbuffer + offset + 0) = (this->trigger_time.nsec >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->trigger_time.nsec >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->trigger_time.nsec >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->trigger_time.nsec >> (8 * 3)) & 0xFF; + offset += sizeof(this->trigger_time.nsec); + uint32_t length_trigger_time_reference = strlen(this->trigger_time_reference); + varToArr(outbuffer + offset, length_trigger_time_reference); + offset += 4; + memcpy(outbuffer + offset, this->trigger_time_reference, length_trigger_time_reference); + offset += length_trigger_time_reference; + *(outbuffer + offset + 0) = (this->shutter >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->shutter >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->shutter >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->shutter >> (8 * 3)) & 0xFF; + offset += sizeof(this->shutter); + *(outbuffer + offset + 0) = (this->id >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->id >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->id >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->id >> (8 * 3)) & 0xFF; + offset += sizeof(this->id); + *(outbuffer + offset + 0) = (this->trigger_seq >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->trigger_seq >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->trigger_seq >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->trigger_seq >> (8 * 3)) & 0xFF; + offset += sizeof(this->trigger_seq); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_time_reference; + arrToVar(length_time_reference, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_time_reference; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_time_reference-1]=0; + this->time_reference = (char *)(inbuffer + offset-1); + offset += length_time_reference; + this->trigger_time.sec = ((uint32_t) (*(inbuffer + offset))); + this->trigger_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->trigger_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->trigger_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->trigger_time.sec); + this->trigger_time.nsec = ((uint32_t) (*(inbuffer + offset))); + this->trigger_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->trigger_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->trigger_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->trigger_time.nsec); + uint32_t length_trigger_time_reference; + arrToVar(length_trigger_time_reference, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_trigger_time_reference; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_trigger_time_reference-1]=0; + this->trigger_time_reference = (char *)(inbuffer + offset-1); + offset += length_trigger_time_reference; + this->shutter = ((uint32_t) (*(inbuffer + offset))); + this->shutter |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->shutter |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->shutter |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->shutter); + this->id = ((uint32_t) (*(inbuffer + offset))); + this->id |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->id |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->id |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->id); + this->trigger_seq = ((uint32_t) (*(inbuffer + offset))); + this->trigger_seq |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + this->trigger_seq |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + this->trigger_seq |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->trigger_seq); + return offset; + } + + const char * getType(){ return "wfov_camera_msgs/WFOVTrigger"; }; + const char * getMD5(){ return "e38c040150f1be3148468f6b9974f8bf"; }; + + }; + +} +#endif \ No newline at end of file diff --git a/source/ros-max-lib/wrapper.cpp b/source/ros-max-lib/wrapper.cpp new file mode 100644 index 0000000000000000000000000000000000000000..26761ebaf9e6f5c8a83abccaf25f8a8f70ca5934 --- /dev/null +++ b/source/ros-max-lib/wrapper.cpp @@ -0,0 +1,537 @@ +// © Copyright The University of New South Wales 2018 +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. + +#include "wrapper.h" +#include +#include "ros_lib/ros.h" +#include "ros_lib/ros/subscriber.h" +#include "ros_lib/std_msgs/String.h" +#include "ros_lib/geometry_msgs/Twist.h" +#include "ros_lib/nav_msgs/Odometry.h" +#include "ros_lib/sensor_msgs/LaserScan.h" +#include "ros_lib/sensor_msgs/Imu.h" +#include "ros_lib/turtlebot3_msgs/SensorState.h" +#include "ros_lib/sensor_msgs/JointState.h" +#include "ros_lib/tf/tfMessage.h" + +extern "C" { + + // ROS Message + std_msgs::String str_msg; + geometry_msgs::Twist twist_msg; + + // GUI callback function + void (*twist_callback)(void*, const void*, int i); + void (*odometry_callback)(void*, const void*, int i); + void (*imu_callback)(void*, const void*, int i); + void (*laser_callback)(void*, const void*, int i); + void (*joints_callback)(void*, const void*, int i); + void (*sensors_callback)(void*, const void*, int i); + void (*tf_callback)(void*, const void*, int i); + + void *gui_obj; + int twist_order; + int odometry_order; + int laser_order; + int imu_order; + int sensors_order; + int joints_order; + int tf_order; + + // Ros Node + ros::NodeHandle nh; + + // ROS Publishers + ros::Publisher pub_twist("/cmd_vel", &twist_msg); + ros::Publisher pub_chatter("chatter", &str_msg); + + // ROS Subscribers + // turn (geometry_msgs::Twist) into (**void) - c_wrapper + void twistCb(const geometry_msgs::Twist& received_msg) { + (*twist_callback)(gui_obj, &received_msg, twist_order); + } + void odometryCb(const nav_msgs::Odometry& received_msg) { + (*odometry_callback)(gui_obj, &received_msg, odometry_order); + } + void laserCb(const sensor_msgs::LaserScan& received_msg) { + (*laser_callback)(gui_obj, &received_msg, laser_order); + } + void imuCb(const sensor_msgs::Imu& received_msg) { + (*imu_callback)(gui_obj, &received_msg, imu_order); + } + void sensorsCb(const turtlebot3_msgs::SensorState& received_msg) { + (*sensors_callback)(gui_obj, &received_msg, sensors_order); + } + void jointsCb(const sensor_msgs::JointState& received_msg) { + (*joints_callback)(gui_obj, &received_msg, joints_order); + } + void tfCb(const tf::tfMessage& received_msg) { + (*tf_callback)(gui_obj, &received_msg, tf_order); + } + ros::Subscriber subTwist("/cmd_vel_rc100", twistCb); + ros::Subscriber subOdometry("/odom", odometryCb); + ros::Subscriber subLaser("/scan", laserCb); + ros::Subscriber subImu("/imu", imuCb); + ros::Subscriber subSensors("/sensor_state", sensorsCb); + ros::Subscriber subJoints("/joint_states", jointsCb); + ros::Subscriber subTf("/tf", tfCb); + + double *twistMsg_floats(const void *msg_) { + const geometry_msgs::Twist *msg = (geometry_msgs::Twist*)msg_; + double *data = (double *)malloc(6*sizeof(double)); + data[0] = msg->linear.x; + data[1] = msg->linear.y; + data[2] = msg->linear.z; + data[3] = msg->angular.x; + data[4] = msg->angular.y; + data[5] = msg->angular.z; + return data; + } + + unsigned *odometryMsg_header_ints(const void *msg_) { + const nav_msgs::Odometry *msg = (nav_msgs::Odometry*)msg_; + unsigned *data = (unsigned *)malloc(3*sizeof(unsigned)); + data[0] = msg->header.seq; + data[1] = msg->header.stamp.sec; + data[2] = msg->header.stamp.nsec; + return data; + } + + char *odometryMsg_header_frame(const void *msg_) { + const nav_msgs::Odometry *msg = (nav_msgs::Odometry*)msg_; + char *data = (char *)malloc(strlen(msg->header.frame_id)); + sprintf(data, "%s", msg->header.frame_id); + return data; + } + + char *odometryMsg_childframe(const void *msg_) { + const nav_msgs::Odometry *msg = (nav_msgs::Odometry*)msg_; + char *data = (char *)malloc(strlen(msg->child_frame_id)); + sprintf(data, "%s", msg->child_frame_id); + return data; + } + + double *odometryMsg_floats(const void *msg_) { + const nav_msgs::Odometry *msg = (nav_msgs::Odometry*)msg_; + double *data = (double *)malloc(85*sizeof(double)); + int i=0; + data[i++] = msg->pose.pose.position.x; + data[i++] = msg->pose.pose.position.y; + data[i++] = msg->pose.pose.position.z; + data[i++] = msg->pose.pose.orientation.x; + data[i++] = msg->pose.pose.orientation.y; + data[i++] = msg->pose.pose.orientation.z; + data[i++] = msg->pose.pose.orientation.w; + for(int j=0; j<36; ++j) + data[i++] = msg->pose.covariance[j]; + data[i++] = msg->twist.twist.linear.x; + data[i++] = msg->twist.twist.linear.y; + data[i++] = msg->twist.twist.linear.z; + data[i++] = msg->twist.twist.angular.x; + data[i++] = msg->twist.twist.angular.y; + data[i++] = msg->twist.twist.angular.z; + for(int j=0; j<36; ++j) + data[i++] = msg->twist.covariance[j]; + return data; + } + + unsigned *imuMsg_header_ints(const void *msg_) { + const sensor_msgs::Imu *msg = (sensor_msgs::Imu*)msg_; + unsigned *data = (unsigned *)malloc(3*sizeof(unsigned)); + data[0] = msg->header.seq; + data[1] = msg->header.stamp.sec; + data[2] = msg->header.stamp.nsec; + return data; + } + + char *imuMsg_header_frame(const void *msg_) { + const sensor_msgs::Imu *msg = (sensor_msgs::Imu*)msg_; + char *data = (char *)malloc(strlen(msg->header.frame_id)); + sprintf(data, "%s", msg->header.frame_id); + return data; + } + + double *imuMsg_floats(const void *msg_) { + const sensor_msgs::Imu *msg = (sensor_msgs::Imu*)msg_; + double *data = (double *)malloc(37*sizeof(double)); + int i=0; + data[i++] = msg->orientation.x; + data[i++] = msg->orientation.y; + data[i++] = msg->orientation.z; + data[i++] = msg->orientation.w; + for(int j=0; j<9; ++j) + data[i++] = msg->orientation_covariance[j]; + data[i++] = msg->angular_velocity.x; + data[i++] = msg->angular_velocity.y; + data[i++] = msg->angular_velocity.z; + for(int j=0; j<9; ++j) + data[i++] = msg->angular_velocity_covariance[j]; + data[i++] = msg->linear_acceleration.x; + data[i++] = msg->linear_acceleration.y; + data[i++] = msg->linear_acceleration.z; + for(int j=0; j<9; ++j) + data[i++] = msg->linear_acceleration_covariance[j]; + return data; + } + + char *laserMsg_header_frame(const void *msg_) { + const sensor_msgs::LaserScan *msg = (sensor_msgs::LaserScan*)msg_; + char *data = (char *)malloc(strlen(msg->header.frame_id)); + sprintf(data, "%s", msg->header.frame_id); + return data; + } + + double *laserMsg_floats(const void *msg_) { + const sensor_msgs::LaserScan *msg = (sensor_msgs::LaserScan*)msg_; + int range_length = msg->ranges_length; + int intensities_length = msg->intensities_length; + int num_total = 7 + range_length + intensities_length; + double *data = (double *)malloc(num_total*sizeof(double)); + data[0] = msg->angle_min; + data[1] = msg->angle_max; + data[2] = msg->angle_increment; + data[3] = msg->time_increment; + data[4] = msg->scan_time; + data[5] = msg->range_min ; + data[6] = msg->range_max ; + int i = 7; + data[i] = NULL; + for(int j=0; jranges[j]; + data[i] = NULL; + for(int j=0; jintensities[j]; + return data; + } + + unsigned *laserMsg_header_ints(const void *msg_) { + const sensor_msgs::LaserScan *msg = (sensor_msgs::LaserScan*)msg_; + unsigned *data = (unsigned *)malloc(3*sizeof(unsigned)); + data[0] = msg->header.seq; + data[1] = msg->header.stamp.sec; + data[2] = msg->header.stamp.nsec; + return data; + } + + int laser_ranges_length(const void *msg_) { + const sensor_msgs::LaserScan *msg = (sensor_msgs::LaserScan*)msg_; + return msg->ranges_length; + } + int laser_intensities_length(const void *msg_) { + const sensor_msgs::LaserScan *msg = (sensor_msgs::LaserScan*)msg_; + return msg->intensities_length; + } + + unsigned *jointsMsg_header_ints(const void *msg_) { + const sensor_msgs::JointState *msg = (sensor_msgs::JointState*)msg_; + unsigned *data = (unsigned *)malloc(3*sizeof(unsigned)); + data[0] = msg->header.seq; + data[1] = msg->header.stamp.sec; + data[2] = msg->header.stamp.nsec; + return data; + } + + char *jointsMsg_header_frame(const void *msg_) { + const sensor_msgs::JointState *msg = (sensor_msgs::JointState*)msg_; + char *data = (char *)malloc(strlen(msg->header.frame_id)); + sprintf(data, "%s", msg->header.frame_id); + return data; + } + + int jointsMsg_length(const void *msg_) { + const sensor_msgs::JointState *msg = (sensor_msgs::JointState*)msg_; + return msg->name_length; + } + + char **jointsMsg_names(const void *msg_) { + const sensor_msgs::JointState *msg = (sensor_msgs::JointState*)msg_; + int length = msg->name_length; + + char **data = (char**)malloc(length*sizeof(char*)); + for(int i=0; i<3; ++i) { + data[i] = (char*)malloc(sizeof(msg->name[i])); + sprintf(data[i], "%s", msg->name[i]); + } + return data; + } + + double *jointsMsg_floats(const void *msg_) { + const sensor_msgs::JointState *msg = (sensor_msgs::JointState*)msg_; + int length = msg->name_length; + int num_total = 3 * length; + double *data = (double *)malloc(num_total*sizeof(double)); + for(int i=0; iposition[i]; + int count = length; + for(int i=0; ivelocity[i]; + count = 2*length; + for(int i=0; ieffort[i]; + return data; + } + + unsigned *sensorsMsg_ints(const void *msg_) { + const turtlebot3_msgs::SensorState *msg = (turtlebot3_msgs::SensorState*)msg_; + unsigned *data = (unsigned *)malloc(7*sizeof(unsigned)); + data[0] = msg->stamp.sec; + data[1] = msg->stamp.nsec; + data[2] = msg->bumper; + data[3] = msg->cliff; + data[4] = msg->button; + data[5] = msg->left_encoder; + data[6] = msg->right_encoder; + return data; + + /* ROSSERIAL MESSAGE IMPLEMENTATION: + ros::Time stamp; // sec, nsec + uint8_t bumper; + uint8_t cliff; + uint8_t button; + uint8_t left_encoder; + uint8_t right_encoder; + float battery; + */ + } + + double sensorsMsg_float(const void *msg_) { + const turtlebot3_msgs::SensorState *msg = (turtlebot3_msgs::SensorState*)msg_; + return msg->battery; + } + + unsigned *tfMsg_header_ints(const void *msg_) { + const tf::tfMessage *msg = (tf::tfMessage*)msg_; + unsigned *data = (unsigned *)malloc(3*sizeof(unsigned)); + data[0] = msg->transforms[0].header.seq; + data[1] = msg->transforms[0].header.stamp.sec; + data[2] = msg->transforms[0].header.stamp.nsec; + return data; + } + + char *tfMsg_header_frame(const void *msg_) { + const tf::tfMessage *msg = (tf::tfMessage*)msg_; + char *data = (char *)malloc(strlen(msg->transforms[0].header.frame_id)); + sprintf(data, "%s", msg->transforms[0].header.frame_id); + return data; + } + + char *tfMsg_childframe(const void *msg_) { + const tf::tfMessage *msg = (tf::tfMessage*)msg_; + char *data = (char *)malloc(strlen(msg->transforms[0].child_frame_id)); + sprintf(data, "%s", msg->transforms[0].child_frame_id); + return data; + } + + double *tfMsg_floats(const void *msg_) { + const tf::tfMessage *msg = (tf::tfMessage*)msg_; + double *data = (double *)malloc(7*sizeof(double)); + int i=0; + data[i++] = msg->transforms[0].transform.translation.x; + data[i++] = msg->transforms[0].transform.translation.y; + data[i++] = msg->transforms[0].transform.translation.z; + data[i++] = msg->transforms[0].transform.rotation.x; + data[i++] = msg->transforms[0].transform.rotation.y; + data[i++] = msg->transforms[0].transform.rotation.z; + data[i++] = msg->transforms[0].transform.rotation.w; + return data; + } + + // ROS Communication + int ros_init(char *rosSrvrIp) { + if(isValidIpAddress(rosSrvrIp) == false) { + return -1; + } + //nh.initNode(); + nh.initNode(rosSrvrIp); + return 0; + } + + void ros_advertise_chatter() { + nh.advertise(pub_chatter); + sleep(1); + } + + int ros_advertise_twist() { + nh.advertise(pub_twist); + sleep(1); + return 0; + } + + void ros_publish_chatter(const void *msg) { + + if(msg == NULL) return; + + str_msg.data = (char*)msg; + pub_chatter.publish( &str_msg ); + nh.spinOnce(); + } + + int ros_publish_twist(const double out_msg[6]) { + + twist_msg.linear.x = out_msg[0]; + twist_msg.linear.y = out_msg[1]; + twist_msg.linear.z = out_msg[2]; + + twist_msg.angular.x = out_msg[3]; + twist_msg.angular.y = out_msg[4]; + twist_msg.angular.z = out_msg[5]; + + pub_twist.publish( &twist_msg ); + nh.spinOnce(); + return 0; + } + + + void ros_subscribe_chatter(void *obj, void (*f)(void*, void**) ) { + } + + void ros_subscribe_twist(void *obj, void (*f)(void*, const void*, int), int index) { + twist_callback = f; + gui_obj = obj; + twist_order = index; + nh.subscribe(subTwist); + } + + void ros_subscribe_odometry(void *obj, void (*f)(void*, const void*, int), int index) { + odometry_callback = f; + gui_obj = obj; + odometry_order = index; + nh.subscribe(subOdometry); + } + + void ros_subscribe_laser(void *obj, void (*f)(void*, const void*, int), int index) { + laser_callback = f; + gui_obj = obj; + laser_order = index; + nh.subscribe(subLaser); + } + + void ros_subscribe_imu(void *obj, void (*f)(void*, const void*, int), int index) { + imu_callback = f; + gui_obj = obj; + imu_order = index; + nh.subscribe(subImu); + } + + void ros_subscribe_joints(void *obj, void (*f)(void*, const void*, int), int index) { + joints_callback = f; + gui_obj = obj; + joints_order = index; + nh.subscribe(subJoints); + } + + void ros_subscribe_sensors(void *obj, void (*f)(void*, const void*, int), int index) { + sensors_callback = f; + gui_obj = obj; + sensors_order = index; + nh.subscribe(subSensors); + } + + void ros_subscribe_tf(void *obj, void (*f)(void*, const void*, int), int index) { + tf_callback = f; + gui_obj = obj; + tf_order = index; + nh.subscribe(subTf); + } + + void ros_listen(void *data) { + while(1) { + nh.spinOnce(); + sleep(1); + } + } + + int isValidIpAddress(char *ipAddress) { + struct sockaddr_in sa; + return inet_pton(AF_INET, ipAddress, &(sa.sin_addr)); + } + + +} + +/* + double twistMsg_get_linera_x(const void *msg) { + const geometry_msgs::Twist *t_msg = (const geometry_msgs::Twist*)msg; + return t_msg->linear.x; + } + + double twistMsg_get_linera_y(const void *msg) { + const geometry_msgs::Twist *t_msg = (const geometry_msgs::Twist*)msg; + return t_msg->linear.x; + } + double twistMsg_get_linera_z(const void *msg) { + const geometry_msgs::Twist *t_msg = (const geometry_msgs::Twist*)msg; + return t_msg->linear.x; + } + + double twistMsg_get_angular_x(const void *msg) { + const geometry_msgs::Twist *t_msg = (const geometry_msgs::Twist*)msg; + return t_msg->linear.x; + } + + double twistMsg_get_angular_y(const void *msg) { + const geometry_msgs::Twist *t_msg = (const geometry_msgs::Twist*)msg; + return t_msg->linear.x; + } + + double twistMsg_get_angular_z(const void *msg) { + const geometry_msgs::Twist *t_msg = (const geometry_msgs::Twist*)msg; + return t_msg->linear.x; + } + +} + +const double* twistMsgToC(const geometry_msgs::Twist& received_msg) { + double *msg; + msg = (double*)malloc(6*sizeof(double)); + msg[0] = received_msg.linear.x; + msg[1] = received_msg.linear.y; + msg[2] = received_msg.linear.z; + msg[3] = received_msg.angular.x; + msg[4] = received_msg.angular.y; + msg[5] = received_msg.angular.z; + return msg; +} + + +const double** twistMsgToC(const geometry_msgs::Twist& received_msg) { + const double **msg; + msg = (const double**)malloc(6*sizeof(const double*)); + msg[0] = &(received_msg.linear.x); + msg[1] = &(received_msg.linear.y); + msg[2] = &(received_msg.linear.z); + msg[3] = &(received_msg.angular.x); + msg[4] = &(received_msg.angular.y); + msg[5] = &(received_msg.angular.z); + return msg;//(const void**)msg; +} + + + ros::Subscriber_ *sub; + void msgCb(const geometry_msgs::Twist& received_msg) { + + // turn (geometry_msgs::Twist) into (**void) - c_wrapper + // turn (**void) into (t_atom*) and output + const void** twist_msg = (const void**)twistMsgToC(received_msg); + (*gui_callback)(gui_obj, twist_msg, out_order); + } + + // turn (geometry_msgs::Twist) into (**void) - c_wrapper + void twistCb1(const geometry_msgs::Twist& received_msg) { + const void** twist_msg = (const void**)twistMsgToC(received_msg); + (*gui_callback)(gui_obj, twist_msg, out_order); + } + +*/ diff --git a/source/ros-max-lib/wrapper.h b/source/ros-max-lib/wrapper.h new file mode 100644 index 0000000000000000000000000000000000000000..fbb65818c0cfa8411a1545d9e1c102776159fac7 --- /dev/null +++ b/source/ros-max-lib/wrapper.h @@ -0,0 +1,114 @@ +// © Copyright The University of New South Wales 2018 +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. + +#ifndef wrapper_h +#define wrapper_h + +#ifdef __cplusplus + +#include "ros_lib/geometry_msgs/Twist.h" +#include "ros_lib/nav_msgs/Odometry.h" + + + +//using namespace geometry_msgs; +const double* twistMsgToC(const geometry_msgs::Twist& received_msg); + +extern "C" { +#endif + + // init ROS Node + int ros_init(char *rosSrvrIp); + + // Publisher (output) + void ros_advertise_chatter(); + int ros_advertise_twist(); + void ros_publish_chatter(const void *msg); + int ros_publish_twist(const double out_msg[6]); + + // Subscriber (input) + void ros_subscribe_twist(void *obj, void (*f)(void*, const void*, int), int index); + void ros_subscribe_odometry(void *obj, void (*f)(void*, const void*, int), int index); + void ros_subscribe_laser(void *obj, void (*f)(void*, const void*, int), int index); + void ros_subscribe_imu(void *obj, void (*f)(void*, const void*, int), int index); + void ros_subscribe_sensors(void *obj, void (*f)(void*, const void*, int), int index); + void ros_subscribe_joints(void *obj, void (*f)(void*, const void*, int), int index); + void ros_subscribe_tf(void *obj, void (*f)(void*, const void*, int), int index) ; + + void ros_listen(void *data); + + int isValidIpAddress(char *ipAddress); + + + double *twistMsg_floats(const void *msg); + + unsigned *laserMsg_header_ints(const void *msg); + char *laserMsg_header_frame(const void *msg); + double *laserMsg_floats(const void *msg); + int laser_ranges_length(const void *msg); + int laser_intensities_length(const void *msg); + + unsigned *odometryMsg_header_ints(const void *msg); + char *odometryMsg_header_frame(const void *msg); + char *odometryMsg_childframe(const void *msg); + double *odometryMsg_floats(const void *msg); + + unsigned *imuMsg_header_ints(const void *msg); + char *imuMsg_header_frame(const void *msg); + double *imuMsg_floats(const void *msg); + + unsigned *jointsMsg_header_ints(const void *msg); + char *jointsMsg_header_frame(const void *msg); + int jointsMsg_length(const void *msg); + char **jointsMsg_names(const void *msg); + double *jointsMsg_floats(const void *msg); + + unsigned *sensorsMsg_ints(const void *msg); + double sensorsMsg_float(const void *msg); + + unsigned *tfMsg_header_ints(const void *msg); + char *tfMsg_header_frame(const void *msg); + char *tfMsg_childframe(const void *msg); + double *tfMsg_floats(const void *msg); + + + typedef struct { + char* frame_id; + unsigned *header[2];//3 + char* child_frame_id; + double *pose[2];//7 + double *poseCovariance[2];//36 + double *twist[2]; //2 + double *twistCovariance[2];//36 + } msg_odometry; + + typedef struct { + double *twist[2]; //2 + } msg_velocity2; + + double twistMsg_get_linera_x(const void *msg); + double twistMsg_get_linera_y(const void *msg); + double twistMsg_get_linera_z(const void *msg); + double twistMsg_get_angular_x(const void *msg); + double twistMsg_get_angular_y(const void *msg); + double twistMsg_get_angular_z(const void *msg); + + +#ifdef __cplusplus +} +#endif + + +#endif /* wrapper_h */