Skip to content

Commit

Permalink
re-applied path change to rosbot xl in new file
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Dąbrowski <[email protected]>
  • Loading branch information
adamdbrw committed Sep 5, 2024
1 parent fc0e508 commit 02ea1d5
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 1 deletion.
107 changes: 107 additions & 0 deletions docs/demos.md.orig
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Demos

RAI comes with a number of supported demos, which showcase different applications, but are by no means exhaustive.

![demos.png](imgs/demos.png)

## Installation

In the root directory of the `rai` repo, run the following command to fetch demo repositories:

```bash
vcs import < demos.repos
```

<<<<<<< HEAD
## Husarion ROSBot XL demo

![Screenshot1](imgs/o3deSimulation.png)

### Using pre-bulit binary

1. Download the newest binary release (`release.zip` file) from [rai-rosbot-xl-demo -> releases](https://github.com/RobotecAI/rai-rosbot-xl-demo/releases)
2. Install required packages

```bash
sudo apt install ros-${ROS_DISTRO}-ackermann-msgs ros-${ROS_DISTRO}-gazebo-msgs ros-${ROS_DISTRO}-control-toolbox
```

3. Unpack the binary and run the simulation:

```bash
unzip release.zip
. /opt/ros/${ROS_DISTRO}/setup.bash
./release/RAIRosbotXLDemo.GameLauncher -bg_ConnectToAssetProcessor=0
```

4. Start navigation stack:
```bash
./src/examples/rai-rosbot-xl-demo/run-nav.sh
```

### Building the project yourself

If you would like to adapt the simulation to your needs, you can make changes using
[O3DE Editor](https://www.docs.o3de.org/docs/welcome-guide/) and build the project
yourself.
Please refer to [rai husarion rosbot xl demo][rai rosbot demo] for more details.

## Running RAI

You can set the task for the agent in the `examples/nav2_example_ros_actions.py` file.

1. Prepare the robot description.

```bash
colcon build --symlink-install --packages-select rosbot_xl_whoami

. install/setup.bash
```

2. Start `rai_whoami_node`
who_am_i node. It loads files from robot [description](https://github.com/RobotecAI/rai-rosbot-xl-demo/tree/development/src/rosbot_xl_whoami/description) folder to server robot identity.

```bash
source setup_shell.sh

ros2 run rai_whoami rai_whoami_node --ros-args -p robot_description_package:="rosbot_xl_whoami"
```

3. Start `rai_node`.

By looking at the example code in `src/examples/rosbot-xl-generic-node-demo.py` you can see that:

- This node has no information about the robot besides what it can get from `rai_whoami_node`
- Topics can be whitelisted to only receive information about the robot
- Before every LLM decision, `rai_node` sends it's state to the LLM Agent. By default it contains ros interfaces (topics, services, actions) and rosout summary, but state can be extended. In the example we also adding the summary of the camera image.

```bash
source setup_shell.sh

python examples/rosbot-xl-generic-node-demo.py
```

4. Send the task to the node:

> **NOTE**: For now agent is capable of performing only 1 task at once.

```bash
# Using robots camera to describe environment
ros2 topic pub --once /task_addition_requests std_msgs/msg/String "data: 'Where are you now?'"

# Automatic integration with navigation stack
ros2 topic pub --once /task_addition_requests std_msgs/msg/String "data: 'Drive 1 meter forward'"
ros2 topic pub --once /task_addition_requests std_msgs/msg/String "data: 'Spin 90 degrees'"

# Knowledge composition to achieve more complicated tasks
ros2 topic pub --once /task_addition_requests std_msgs/msg/String "data: 'Drive forward if the path is clear, otherwise backward'"
```

[rai rosbot demo]: https://github.com/RobotecAI/rai-rosbot-xl-demo
=======
Once you have all the demos pulled, see dedicated docs to proceed:
- [Husarion ROSBot XL in an apartment](demos/rosbot_xl.md)
- Coming soon - autonomous tractor in an orchard.
- Coming soon - inspection with ANYmal robot dog.
- Coming soon - manipulation tasks demo
>>>>>>> 50e2de4 (docs improvements)
2 changes: 1 addition & 1 deletion docs/demos/rosbot_xl.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This demo utilizes Open 3D Engine simulation and allows you to work with RAI on

4. Start navigation stack:
```bash
./src/examples/rosbot-xl-demo/run-nav.sh
./src/examples/rai-rosbot-xl-demo/run-nav.sh
```

You are now ready to [run RAI](#running-rai)!
Expand Down

0 comments on commit 02ea1d5

Please sign in to comment.