Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposed all existing documentation in Articulated_agents, articulated_agent_controllers, core, and config modules #1736

Merged
merged 9 commits into from
Jan 17, 2024
27 changes: 26 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,20 @@

# Overrides the __all__ as that one pulls everything into the root module
# and doesn't expose any submodules
habitat.__all__ = ["config", "core", "Agent", "Benchmark", "gym"]
habitat.__all__ = [
"config",
"core",
"gym",
"articulated_agent_controllers",
"articulated_agents",
"datasets",
"sims",
"tasks",
"utils"]

habitat.core.__all__ = [
"agent",
"benchmark",
"env",
"embodied_task",
"dataset",
Expand All @@ -33,6 +45,19 @@
"vector_env",
]

habitat.datasets.__all__ = [
"eqa",
"image_nav",
"object_nav",
"pointnav",
"rearrange",
"vln"
]





PROJECT_TITLE = "Habitat"
PROJECT_SUBTITLE = "Lab Docs"
PROJECT_LOGO = "../../habitat-sim/docs/habitat.svg"
Expand Down
2 changes: 2 additions & 0 deletions habitat-lab/habitat/articulated_agent_controllers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@
"HumanoidBaseController",
"HumanoidRearrangeController",
"HumanoidSeqPoseController",
"Pose",
"Motion"
]
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
# where all joints are representated as quaternions. In future PRs we need
# to abstract this class to support other kinds of joints.
class Pose:
def __init__(self, joints_quat, root_transform):
"""
"""
Contains a single humanoid pose
:param joints_quat: list or array of num_joints * 4 elements, with the rotation quaternions
:param root_transform: Matrix4 with the root trasnform.
"""
:param joints_quat: list or array of num_joints * 4 elements, with the rotation quaternions
:param root_transform: Matrix4 with the root trasnform.
"""
def __init__(self, joints_quat, root_transform):

self.joints = list(joints_quat)
self.root_transform = root_transform

Expand All @@ -29,7 +30,7 @@ class Motion:
:param joints_quat_array: num_poses x num_joints x 4 array, containing the join orientations
:param transform_array: num_poses x 4 x 4 array, containing the root transform
:param displacement: on each pose, how much forward displacement was there?
Used to measure how many poses we should advance to move a cerain amount
Used to measure how many poses we should advance to move a cerain amount
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I.e., this will most probably cause a problem -- it should be indented like before, or on a single line.

:param fps: the FPS at which the motion was recorded
"""

Expand Down
40 changes: 13 additions & 27 deletions habitat-lab/habitat/articulated_agents/mobile_manipulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@
@attr.s(auto_attribs=True, slots=True)
class ArticulatedAgentCameraParams:
"""Data to configure a camera placement on the articulated agent.
:property attached_link_id: Which link ID this camera is attached to, -1
for the base link.
:property cam_offset_pos: The 3D position of the camera relative to the
transformation of the attached link.
:property cam_look_at_pos: The 3D of where the camera should face relative
to the transformation of the attached link.
:property attached_link_id: Which link ID this camera is attached to, -1 for the base link.
:property cam_offset_pos: The 3D position of the camera relative to the transformation of the attached link.
:property cam_look_at_pos: The 3D of where the camera should face relative to the transformation of the attached link.
:property relative_transform: An added local transform for the camera.
"""

Expand All @@ -41,32 +38,21 @@ class MobileManipulatorParams:
:property arm_joints: The joint ids of the arm joints.
:property gripper_joints: The habitat sim joint ids of any grippers.
:property wheel_joints: The joint ids of the wheels. If the wheels are not controlled, then this should be None
:property arm_init_params: The starting joint angles of the arm. If None,
resets to 0.
:property gripper_init_params: The starting joint positions of the gripper. If None,
resets to 0.
:property ee_offset: The 3D offset from the end-effector link to the true
end-effector position.
:property arm_init_params: The starting joint angles of the arm. If None, resets to 0.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrapping the docstring like it was before shouldn't cause any problems for the doc generator. The successive lines just need to be indented respective to the first :property : line.

:property gripper_init_params: The starting joint positions of the gripper. If None, resets to 0.
:property ee_offset: The 3D offset from the end-effector link to the true end-effector position.
:property ee_links: A list with the Habitat Sim link ID of the end-effector.
:property ee_constraint: A (ee_count, 2, N) shaped array specifying the upper and
lower limits for each end-effector joint where N is the arm DOF.
:property cameras: The cameras and where they should go. The key is the
prefix to match in the sensor names. For example, a key of `"head"`
will match sensors `"head_rgb"` and `"head_depth"`
:property gripper_closed_state: All gripper joints must achieve this
state for the gripper to be considered closed.
:property gripper_open_state: All gripper joints must achieve this
state for the gripper to be considered open.
:property ee_constraint: A (ee_count, 2, N) shaped array specifying the upper and lower limits for each end-effector joint where N is the arm DOF.
:property cameras: The cameras and where they should go. The key is the prefix to match in the sensor names. For example, a key of `"head"`will match sensors `"head_rgb"` and `"head_depth"`
:property gripper_closed_state: All gripper joints must achieve this state for the gripper to be considered closed.
:property gripper_open_state: All gripper joints must achieve this state for the gripper to be considered open.
:property gripper_state_eps: Error margin for detecting whether gripper is closed.
:property arm_mtr_pos_gain: The position gain of the arm motor.
:property arm_mtr_vel_gain: The velocity gain of the arm motor.
:property arm_mtr_max_impulse: The maximum impulse of the arm motor.
:property wheel_mtr_pos_gain: The position gain of the wheeled motor (if
there are wheels).
:property wheel_mtr_vel_gain: The velocity gain of the wheel motor (if
there are wheels).
:property wheel_mtr_max_impulse: The maximum impulse of the wheel motor (if
there are wheels).
:property wheel_mtr_pos_gain: The position gain of the wheeled motor (if there are wheels).
:property wheel_mtr_vel_gain: The velocity gain of the wheel motor (if there are wheels).
:property wheel_mtr_max_impulse: The maximum impulse of the wheel motor (if there are wheels).
:property base_offset: The offset of the root transform from the center ground point for navmesh kinematic control.
:property ee_count: how many end effectors
"""
Expand Down
21 changes: 8 additions & 13 deletions habitat-lab/habitat/articulated_agents/static_manipulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,17 @@

