Skip to content

Commit fd49716

Browse files
committed
add image streaming demo script and motor failure ratio control for lc_62
1 parent 3707484 commit fd49716

4 files changed

Lines changed: 23 additions & 4 deletions

File tree

docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ RUN mkdir realgazebo
199199
WORKDIR /home/user/realgazebo
200200

201201
#ARG CACHEBUST=1
202-
RUN git clone --branch v1.16.0-1.1.0 https://github.com/SUV-Lab/RealGazebo-PX4.git --recursive \
203-
&& git clone --branch v1.1 https://github.com/SUV-Lab/RealGazebo-ROS2.git --recursive
202+
RUN git clone --branch v1.16.0-1.2.0 https://github.com/SUV-Lab/RealGazebo-PX4.git --recursive \
203+
&& git clone --branch v1.2 https://github.com/SUV-Lab/RealGazebo-ROS2.git --recursive
204204

205205
RUN cd /home/user/realgazebo/RealGazebo-PX4 && ./Tools/setup/ubuntu.sh --no-nuttx
206206

scripts/edit_realgazebo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ docker run ${GPU_OPTION} ${GPU_RUNTIME} -it --privileged \
4646
-v /dev:/dev:rw \
4747
--hostname $(hostname) \
4848
--network host \
49-
--name "$container_name" aware4docker/realgazebo:1.1 bash
49+
--name "$container_name" aware4docker/realgazebo:1.2 bash
5050

scripts/run_image_stream.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
# Demo script for image streaming viewer
3+
# Usage: ./run_image_stream.sh [vehicle_num] [vehicle_type] [camera_type]
4+
# vehicle_num : vehicle index (default: 0)
5+
# vehicle_type : x500 | lc_62 (default: x500)
6+
# camera_type : front | down | ... (default: front)
7+
8+
VEHICLE_NUM=${1:-0}
9+
VEHICLE_TYPE=${2:-x500}
10+
CAMERA_TYPE=${3:-front}
11+
12+
docker exec -it -u user realgazebo bash -c \
13+
"source /opt/ros/jazzy/setup.bash && \
14+
source /home/user/realgazebo/RealGazebo-ROS2/install/setup.bash && \
15+
ros2 run image_viewer image_viewer \
16+
--ros-args \
17+
-p vehicle_num:=${VEHICLE_NUM} \
18+
-p vehicle_type:=${VEHICLE_TYPE} \
19+
-p camera_type:=${CAMERA_TYPE}"

scripts/run_realgazebo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ docker run ${GPU_OPTION} ${GPU_RUNTIME} -d -it --privileged \
133133
-v /dev:/dev:rw \
134134
--hostname $(hostname) \
135135
--network host \
136-
--name "$container_name" aware4docker/realgazebo:1.1
136+
--name "$container_name" aware4docker/realgazebo:1.2
137137

138138
docker cp "$CONFIG_FILE" "$container_name":/home/user/
139139

0 commit comments

Comments
 (0)