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

Add workshop cheatsheet #80

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading