Skip to content

Commit

Permalink
slightly modified documentation to reduce number of errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Lexseal committed Apr 16, 2024
1 parent fb9aa3d commit f6f6b1c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
1 change: 0 additions & 1 deletion docs/source/tutorials/collision_avoidance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/tutorials/plan_a_path.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions mplib/pymp/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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).
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -714,16 +714,16 @@ 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
exist
"""
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
Expand Down
2 changes: 1 addition & 1 deletion mplib/pymp/collision_detection/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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:
"""
Expand Down

0 comments on commit f6f6b1c

Please sign in to comment.