@attr.s(auto_attribs=True, slots=True)
class StaticManipulatorParams:
"""Data to configure a static manipulator.
"""
Data to configure a static manipulator.
:property arm_joints: The joint ids of the arm joints.
:property gripper_joints: The habitat sim joint ids of any grippers.
:property arm_init_params: The starting joint angles of the arm. If None,
resets to 0.
:property gripper_init_params: The starting joint positions of the gripper. If None,
resets to 0.
:property ee_offset: The 3D offset from the end-effector link to the true
end-effector position.
:property arm_init_params: The starting joint angles of the arm. If None, resets to 0.
:property gripper_init_params: The starting joint positions of the gripper. If None, resets to 0.
:property ee_offset: The 3D offset from the end-effector link to the true end-effector position.
:property ee_links: A list with the Habitat Sim link ID of the end-effector.
:property ee_constraint: A (ee_count, 2, N) shaped array specifying the upper and
lower limits for each end-effector joint where N is the arm DOF.
:property gripper_closed_state: All gripper joints must achieve this
state for the gripper to be considered closed.
:property gripper_open_state: All gripper joints must achieve this
state for the gripper to be considered open.
:property ee_constraint: A (ee_count, 2, N) shaped array specifying the upper and lower limits for each end-effector joint where N is the arm DOF.
:property gripper_closed_state: All gripper joints must achieve this state for the gripper to be considered closed.
:property gripper_open_state: All gripper joints must achieve this state for the gripper to be considered open.
:property gripper_state_eps: Error margin for detecting whether gripper is closed.
:property arm_mtr_pos_gain: The position gain of the arm motor.
:property arm_mtr_vel_gain: The velocity gain of the arm motor.
Expand Down
5 changes: 4 additions & 1 deletion habitat-lab/habitat/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@
from habitat.config.default import DictConfig, get_config
from habitat.config.read_write import read_write

__all__ = ["get_config", "read_write", "default_structured_configs"]
__all__ = [
"get_config",
"read_write",
"default_structured_configs"]
7 changes: 6 additions & 1 deletion habitat-lab/habitat/gym/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@

from habitat.gym.gym_definitions import make_gym_from_config

__all__ = ["make_gym_from_config"]
__all__ = [
"make_gym_from_config",
"gym_env_episode_count_wrapper",
"gym_env_obs_dict_wrapper",
"gym_wrapper"
]
8 changes: 7 additions & 1 deletion habitat-lab/habitat/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

__all__ = ["visualizations", "geometry_utils", "common"]
__all__ = [
"visualizations",
"geometry_utils",
"common",
"env_utils",
"pickle5_multiprocessing",
"profiling_wrapper"]