Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: rosserial_mbed_lib mbed Servo
geometry_msgs/Twist.h@0:06fc856e99ca, 2011-08-19 (annotated)
- Committer:
- nucho
- Date:
- Fri Aug 19 09:06:16 2011 +0000
- Revision:
- 0:06fc856e99ca
- Child:
- 1:098e75fd5ad2
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| nucho | 0:06fc856e99ca | 1 | #ifndef ros_Twist_h |
| nucho | 0:06fc856e99ca | 2 | #define ros_Twist_h |
| nucho | 0:06fc856e99ca | 3 | |
| nucho | 0:06fc856e99ca | 4 | #include <stdint.h> |
| nucho | 0:06fc856e99ca | 5 | #include <string.h> |
| nucho | 0:06fc856e99ca | 6 | #include <stdlib.h> |
| nucho | 0:06fc856e99ca | 7 | #include "../ros/msg.h" |
| nucho | 0:06fc856e99ca | 8 | #include "geometry_msgs/Vector3.h" |
| nucho | 0:06fc856e99ca | 9 | |
| nucho | 0:06fc856e99ca | 10 | namespace geometry_msgs |
| nucho | 0:06fc856e99ca | 11 | { |
| nucho | 0:06fc856e99ca | 12 | |
| nucho | 0:06fc856e99ca | 13 | class Twist : public ros::Msg |
| nucho | 0:06fc856e99ca | 14 | { |
| nucho | 0:06fc856e99ca | 15 | public: |
| nucho | 0:06fc856e99ca | 16 | geometry_msgs::Vector3 linear; |
| nucho | 0:06fc856e99ca | 17 | geometry_msgs::Vector3 angular; |
| nucho | 0:06fc856e99ca | 18 | |
| nucho | 0:06fc856e99ca | 19 | virtual int serialize(unsigned char *outbuffer) |
| nucho | 0:06fc856e99ca | 20 | { |
| nucho | 0:06fc856e99ca | 21 | int offset = 0; |
| nucho | 0:06fc856e99ca | 22 | offset += this->linear.serialize(outbuffer + offset); |
| nucho | 0:06fc856e99ca | 23 | offset += this->angular.serialize(outbuffer + offset); |
| nucho | 0:06fc856e99ca | 24 | return offset; |
| nucho | 0:06fc856e99ca | 25 | } |
| nucho | 0:06fc856e99ca | 26 | |
| nucho | 0:06fc856e99ca | 27 | virtual int deserialize(unsigned char *inbuffer) |
| nucho | 0:06fc856e99ca | 28 | { |
| nucho | 0:06fc856e99ca | 29 | int offset = 0; |
| nucho | 0:06fc856e99ca | 30 | offset += this->linear.deserialize(inbuffer + offset); |
| nucho | 0:06fc856e99ca | 31 | offset += this->angular.deserialize(inbuffer + offset); |
| nucho | 0:06fc856e99ca | 32 | return offset; |
| nucho | 0:06fc856e99ca | 33 | } |
| nucho | 0:06fc856e99ca | 34 | |
| nucho | 0:06fc856e99ca | 35 | virtual const char * getType(){ return "geometry_msgs/Twist"; }; |
| nucho | 0:06fc856e99ca | 36 | |
| nucho | 0:06fc856e99ca | 37 | }; |
| nucho | 0:06fc856e99ca | 38 | |
| nucho | 0:06fc856e99ca | 39 | } |
| nucho | 0:06fc856e99ca | 40 | #endif |