You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
CodeBotler is a system that converts natural language task descriptions into robot-agnostic programs that can be executed by general-purpose service mobile robots. It includes a benchmark (RoboEval) designed for evaluating Large Language Models (LLMs) in the context of code generation for mobile robot service tasks.
8
8
9
9
This project consists of two key components:
10
-
*[CodeBotler](#codebotler-deploy-quick-start-guide): This system features a web interface designed for generating general-purpose service mobile robot programs, along with a ROS (Robot Operating System) Action client for deploying these programs on a robot. It offers the flexibility to explore the code generation capabilities of CodeBotler in two ways: as a standalone system without a robot, as illustrated in the figure above, or by actual deployment on a real robot.
10
+
*[CodeBotler](#codebotler-deploy-quick-start-guide): This system features a web interface designed for generating general-purpose service mobile robot programs, along with a ROS2 (Robot Operating System) Action client for deploying these programs on a robot. It offers the flexibility to explore the code generation capabilities of CodeBotler in two ways: as a standalone system without a robot, as illustrated in the figure above, or by actual deployment on a real robot.
11
11
12
12
13
13
*[RoboEval](#roboeval-benchmark-quick-start-guide): This benchmark for code generation features a suite of 16 user task descriptions, each with 5 paraphrases of the prompt. It includes a symbolic simulator and a temporal trace evaluator, specifically designed to assess Large Language Models (LLMs) in their ability to generate code for service mobile robot tasks.
We provide a conda environment to run our code. To create and activate the environment:
20
20
```shell
21
-
conda create -n codebotler python=3.12.8 pip
21
+
conda create -n codebotler python=3.10 pip
22
22
conda activate codebotler
23
23
pip install -r requirements.txt
24
24
```
25
-
After installing the conda environment, please go to [pytorch's official website](https://pytorch.org/get-started/locally/) to install the pytorch corresponding to your cuda version (**Note: do not install the cpu version**).
25
+
After installing the conda environment, please go to [pytorch's official website](https://pytorch.org/get-started/locally/) to install the pytorch corresponding to your cuda version (**Note: do not install the cpu version**).
26
+
27
+
**ROS2 Requirements**
28
+
* For robot deployment, you will need ROS2 installed on your system. CodeBotler uses ROS2 actions for robot communication.
29
+
* Install ROS2 following the [official ROS2 installation guide](https://docs.ros.org/en/humble/Installation.html).
30
+
* The robot interface components will automatically install the required ROS2 Python packages (`rclpy`).
26
31
27
32
**Language Model Options**
28
33
* To use an OpenAI model, you will need an [OpenAI key](https://platform.openai.com/account/api-keys), either saved in a file named `.openai_api_key`, or in the `OPENAI_API_KEY` environment variable.
CodeBotler utilizes [ROS actions](http://wiki.ros.org/actionlib) to execute generated code on a real robot.
3
+
CodeBotler utilizes [ROS2 actions](https://docs.ros.org/en/humble/Tutorials/Intermediate/Writing-an-Action-Server-Client/Py.html) to execute generated code on a real robot.
4
4
[robot_interface/src/robot_client_interface.py](src/robot_client_interface.py) defines the action clients that CodeBotler uses to call the robot action servers. The action definitions are in [robot_interface/src/robot_actions_pkg/action](src/robot_actions_pkg/action). An example robot action server script is provided in [robot_interface/src/robot_server_example.py](src/robot_server_example.py) - the example server simply prints action calls to the terminal, along with the call arguments and the result.
5
5
You can use this example script as a template to implement the action servers for your robot.
6
6
7
7
## Build
8
8
To build the action messages and the CodeBotler client:
9
-
1. Navigate to the `robot_interface` subdirectory and run `catkin_make`:
9
+
1. Navigate to the `robot_interface` subdirectory and run `colcon build`:
10
10
```bash
11
11
cd robot_interface
12
-
catkin_make
12
+
colcon build
13
13
```
14
-
1. Source the Catkin workspace setup script:
14
+
1. Source the ROS2 workspace setup script:
15
15
```bash
16
-
sourcedevel/setup.bash
16
+
sourceinstall/setup.bash
17
17
```
18
-
1. Optionally, add the Catkin workspace setup script to your `~/.bashrc` file to automatically source the setup script when opening a new terminal.
18
+
1. Optionally, add the ROS2 workspace setup script to your `~/.bashrc` file to automatically source the setup script when opening a new terminal.
19
19
```bash
20
-
echo"source $(pwd)/devel/setup.bash">>~/.bashrc
20
+
echo"source $(pwd)/install/setup.bash">>~/.bashrc
21
21
```
22
22
23
23
## Usage
@@ -30,4 +30,4 @@ The robot-specific action server must be launched before running the deployment
30
30
```bash
31
31
python3 codebotler.py --robot --ip <robot_ip>
32
32
```
33
-
1. Open `http://<robot_ip>:8080/`in your browser to access the deployment interface.
33
+
1. Open `http://<robot_ip>:8080/`in your browser to access the deployment interface.
0 commit comments