File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
terrain_navigation_ros/scripts Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -33,11 +33,27 @@ def __init__(self):
33
33
def global_position_cb (self , msg ):
34
34
35
35
pos_msg = GlobalPosition ()
36
+ # header
36
37
pos_msg .header = msg .header
37
38
pos_msg .header .frame_id = "map"
39
+ # coordinate frame and type mask
40
+ pos_msg .coordinate_frame = msg .coordinate_frame
41
+ pos_msg .type_mask = msg .type_mask
42
+ # geodetic position (datum AMSL)
38
43
pos_msg .latitude = msg .latitude
39
44
pos_msg .longitude = msg .longitude
40
45
pos_msg .altitude = msg .altitude
46
+ # velocity
47
+ pos_msg .velocity .linear .x = msg .velocity .x
48
+ pos_msg .velocity .linear .y = msg .velocity .y
49
+ pos_msg .velocity .linear .z = msg .velocity .z
50
+ # acceleration or force
51
+ pos_msg .acceleration_or_force .linear .x = msg .acceleration_or_force .x
52
+ pos_msg .acceleration_or_force .linear .y = msg .acceleration_or_force .y
53
+ pos_msg .acceleration_or_force .linear .z = msg .acceleration_or_force .z
54
+ # yaw rate
55
+ pos_msg .velocity .angular .z = msg .yaw_rate
56
+ # TODO: yaw (no corresponding member in GlobalPosition)
41
57
42
58
self .pub .publish (pos_msg )
43
59
You can’t perform that action at this time.
0 commit comments