-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmulti_robot_datatype.py
112 lines (99 loc) · 2.52 KB
/
multi_robot_datatype.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
from pycdr2 import IdlStruct
from dataclasses import dataclass
from pycdr2.types import int8, int32, uint32, uint8, float64, float32, sequence, array
from typing import List
@dataclass
class Time(IdlStruct, typename="Time"):
sec: uint32
nsec: uint32
@dataclass
class Header(IdlStruct, typename="Header"):
stamp: Time
frame_id: str
@dataclass
class JointStates(IdlStruct, typename="JointStates"):
stamp_sec: uint32
stamp_nsec: uint32
frame_id: str
name: List[str]
position: List[float64]
velocity: List[float64]
effort: List[float64]
@dataclass
class BatteryState(IdlStruct, typename="BatteryState"):
stamp_sec: uint32
stamp_nsec: uint32
frame_id: str
voltage: float32
temperature: float32
current: float32
charge: float32
capacity: float32
design_capacity: float32
percentage: float32
power_supply_status: uint8
power_supply_health: uint8
power_supply_technology: uint8
present: bool
# cell_voltage: List[float32]
# cell_temperature: List[float32]
# location: str
# serial_number: str
@dataclass
class OverViewState(IdlStruct, typename="OverViewState"):
battery_voltage: List[float32]
battery_capacity: List[float32]
battery_percentage: List[float32]
joint_name: List[List[str]]
joint_velocity: List[List[float64]]
@dataclass
class UWBState(IdlStruct, typename="UWBState"):
position_x: float64
position_y: float64
tag_id: int32
@dataclass
class PoseStamped(IdlStruct, typename="PoseStemped"):
stamp_sec: uint32
stamp_nsec: uint32
frame_id: str
point_x: float64
point_y: float64
point_z: float64
quat_x: float64
quat_y: float64
quat_z: float64
quat_w: float64
@dataclass
class Vector3(IdlStruct, typename="Vector3"):
x: float64
y: float64
z: float64
@dataclass
class Twist(IdlStruct, typename="Twist"):
linear: Vector3
angular: Vector3
@dataclass
class Joy(IdlStruct, typename="Joy"):
stamp_sec: uint32
stamp_nsec: uint32
frame_id: str
axes: List[float32]
buttons: List[int32]
@dataclass
class LaserScan(IdlStruct, typename="LaserScan"):
stamp_sec: uint32
stamp_nsec: uint32
frame_id: str
angle_min: float32
angle_max: float32
angle_increment: float32
time_increment: float32
scan_time: float32
range_min: float32
range_max: float32
ranges: List[float32]
intensities: List[float32]
@dataclass
class DriveStatus(IdlStruct, typename="DriveStatus"):
drive_status : int8
message : str