Project

General

Profile

Statistics
| Branch: | Revision:

root / joy / migration_rules / .svn / text-base / Joy.bmr.svn-base @ ba6306a1

History | View | Annotate | Download (1.31 KB)

1
class update_joy_Joy_e3ef016fcdf22397038b36036c66f7c8(MessageUpdateRule):
2
	old_type = "joy/Joy"
3
	old_full_text = """
4
float32[] axes
5
int32[] buttons
6
"""
7

    
8
	new_type = "sensor_msgs/Joy"
9
	new_full_text = """
10
# Reports the state of a joysticks axes and buttons.
11
Header header           # timestamp in the header is the time the data is received from the joystick
12
float32[] axes          # the axes measurements from a joystick
13
int32[] buttons         # the buttons measurements from a joystick 
14

    
15
================================================================================
16
MSG: std_msgs/Header
17
# Standard metadata for higher-level stamped data types.
18
# This is generally used to communicate timestamped data 
19
# in a particular coordinate frame.
20
# 
21
# sequence ID: consecutively increasing ID 
22
uint32 seq
23
#Two-integer timestamp that is expressed as:
24
# * stamp.secs: seconds (stamp_secs) since epoch
25
# * stamp.nsecs: nanoseconds since stamp_secs
26
# time-handling sugar is provided by the client library
27
time stamp
28
#Frame this data is associated with
29
# 0: no frame
30
# 1: global frame
31
string frame_id
32
"""
33

    
34
	order = 0
35
	migrated_types = []
36

    
37
	valid = True
38

    
39
	def update(self, old_msg, new_msg):
40
		#No matching field name in old message
41
		new_msg.header = self.get_new_class('Header')()
42
		new_msg.axes = old_msg.axes
43
		new_msg.buttons = old_msg.buttons