Skip to content

Commit

Permalink
Merge pull request #76 from giangalv/giangalv-patch-1
Browse files Browse the repository at this point in the history
Update go2_driver_node.py
  • Loading branch information
abizovnuralem committed Sep 6, 2024
2 parents 3d553bc + b1eb438 commit 8e04afd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions go2_robot_sdk/go2_robot_sdk/go2_driver_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ def timer_callback_lidar(self):
self.publish_lidar_webrtc()

def cmd_vel_cb(self, msg, robot_num):

x = msg.linear.x
y = msg.linear.y
z = msg.angular.z

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

Expand Down

0 comments on commit 8e04afd

Please sign in to comment.