Skip to content

Commit 268e34c

Browse files
Mikamimkhansenbot
Mikami
authored andcommitted
[update]Additing description in README.md and refactoring Dockerfile
1 parent 5789e49 commit 268e34c

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

space_robots/Dockerfile

-9
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,9 @@ RUN cd mongo-cxx-driver-r3.6.7/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCM
8585

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

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

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

125121
ENV USERNAME=root
126-
# ここでUSERNAMEを設定
127122

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

131125

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

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

147140
RUN pip install openai
148-
# 変更箇所終了
149-
150141

151142
# Setup the entrypoint
152143
COPY ./entrypoint.sh /

space_robots/README.md

+20
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,26 @@ Close the mast (camera arm)
114114
ros2 service call /mast_close std_srvs/srv/Empty
115115
```
116116

117+
##### Generate codes for moving rover by OpenAI API
118+
119+
Step.1 Initial settingsi
120+
121+
Check the config.json for input your API-Key and the LLM model you want to
122+
123+
Step.2 After run the launch demo command, run the code
124+
125+
```bash
126+
python3 generate_src.py
127+
```
128+
("openai" of python module is verified in the version 1.44.0)
129+
130+
131+
Step.3 Automatically saving the generated code by LLM
132+
133+
```bash
134+
gen_script_20240907_0835.py
135+
```
136+
117137
#### Canadarm demo
118138

119139
```bash

0 commit comments

Comments
 (0)