haixuantao commited on
Commit
6ca4d16
·
1 Parent(s): f250bab
graphs/out/018e2f30-0e19-7e80-9a3d-367dfd51d513/audio.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ebca29caaf9b31a5b0020ee65813ae10bc35ce747296a63bea1fc441bddcc7fc
3
+ size 1072271
graphs/out/018e2f30-0e19-7e80-9a3d-367dfd51d513/bbox.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c74de00b789415af3d6d63a2eef064c44abc690b8d1fe04f826075c1d2153232
3
+ size 1313937
graphs/out/018e2f30-0e19-7e80-9a3d-367dfd51d513/chatgpt_output_file.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:25c5133673ea8668d22e162401de943e8f85cb598beb68fcab5dbcc571275ebb
3
+ size 57108
graphs/out/018e2f30-0e19-7e80-9a3d-367dfd51d513/control.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:672305a7b8f41191496bcd6b813ae7282ad44d99b45a4b44b09b8591da750cd2
3
+ size 104745
graphs/out/018e2f30-0e19-7e80-9a3d-367dfd51d513/gimbal_control.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9fd4ecec74cc7c6ddbbfca3c0b7c3eda4327d9d524f0dfd617f5ea252516f524
3
+ size 246080
graphs/out/018e2f30-0e19-7e80-9a3d-367dfd51d513/image.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e338dcdf20f3943da09f9e759eab519d607e2dd6929b85058733340f62ac0f14
3
+ size 2079418828
graphs/out/018e2f30-0e19-7e80-9a3d-367dfd51d513/mistral_output_file.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7005d202a4869f2f98c8267154dbb6779795815431fe198931372f113fd5951c
3
+ size 25494
graphs/out/018e2f30-0e19-7e80-9a3d-367dfd51d513/position.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6275e33fc62872c53cfd11d07d84f4ccf7e1aeda7c457877cda078d5ddd7ba91
3
+ size 12610
graphs/out/018e2f30-0e19-7e80-9a3d-367dfd51d513/raw_file.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e2b9ae8a636b4b240cddc74c2cddc6378d1ea3fda7f10ec39b47e8ad92e9f6a0
3
+ size 21246
graphs/out/018e2f30-0e19-7e80-9a3d-367dfd51d513/saved_file.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7a03620bae0c3e37a5216ba41dcf1fa63039d5f91ef4237ba97983aaca11d7e3
3
+ size 22195
graphs/out/018e2f30-0e19-7e80-9a3d-367dfd51d513/whisper_text.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:713f938151374148d5958d28769ba56812aafc27711aed8cb5d945b037026d2d
3
+ size 3360
operators/planning_op.py CHANGED
@@ -27,6 +27,7 @@ class Operator:
27
  def __init__(self):
28
  self.bboxs = []
29
  self.time = time.time()
 
30
 
