-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Takagi, Isamu <[email protected]>
- Loading branch information
1 parent
d72c6a5
commit 59cf513
Showing
23 changed files
with
950 additions
and
43 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM osrf/ros:humble-desktop AS common | ||
|
||
RUN apt-get update | ||
RUN apt-get -y install libgl1-mesa-glx libgl1-mesa-dri | ||
RUN apt-get -y install iproute2 | ||
RUN apt-get -y install ros-humble-rmw-cyclonedds-cpp | ||
|
||
FROM common AS dev | ||
|
||
ENV ROS_LOCALHOST_ONLY 1 | ||
ENV RCUTILS_COLORIZED_OUTPUT 1 | ||
|
||
FROM common AS eval | ||
|
||
ENV RCUTILS_COLORIZED_OUTPUT 0 | ||
|
||
#RUN mkdir /ws | ||
#RUN git clone --depth 1 https://github.com/AutomotiveAIChallenge/aichallenge-source-materials /ws/aichallenge2023-racing | ||
|
||
# Copy into Container | ||
#COPY AWSIM /ws/AWSIM | ||
#COPY aichallenge_submit.tar.gz /ws | ||
#COPY main.bash /ws | ||
|
||
# Organize Files for Execution (Copy user files and map data to the executable folder) | ||
#RUN cp -r /ws/aichallenge2023-racing/aichallenge /aichallenge | ||
#RUN cp -r /ws/AWSIM /aichallenge | ||
#RUN chmod 757 /aichallenge | ||
#RUN rm -rf /aichallenge/autoware/src/aichallenge_submit | ||
#RUN tar zxf /ws/aichallenge_submit.tar.gz -C /aichallenge/autoware/src | ||
|
||
# Build | ||
#RUN bash -c ' \ | ||
# source /autoware/install/setup.bash; \ | ||
# cd /aichallenge/autoware; \ | ||
# rosdep update; \ | ||
# rosdep install -y -r -i --from-paths src --ignore-src --rosdistro $ROS_DISTRO; \ | ||
# colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release' | ||
|
||
#ENTRYPOINT [] | ||
#CMD ["bash", "/ws/main.bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
# aichallenge-yyyymm | ||
# aichallenge-source-materials | ||
|
||
## docker-dev | ||
|
||
 | ||
|
||
## docker-eval | ||
|
||
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/build | ||
/install | ||
/log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
if [[ ${1} == "clean" ]]; then | ||
echo "clean build" | ||
rm -r autoware/build/* autoware/install/* | ||
fi | ||
|
||
cd ./autoware || exit | ||
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
5 changes: 2 additions & 3 deletions
5
aichallenge/run_autoware.sh → aichallenge/run_autoware.bash
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# shellcheck disable=SC1091 | ||
source /aichallenge/autoware/install/setup.bash | ||
sudo ip link set multicast on lo | ||
|
||
source ./autoware/install/setup.bash | ||
rm -f result.json | ||
ros2 launch aichallenge_system_launch aichallenge_system.launch.xml |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/bin/bash | ||
|
||
export PATH="$PATH:/root/.local/bin" | ||
export PATH="/usr/local/cuda/bin:$PATH" | ||
export XDG_RUNTIME_DIR=/tmp/xdg | ||
export RCUTILS_COLORIZED_OUTPUT=0 | ||
export ROS_LOCALHOST_ONLY=1 | ||
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp | ||
|
||
# shellcheck disable=SC1091 | ||
source /aichallenge/autoware/install/setup.bash | ||
sudo ip link set multicast on lo | ||
|
||
# Move working directory | ||
cd /output || exit | ||
|
||
# Launch the simulator | ||
echo "Launch AWSIM" | ||
bash /aichallenge/simulator/simulator.bash & | ||
|
||
# Waiting for the simulator to start up | ||
sleep 3 | ||
|
||
# Launch Autoware | ||
echo "Launch user Autoware code" | ||
ros2 launch aichallenge_system_launch aichallenge_system.launch.xml >autoware.log 2>&1 & | ||
ROSLAUNCH_PID=$! | ||
|
||
# Waiting for Autoware to start up | ||
sleep 3 | ||
|
||
# Start recording rosbag | ||
rm -r rosbag2_autoware | ||
ros2 bag record -a -o rosbag2_autoware & | ||
ROSBAG_RECORD_PID=$! | ||
|
||
# Waiting for screen capture (TODO: This will not wait if there is no service) | ||
# echo "Waiting for screen capture" | ||
# until (ros2 service type /debug/service/capture_screen); do | ||
# sleep 5 | ||
# done | ||
|
||
# Start recording rviz2 | ||
# ros2 service call /debug/service/capture_screen std_srvs/srv/Trigger | ||
|
||
# Waiting for the simulator results | ||
# echo "Waiting for the simulator results" | ||
# until [ -f ~/awsim-logs/result.json ]; do | ||
# sleep 5 | ||
# done | ||
|
||
# Stop recording rviz2 | ||
# ros2 service call /debug/service/capture_screen std_srvs/srv/Trigger | ||
|
||
# Waiting for the screen capture to finish | ||
sleep 3 | ||
|
||
## Stop rosbag and Autoware to finish writing logs | ||
kill $ROSBAG_RECORD_PID | ||
kill $ROSLAUNCH_PID | ||
|
||
# Waiting for the rosbag and logs | ||
sleep 3 | ||
|
||
## Compress rosbag | ||
tar -czf rosbag2_autoware.tar.gz rosbag2_autoware | ||
sleep 3 | ||
|
||
## Copy the logs to output directory | ||
echo "Generation of result.json is completed." | ||
cp ~/awsim-logs/result.json /output | ||
cp ~/awsim-logs/verbose_result.json /output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# shellcheck disable=SC1091 | ||
source /aichallenge/autoware/install/setup.bash | ||
sudo ip link set multicast on lo | ||
/aichallenge/simulator/simulator.bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Download the simulator and place it in this directory. | ||
* | ||
!.gitignore | ||
!simulator.bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
echo "write the simulator command here" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
tar zcvf output/aichallenge_submit.tar.gz -C ./aichallenge/autoware/src aichallenge_submit |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
target=${1} | ||
|
||
case "${target}" in | ||
"eval") | ||
opts="--no-cache" | ||
;; | ||
"dev") | ||
opts="" | ||
;; | ||
*) | ||
echo "invalid argument (use 'dev' or 'eval')" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
# shellcheck disable=SC2086 | ||
docker build ${opts} --target "${target}" -t "aichallenge-source-materials-${target}" . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
target=${1} | ||
device=${2} | ||
|
||
case "${target}" in | ||
"eval") | ||
volume="output:/output" | ||
;; | ||
"dev") | ||
volume="output:/output aichallenge:/aichallenge" | ||
;; | ||
*) | ||
echo "invalid argument (use 'dev' or 'eval')" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
case "${device}" in | ||
"cpu") | ||
opts="--device /dev/dri" | ||
;; | ||
"gpu") | ||
opts="--nvidia" | ||
;; | ||
*) | ||
echo "invalid argument (use 'gpu' or 'cpu')" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
mkdir -p output | ||
|
||
# shellcheck disable=SC2086 | ||
rocker ${opts} --x11 --user --net host --privileged --volume ${volume} -- "aichallenge-source-materials-${target}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# This directory will store the evaluation results. | ||
* | ||
!.gitignore |
Oops, something went wrong.