Skip to content

Commit 8e04afd

Browse files
Merge pull request #76 from giangalv/giangalv-patch-1
Update go2_driver_node.py
2 parents 3d553bc + b1eb438 commit 8e04afd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

go2_robot_sdk/go2_robot_sdk/go2_driver_node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,12 @@ def timer_callback_lidar(self):
178178
self.publish_lidar_webrtc()
179179

180180
def cmd_vel_cb(self, msg, robot_num):
181-
182181
x = msg.linear.x
183182
y = msg.linear.y
184183
z = msg.angular.z
185184

186-
if x > 0.0 or y > 0.0 or z != 0.0:
185+
# Allow omni-directional movement
186+
if x != 0.0 or y != 0.0 or z != 0.0:
187187
self.robot_cmd_vel[robot_num] = gen_mov_command(
188188
round(x, 2), round(y, 2), round(z, 2))
189189

0 commit comments

Comments
 (0)