Skip to content

Commit

Permalink
sanity check virtual joints of HolonomicBaseRobot
Browse files Browse the repository at this point in the history
  • Loading branch information
ChengshuLi committed Sep 17, 2024
1 parent 778e51b commit 142ad86
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions omnigibson/robots/holonomic_base_robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,13 @@ def _post_load(self):
def _initialize(self):
super()._initialize()

# Set the max velocity for the base joints
self.joints["base_footprint_x_joint"].max_velocity = m.MAX_LINEAR_VELOCITY
self.joints["base_footprint_y_joint"].max_velocity = m.MAX_LINEAR_VELOCITY
self.joints["base_footprint_z_joint"].max_velocity = m.MAX_LINEAR_VELOCITY
self.joints["base_footprint_rx_joint"].max_velocity = m.MAX_ANGULAR_VELOCITY
self.joints["base_footprint_ry_joint"].max_velocity = m.MAX_ANGULAR_VELOCITY
self.joints["base_footprint_rz_joint"].max_velocity = m.MAX_ANGULAR_VELOCITY
for i, component in enumerate(["x", "y", "z", "rx", "ry", "rz"]):
joint_name = f"base_footprint_{component}_joint"
assert joint_name in self.joints, f"Missing base joint: {joint_name}"
if i < 3:
self.joints[joint_name].max_velocity = m.MAX_LINEAR_VELOCITY
else:
self.joints[joint_name].max_velocity = m.MAX_ANGULAR_VELOCITY

# Force the recomputation of this cached property
del self.control_limits
Expand Down

0 comments on commit 142ad86

Please sign in to comment.