From f6f6b1c45f887518b6407042f09bd96bb27911e3 Mon Sep 17 00:00:00 2001 From: Xinsong Lin Date: Tue, 16 Apr 2024 10:06:26 -0700 Subject: [PATCH] slightly modified documentation to reduce number of errors --- docs/source/tutorials/collision_avoidance.rst | 1 - docs/source/tutorials/plan_a_path.rst | 2 +- mplib/pymp/__init__.pyi | 24 +++++++++---------- mplib/pymp/collision_detection/__init__.pyi | 2 +- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/docs/source/tutorials/collision_avoidance.rst b/docs/source/tutorials/collision_avoidance.rst index 7b41f0fd..bc755a8b 100644 --- a/docs/source/tutorials/collision_avoidance.rst +++ b/docs/source/tutorials/collision_avoidance.rst @@ -40,7 +40,6 @@ After adding the point cloud, we can avoid collisions between the robot and the :dedent: 0 :start-after: # plan_qpos_to_pose ankor :end-before: # plan_qpos_to_pose ankor end - :emphasize-lines: 5 You don't need to provide the point cloud for each ``planner.plan()`` or ``planner.plan_screw()`` call. You can use ``planner.update_point_cloud()`` to update the point cloud once it's changed. diff --git a/docs/source/tutorials/plan_a_path.rst b/docs/source/tutorials/plan_a_path.rst index 4568576d..58194acb 100644 --- a/docs/source/tutorials/plan_a_path.rst +++ b/docs/source/tutorials/plan_a_path.rst @@ -46,7 +46,7 @@ The second argument is the current joint positions of all the active joints (not ``planner.plan_qpos_to_pose()`` also takes other optional arguments with default values: -.. automethod:: mplib.planner.Planner.plan_qpos_to_pose +.. automethod:: mplib.planner.Planner.plan_pose :no-index: Follow a path diff --git a/mplib/pymp/__init__.pyi b/mplib/pymp/__init__.pyi index 4635178a..0f35d048 100644 --- a/mplib/pymp/__init__.pyi +++ b/mplib/pymp/__init__.pyi @@ -420,7 +420,7 @@ class PlanningWorld: its current pose. If the object is currently attached, disallow collision between the object and previous touch_links. - Updates acm_ to allow collisions between attached object and touch_links. + Updates ``acm_`` to allow collisions between attached object and touch_links. :param name: name of the non-articulated object to attach :param art_name: name of the planned articulation to attach to @@ -437,10 +437,10 @@ class PlanningWorld: touch_links as the name of self links that collide with the object in the current state. - Updates acm_ to allow collisions between attached object and touch_links. + Updates ``acm_`` to allow collisions between attached object and touch_links. If the object is already attached, the touch_links of the attached object is - preserved and acm_ remains unchanged. + preserved and ``acm_`` remains unchanged. :param name: name of the non-articulated object to attach :param art_name: name of the planned articulation to attach to @@ -457,7 +457,7 @@ class PlanningWorld: given pose. If the object is currently attached, disallow collision between the object and previous touch_links. - Updates acm_ to allow collisions between attached object and touch_links. + Updates ``acm_`` to allow collisions between attached object and touch_links. :param name: name of the non-articulated object to attach :param art_name: name of the planned articulation to attach to @@ -475,10 +475,10 @@ class PlanningWorld: touch_links as the name of self links that collide with the object in the current state. - Updates acm_ to allow collisions between attached object and touch_links. + Updates ``acm_`` to allow collisions between attached object and touch_links. If the object is already attached, the touch_links of the attached object is - preserved and acm_ remains unchanged. + preserved and ``acm_`` remains unchanged. :param name: name of the non-articulated object to attach :param art_name: name of the planned articulation to attach to @@ -500,7 +500,7 @@ class PlanningWorld: """ Attaches given object (w/ p_geom) to specified link of articulation at given pose. This is done by removing the object and then adding and attaching object. - As a result, all previous acm_ entries with the object are removed + As a result, all previous ``acm_`` entries with the object are removed :param name: name of the non-articulated object to attach :param p_geom: pointer to a CollisionGeometry object @@ -521,7 +521,7 @@ class PlanningWorld: """ Attaches given object (w/ p_geom) to specified link of articulation at given pose. This is done by removing the object and then adding and attaching object. - As a result, all previous acm_ entries with the object are removed. + As a result, all previous ``acm_`` entries with the object are removed. Automatically sets touch_links as the name of self links that collide with the object in the current state (auto touch_links). @@ -574,7 +574,7 @@ class PlanningWorld: """ def detach_object(self, name: str, also_remove: bool = False) -> bool: """ - Detaches object with given name. Updates acm_ to disallow collision between the + Detaches object with given name. Updates ``acm_`` to disallow collision between the object and touch_links. :param name: name of the non-articulated object to detach @@ -714,7 +714,7 @@ class PlanningWorld: """ def remove_articulation(self, name: str) -> bool: """ - Removes the articulation with given name if exists. Updates acm_ + Removes the articulation with given name if exists. Updates ``acm_`` :param name: name of the articulated model :return: ``True`` if success, ``False`` if articulation with given name does not @@ -722,8 +722,8 @@ class PlanningWorld: """ def remove_object(self, name: str) -> bool: """ - Removes (and detaches) the collision object with given name if exists. Updates - acm_ + Removes (and detaches) the collision object with given name if exists. + Updates ``acm_`` :param name: name of the non-articulated collision object :return: ``True`` if success, ``False`` if the non-articulated object with given diff --git a/mplib/pymp/collision_detection/__init__.pyi b/mplib/pymp/collision_detection/__init__.pyi index 050cf1e9..073c4aba 100644 --- a/mplib/pymp/collision_detection/__init__.pyi +++ b/mplib/pymp/collision_detection/__init__.pyi @@ -77,7 +77,7 @@ class AllowedCollisionMatrix: """ def get_all_entry_names(self) -> list[str]: """ - Get sorted names of all existing elements (including default_entries_) + Get sorted names of all existing elements (including ``default_entries_``) """ def get_allowed_collision(self, name1: str, name2: str) -> AllowedCollision | None: """