Skip to content

Commit 958f747

Browse files
committed
added docker support
1 parent e84a2c2 commit 958f747

3 files changed

Lines changed: 41 additions & 1 deletion

File tree

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,28 @@ pip3 install roslibpy
1515
https://pypi.python.org/pypi/service_identity
1616
```
1717

18+
## Building docker image
19+
```bash
20+
sudo docker build -t rosgraph_monitor:0.1 .
21+
sudo docker run -it rosgraph_monitor:0.1
22+
//once inside the image
23+
roscore
24+
```
25+
In a new terminal
26+
```bash
27+
sudo docker ps -l
28+
// check for NAMES
29+
sudo docker exec -it NAME bash
30+
//once inside the image
31+
source /graph_ws/devel/setup.bash
32+
rosrun rosgraph_monitor monitor
33+
```
34+
35+
1836
## Running the system
1937
```
2038
roslaunch rosbridge_server rosbridge_websocket.launch
2139
roslaunch rosgraph_monitor demo.launch
2240
python3 src/rosgraph_monitor/nav_model.py
2341
rosservice call /load_observer "name: 'NavObserver'"
24-
```
42+
```

docker/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM osrf/ros:melodic-desktop-bionic
2+
3+
RUN apt-get update \
4+
&& apt-get install -y git \
5+
python-catkin-tools
6+
7+
RUN mkdir -p /graph_ws/src
8+
WORKDIR /graph_ws/src
9+
RUN git clone --depth=1 -b nav_observer https://github.com/ipa-hsd/rosgraph_monitor/
10+
RUN git clone --depth=1 -b SoSymPaper https://github.com/ipa-nhg/ros_graph_parser
11+
12+
WORKDIR /graph_ws/
13+
RUN rosdep install --from-paths src --ignore-src -r -y
14+
RUN . /opt/ros/melodic/local_setup.sh \
15+
&& catkin build \
16+
&& . devel/local_setup.sh

docker/ros_entrypoint.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
# setup ros environment
5+
source "graph_ws/devel/setup.bash"
6+
exec "$@"

0 commit comments

Comments
 (0)