OmniGibson
OmniGibson copied to clipboard
Camera orientation mismatch in scaling robot size
I'm trying to import "fetch" into one of the scenes, and because the robot's size is relatively too big, I want to rescale it to avoid possible collisions. However, it looks like the camera orientation cannot be set correctly.
File "/omnigibson-src/omnigibson/prims/xform_prim.py", line 141, in _set_xform_properties
assert np.allclose(new_position, current_position, atol=1e-4) and np.allclose(r1, r2, atol=1e-4), \
AssertionError: /World/robot0/eyes/Camera: old_pos: [1.67729348e-01 5.24871461e-17 1.04592872e+00], new_pos: [1.67729348e-01 5.24871477e-17 1.04592872e+00], old_orn: [ 0.43045944 -0.43045944 -0.56098545 0.56098545], new_orn: [-0.47755187 0.20257453 0.62235748 -0.58615608]
And this part of the code is asserting the mismatch between the new and old orientation values.
self.set_position_orientation(position=current_position, orientation=current_orientation)
new_position, new_orientation = self.get_position_orientation()
r1 = R.from_quat(current_orientation).as_matrix()
r2 = R.from_quat(new_orientation).as_matrix()
# Make sure setting is done correctly
assert np.allclose(new_position, current_position, atol=1e-4) and np.allclose(r1, r2, atol=1e-4), \
f"{self.prim_path}: old_pos: {current_position}, new_pos: {new_position}, " \
f"old_orn: {current_orientation}, new_orn: {new_orientation}"
And this is the config file to reproduce the settings.
env:
action_frequency: 60 # (int): environment executes action at the action_frequency rate
physics_frequency: 60 # (int): physics frequency (1 / physics_timestep for physx)
# device: null # (None or str): specifies the device to be used if running on the gpu with torch backend
automatic_reset: false # (bool): whether to automatic reset after an episode finishes
flatten_action_space: false # (bool): whether to flatten the action space as a sinle 1D-array
flatten_obs_space: false # (bool): whether the observation space should be flattened when generated
use_external_obs: false # (bool): Whether to use external observations or not
initial_pos_z_offset: 0.1
external_sensors: null
scene:
type: InteractiveTraversableScene
scene_model: Benevolence_1_int
trav_map_resolution: 0.1
default_erosion_radius: 0.0
trav_map_with_objects: true
num_waypoints: 1
waypoint_resolution: 0.2
load_room_types: null
load_room_instances: null
load_task_relevant_only: false
seg_map_resolution: 0.1
scene_source: OG
include_robots: true
robots:
- type: Fetch
obs_modalities: [proprioception, scan, rgb, depth_linear, seg_semantic, seg_instance]
scale: 0.5
action_type: continuous
action_normalize: True
visual_only: true
task:
type: DummyTask