Skip to content

Commit

Permalink
Merge pull request #314 from StanfordVL/ap-fix
Browse files Browse the repository at this point in the history
Fix bugs on og-develop
  • Loading branch information
wensi-ai authored Nov 5, 2023
2 parents a24576d + 71a783e commit 1eb91d5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion omnigibson/controllers/ik_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,10 @@ def _command_to_control(self, command, control_dict):
target_joint_pos = self.solver.solve(
target_pos=target_pos,
target_quat=target_quat,
current_joint_pos=current_joint_pos,
tolerance_pos=m.IK_POS_TOLERANCE,
weight_pos=m.IK_POS_WEIGHT,
max_iterations=m.IK_MAX_ITERATIONS,
initial_joint_pos=current_joint_pos,
)
else:
target_joint_pos = self.solver.solve(
Expand Down
1 change: 1 addition & 0 deletions omnigibson/examples/environments/behavior_env_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

# Make sure object states are enabled
gm.ENABLE_OBJECT_STATES = True
gm.USE_GPU_DYNAMICS = True


def main(random_selection=False, headless=False, short_exec=False):
Expand Down
7 changes: 5 additions & 2 deletions omnigibson/objects/light_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ def radius(self):
Returns:
float: radius for this light
"""
return self._light_link.get_attribute("radius")
return self._light_link.get_attribute(
"inputs:radius" if meets_minimum_isaac_version("2023.0.0") else "radius")

@radius.setter
def radius(self, radius):
Expand All @@ -171,7 +172,9 @@ def radius(self, radius):
Args:
radius (float): radius to set
"""
self._light_link.set_attribute("radius", radius)
self._light_link.set_attribute(
"inputs:radius" if meets_minimum_isaac_version("2023.0.0") else "radius",
radius)

@property
def intensity(self):
Expand Down
4 changes: 2 additions & 2 deletions omnigibson/utils/control_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ def solve(
Args:
target_pos (3-array): desired (x,y,z) local target cartesian position in robot's base coordinate frame
target_quat (4-array or None): If specified, desired (x,y,z,w) local target quaternion orientation in
robot's base coordinate frame. If None, IK will be position-only (will override settings such that
orientation's tolerance is very high and weight is 0)
robot's base coordinate frame. If None, IK will be position-only (will override settings such that
orientation's tolerance is very high and weight is 0)
tolerance_pos (float): Maximum position error (L2-norm) for a successful IK solution
tolerance_quat (float): Maximum orientation error (per-axis L2-norm) for a successful IK solution
weight_pos (float): Weight for the relative importance of position error during CCD
Expand Down

0 comments on commit 1eb91d5

Please sign in to comment.