Skip to content

Commit

Permalink
Merge pull request cram2#202 from rhaschke/fix-docs
Browse files Browse the repository at this point in the history
Fix issues in documentation
  • Loading branch information
Tigul authored Sep 27, 2024
2 parents 5b804e5 + 15f3a17 commit f9b3ea4
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion examples/interface_examples/giskard.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jupyter:
# Giskard interface in PyCRAM

This notebook should provide you with an example on how to use the Giskard interface. This includes how to use the
interface, how it actually works and how to extend it.
interface, how it actually works, and how to extend it.

We start by installing and launching Giskard. For the installation please follow the
instructions [here](https://github.com/SemRoCo/giskardpy).
Expand Down
12 changes: 7 additions & 5 deletions examples/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ A BulletWorld can be created by simply creating an object of the BulletWorld cla
```python
from pycram.worlds.bullet_world import BulletWorld
from pycram.world_concepts.world_object import Object
from pycram.datastructures.enums import ObjectType
from pycram.datastructures.enums import ObjectType, WorldMode
from pycram.datastructures.pose import Pose

world = BulletWorld()
world = BulletWorld(mode=WorldMode.GUI)
```

The BulletWorld allows to render images from arbitrary positions. In the following example we render images with the
Expand Down Expand Up @@ -342,6 +342,8 @@ cereal = Object("cereal", ObjectType.BREAKFAST_CEREAL, "breakfast_cereal.stl", p
```

```python
from pycram.datastructures.enums import Grasp

cereal_desig = ObjectDesignatorDescription(names=["cereal"])
kitchen_desig = ObjectDesignatorDescription(names=["kitchen"])
robot_desig = ObjectDesignatorDescription(names=["pr2"]).resolve()
Expand All @@ -355,7 +357,7 @@ with simulated_robot:

NavigateAction(target_locations=[pickup_pose.pose]).resolve().perform()

PickUpAction(object_designator_description=cereal_desig, arms=[pickup_arm], grasps=["front"]).resolve().perform()
PickUpAction(object_designator_description=cereal_desig, arms=[pickup_arm], grasps=[Grasp.FRONT]).resolve().perform()

ParkArmsAction([Arms.BOTH]).resolve().perform()

Expand All @@ -380,10 +382,10 @@ Task trees are a hierarchical representation of all Actions involved in a plan.
inspect and restructure the execution order of Actions in the plan.

```python
import pycram.task
import pycram.tasktree
import anytree

tt = pycram.task.task_tree
tt = pycram.tasktree.task_tree
print(anytree.RenderTree(tt))
```

Expand Down
2 changes: 1 addition & 1 deletion examples/language.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ with simulated_robot:
## Combination of Expressions

You can also combine different language expressions to further structure your plans. If you combine sequential and
parallel expression please keep in mind that sequential expressions bind stringer than parallel ones. For example:
parallel expression please keep in mind that sequential expressions bind stronger than parallel ones. For example:

```
navigate | park + move_torso
Expand Down
8 changes: 4 additions & 4 deletions examples/location_designator.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ print(pose)

## Reachable

Next we want to locations from where the robot can reach a specific point, like an object the robot should pick up. This
Next we want to have locations from where the robot can reach a specific point, like an object the robot should pick up. This
can also be done with the {meth}`~pycram.designators.location_designator.CostmapLocation` description, but this time we need to provide an additional argument.
The additional argument is the robo which should be able to reach the pose.
The additional argument is the robot which should be able to reach the pose.

Since a robot is needed we will use the PR2 and use a milk as a target point for the robot to reach. The torso of the
PR2 will be set to 0.2 since otherwise the arms of the robot will be too low to reach on the countertop.
Expand All @@ -97,7 +97,7 @@ print(location_description.resolve())
As you can see we get a pose near the countertop where the robot can be placed without colliding with it. Furthermore,
we get a list of arms with which the robot can reach the given object.

## Visibile
## Visible

The {meth}`~pycram.designators.location_designator.CostmapLocation` can also find position from which the robot can see a given object or location. This is very
similar to how reachable locations are described, meaning we provide a object designator or a pose and a robot
Expand Down Expand Up @@ -215,7 +215,7 @@ print(access_location.pose)

## Giskard Location

Some robots like the HSR or the Stretch2 need a full-body ik solver to utilize the whole body. For this case robots
Some robots like the HSR or the Stretch2 need a full-body ik solver to utilize the whole body. For this case
the {meth}`~pycram.designators.specialized_designators.location.giskard_location.GiskardLocation` can be used. This location designator uses giskard as an ik solver to find a pose for the
robot to reach a target pose.

Expand Down
2 changes: 1 addition & 1 deletion examples/migrate_neems.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ connect your pycram process to it.

After you recorded your data locally you can migrate the data using the `migrate_neems` function.

First, lets create an in memory database engine called `source_engine` where we record our current process.
First, lets create an in-memory database engine called `source_engine` where we record our current process.

```python
import sqlalchemy.orm
Expand Down
2 changes: 1 addition & 1 deletion examples/motion_designator.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jupyter:

Motion designators are similar to action designators, but unlike action designators, motion designators represent atomic
low-level motions. Motion designators only take the parameter that they should execute and not a list of possible
parameters, like the other designators. Like action designators, motion designators can be performed, performing motion
parameters, like the other designators. Like action designators, motion designators can be performed. Performing a motion
designator verifies the parameter and passes the designator to the respective process module.

Since motion designators perform a motion on the robot, we need a robot which we can use. Therefore, we will create a
Expand Down
2 changes: 1 addition & 1 deletion examples/orm_example.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jupyter:
# Hands on Object Relational Mapping in PyCram

This tutorial will walk you through the serialization of a minimal plan in pycram.
First we will import sqlalchemy, create an in memory database and connect a session to it.
First we will import sqlalchemy, create an in-memory database and connect a session to it.

```python
import sqlalchemy.orm
Expand Down

0 comments on commit f9b3ea4

Please sign in to comment.