Skip to content

Commit

Permalink
Add workshop cheatsheet
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-bass committed Oct 21, 2024
1 parent c544bd1 commit 9742205
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 0 deletions.
102 changes: 102 additions & 0 deletions CHEATSHEET.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Workshop Cheatsheet

## Repository Guide

### Clone this repo

```bash
git clone --recurse-submodules https://github.com/ros-wg-delib/roscon24-workshop.git
```

### Update to the latest version (including submodules)

```bash
git pull
git submodule update --init
```

---

## Docker Guide

### Pull the image

```bash
docker compose pull
```

### Build the image locally

```bash
docker compose build
```

### Start a new container

```bash
docker compose run base
```

### Attach a new shell to an existing container

```bash
docker compose exec base bash
```

### Shutting down cleanly

```bash
docker compose down --remove-orphans
```

NOTE: This is needed because every time you run `docker compose run base`, a new container is created and may become "orphaned".
You can alternatively use `docker compose up base` to avoid this, but it uses up one terminal.

---

## PyRoboSim Guide

### Start a world

```bash
ros2 run delib_ws_worlds run --ros-args -p problem_number:=1
```

Change the `problem_number` argument above to launch different worlds.

To edit existing worlds, refer to the `problems/delib_ws_worlds/worlds` folder in this repository.

### Query an individual robot's state

```bash
ros2 topic echo /robot/robot_state
```

### Query the complete world's state

```bash
ros2 service call /request_world_state pyrobosim_msgs/srv/RequestWorldState {}
```

### Run an action with a specific robot

Navigation example:

```bash
ros2 action send_goal /execute_action pyrobosim_msgs/action/ExecuteTaskAction "{action: {robot: 'robot', type: 'navigate', target_location: 'desk'}}"
```

Pick/place example:

```bash
ros2 action send_goal /execute_action pyrobosim_msgs/action/ExecuteTaskAction "{action: {robot: 'robot', type: 'pick', object: 'waste0'}}"

ros2 action send_goal /execute_action pyrobosim_msgs/action/ExecuteTaskAction "{action: {robot: 'robot', type: 'place', object: 'waste0'}}"
```

### PyRoboSim display is frozen

Sometimes, PyRoboSim's display may not update while a robot is actually moving.
We are actively investigating this issue, but to manually "unstick" the GUI you can toggle the "Show collision polygons" checkbox to force the state to refresh.

---
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,9 @@ Attach to the container as shown in the image below:
![vscode_attach.png](media/vscode_attach.png)

Once inside the container, open the folder `/delib_ws/src`.

---

## More information and troubleshooting

Once you are all set up, refer to the [cheatsheet](./CHEATSHEET.md) for more information, including useful commands and troubleshooting steps.

0 comments on commit 9742205

Please sign in to comment.