Skip to content

Commit

Permalink
[update]Additing description in README.md and refactoring Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikami authored and mkhansenbot committed Sep 12, 2024
1 parent 5789e49 commit 268e34c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
9 changes: 0 additions & 9 deletions space_robots/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,9 @@ RUN cd mongo-cxx-driver-r3.6.7/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCM

# Get the source for the dependencies
# RUN vcs import src < /tmp/demo_generated_pkgs.repos
#RUN echo "SPACEROS_DIR is set to: ${SPACEROS_DIR}"
#RUN if [ -z "${SPACEROS_DIR}" ]; then echo "SPACEROS_DIR is empty"; else echo "SPACEROS_DIR is set to: ${SPACEROS_DIR}"; fi
ENV SPACEROS_DIR=/root/ws_moveit
ENV MOVEIT2_DIR=${SPACEROS_DIR}
#ENV ROSDISTRO=""

#RUN ls -l ${SPACEROS_DIR} # この行を追加して、ディレクトリの内容を確認
RUN echo "SPACEROS_DIR is set to: ${SPACEROS_DIR}"

COPY --chown=${USERNAME}:${USERNAME} demo_manual_pkgs.repos /tmp/
Expand Down Expand Up @@ -123,16 +119,13 @@ RUN /bin/bash -c 'source ${SPACEROS_DIR}/install/setup.bash && source ${MOVEIT2_
&& colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release'

ENV USERNAME=root
# ここでUSERNAMEを設定

# 確認用のデバッグコマンド
RUN echo "USERNAME is set to: $USERNAME"


# Add the user to the render group so that the user can access /dev/dri/renderD128
RUN sudo usermod -aG render $USERNAME

# 以下の行を追加 (変更箇所開始)
# Create /demo_ws/ directory and copy new files
RUN mkdir -p /demos_ws/
COPY generate_src.py /demos_ws/
Expand All @@ -145,8 +138,6 @@ COPY prompt.txt /demos_ws/
RUN chmod +x /demos_ws/generate_src.py /demos_ws/sample_code_by_gpt.py /demos_ws/sample_code_turn_left_by_gpt.py

RUN pip install openai
# 変更箇所終了


# Setup the entrypoint
COPY ./entrypoint.sh /
Expand Down
20 changes: 20 additions & 0 deletions space_robots/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,26 @@ Close the mast (camera arm)
ros2 service call /mast_close std_srvs/srv/Empty
```

##### Generate codes for moving rover by OpenAI API

Step.1 Initial settingsi

Check the config.json for input your API-Key and the LLM model you want to

Step.2 After run the launch demo command, run the code

```bash
python3 generate_src.py
```
("openai" of python module is verified in the version 1.44.0)


Step.3 Automatically saving the generated code by LLM

```bash
gen_script_20240907_0835.py
```

#### Canadarm demo

```bash
Expand Down

0 comments on commit 268e34c

Please sign in to comment.