31
  def on_event(
32
  self,
@@ -43,16 +44,21 @@ class Operator:
43
 
44
  elif dora_event["id"] == "position":
45
  [x, y, z, gimbal_pitch, gimbal_yaw] = dora_event["value"].to_numpy()
46
-
47
  direction = np.clip(
48
- np.array(GOAL_OBJECTIVES) - np.array([x, y, z]), -1, 1
49
  )
50
 
51
- send_output(
52
- "control",
53
- pa.array([direction[0], direction[1], 0, SPEED, 0]),
54
- dora_event["metadata"],
55
- )
 
 
 
 
 
56
 
57
  send_output(
58
  "gimbal_control",
 
27
  def __init__(self):
28
  self.bboxs = []
29
  self.time = time.time()
30
+ self.position = [0, 0, 0]
31
 
32
  def on_event(
33
  self,
 
44
 
45
  elif dora_event["id"] == "position":
46
  [x, y, z, gimbal_pitch, gimbal_yaw] = dora_event["value"].to_numpy()
47
+ self.position = [x, y, z]
48
  direction = np.clip(
49
+ np.array(GOAL_OBJECTIVES) - np.array(self.position), -1, 1
50
  )
51
 
52
+ if any(abs(direction) > 0.1):
53
+ x = direction[0]
54
+ y = direction[1]
55
+ z = direction[2]
56
+
57
+ send_output(
58
+ "control",
59
+ pa.array([x, y, 0, SPEED, 0]),
60
+ dora_event["metadata"],
61
+ )
62
 
63
  send_output(
64
  "gimbal_control",
operators/robot.py CHANGED
@@ -27,6 +27,8 @@ class Operator:
27
  self.position = [0, 0, 0]
28
  self.gimbal_position = [0, 0]
29
  self.event = None
 
 
30
 
31
  def on_event(
32
  self,
@@ -48,7 +50,6 @@ class Operator:
48
  and not (self.event._event.isSet() and self.event.is_completed)
49
  ):
50
  [x, y, z, xy_speed, z_speed] = dora_event["value"].to_numpy()
51
- print(f"received control: {x, y, z, xy_speed, z_speed}", flush=True)
52
  self.event = self.ep_robot.chassis.move(
53
  x=x, y=y, z=z, xy_speed=xy_speed, z_speed=z_speed
54
  )
@@ -72,28 +73,30 @@ class Operator:
72
  gimbal_yaw_speed,
73
  ] = dora_event["value"].to_numpy()
74
 
75
- self.event = self.ep_robot.gimbal.moveto(
76
- pitch=gimbal_pitch,
77
- yaw=gimbal_yaw,
78
- pitch_speed=gimbal_pitch_speed,
79
- yaw_speed=gimbal_yaw_speed,
80
- )
81
- self.gimbal_position[0] = gimbal_pitch
82
- self.gimbal_position[1] = gimbal_yaw
 
83
 
84
  elif dora_event["id"] == "blaster":
85
  [brightness] = dora_event["value"].to_numpy()
86
- if brightness > 0:
87
  self.ep_robot.blaster.set_led(
88
  brightness=brightness, effect=blaster.LED_ON
89
  )
90
- else:
91
- self.ep_robot.blaster.set_led(brightness=0, effect=blaster.LED_OFF)
92
  elif dora_event["id"] == "led":
93
- print("received led", flush=True)
94
  [r, g, b] = dora_event["value"].to_numpy()
95
- self.ep_robot.led.set_led(
96
- comp=led.COMP_ALL, r=r, g=g, b=b, effect=led.EFFECT_ON
97
- )
 
 
 
98
 
99
  return DoraStatus.CONTINUE
 
27
  self.position = [0, 0, 0]
28
  self.gimbal_position = [0, 0]
29
  self.event = None
30
+ self.brightness = 0
31
+ self.rgb = [0, 0, 0]
32
 
33
  def on_event(
34
  self,
 
50
  and not (self.event._event.isSet() and self.event.is_completed)
51
  ):
52
  [x, y, z, xy_speed, z_speed] = dora_event["value"].to_numpy()
 
53
  self.event = self.ep_robot.chassis.move(
54
  x=x, y=y, z=z, xy_speed=xy_speed, z_speed=z_speed
55
  )
 
73
  gimbal_yaw_speed,
74
  ] = dora_event["value"].to_numpy()
75
 
76
+ if self.gimbal_position != [gimbal_pitch, gimbal_yaw]:
77
+ self.event = self.ep_robot.gimbal.moveto(
78
+ pitch=gimbal_pitch,
79
+ yaw=gimbal_yaw,
80
+ pitch_speed=gimbal_pitch_speed,
81
+ yaw_speed=gimbal_yaw_speed,
82
+ )
83
+ self.gimbal_position[0] = gimbal_pitch
84
+ self.gimbal_position[1] = gimbal_yaw
85
 
86
  elif dora_event["id"] == "blaster":
87
  [brightness] = dora_event["value"].to_numpy()
88
+ if brightness != self.brightness:
89
  self.ep_robot.blaster.set_led(
90
  brightness=brightness, effect=blaster.LED_ON
91
  )
92
+ self.brightness = brightness
 
93
  elif dora_event["id"] == "led":
 
94
  [r, g, b] = dora_event["value"].to_numpy()
95
+ rgb = [r, g, b]
96
+ if rgb != self.rgb:
97
+ self.ep_robot.led.set_led(
98
+ comp=led.COMP_ALL, r=r, g=g, b=b, effect=led.EFFECT_ON
99
+ )
100
+ self.rgb = rgb
101
 
102
  return DoraStatus.CONTINUE