Skip to content

Commit e6b7941

Browse files
ancker1Emil Vincent Ancker
andauthored
Specify container IP addresses for testing purposes
Before, the default Docker network in the range 172.17.0.0/16 was used. Since a specific IP cannot be chosen/guaranteed within this range, a network is now created with range 192.168.0.0/16, which allows for assigning specific IPs to the containers. Co-authored-by: Emil Vincent Ancker <[email protected]>
1 parent 1d3e8e6 commit e6b7941

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

.github/dockerursim/build_and_run_docker_ursim.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22

33
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
44

5+
docker network create --subnet=192.168.0.0/16 static_test_net
56

67
docker build ${DIR} -t mydockerursim
78
docker volume create dockerursim
89
docker run --name="mydockerursim" -d \
910
-e ROBOT_MODEL=UR5 \
11+
--net static_test_net \
12+
--ip 192.168.56.101 \
1013
-p 8080:8080 \
1114
-p 29999:29999 \
1215
-p 30001-30004:30001-30004 \

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ jobs:
2121
- ROS_DISTRO: kinetic
2222
UPSTREAM_WORKSPACE: .ci.rosinstall
2323
ROS_REPO: main
24-
DOCKER_RUN_OPTS: --network bridge
25-
BEFORE_INIT: 'apt-get update -qq && apt-get install -y iproute2 iputils-ping && ip addr && ping -c5 172.17.0.2'
24+
DOCKER_RUN_OPTS: --network static_test_net
25+
BEFORE_INIT: 'apt-get update -qq && apt-get install -y iproute2 iputils-ping && ip addr && ping -c5 192.168.56.101'
2626
IMMEDIATE_TEST_OUTPUT: true
2727
- ROS_DISTRO: melodic
2828
UPSTREAM_WORKSPACE: .ci.rosinstall
2929
ROS_REPO: main
30-
DOCKER_RUN_OPTS: --network bridge
31-
BEFORE_INIT: 'apt-get update -qq && apt-get install -y iproute2 iputils-ping && ip addr && ping -c5 172.17.0.2'
30+
DOCKER_RUN_OPTS: --network static_test_net
31+
BEFORE_INIT: 'apt-get update -qq && apt-get install -y iproute2 iputils-ping && ip addr && ping -c5 192.168.56.101'
3232
IMMEDIATE_TEST_OUTPUT: true
3333

3434
steps:

ur_robot_driver/test/driver.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
-->
66

77
<include file="$(find ur_robot_driver)/launch/ur5e_bringup.launch">
8-
<arg name="robot_ip" value="172.17.0.2"/>
8+
<arg name="robot_ip" value="192.168.56.101"/>
99
<arg name="headless_mode" value="true"/>
1010
</include>
1111

ur_robot_driver/test/test_rtde_client.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
using namespace ur_driver;
2020

21-
const std::string ROBOT_IP = "172.17.0.2";
21+
const std::string ROBOT_IP = "192.168.56.101";
2222

2323
TEST(UrRobotDriver, rtde_handshake)
2424
{

0 commit comments

Comments
 (0)