Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
Added docker-compose.yml with needed Firos-Configuration
Browse files Browse the repository at this point in the history
This docker-compose.yml is an example setup of Firos via docker.
Needed is a whitelist, a robots.json and additional Message-Definitions,
which are not provided by ros:melodic-ros-core-bionic
  • Loading branch information
Luxxii committed Apr 10, 2019
1 parent d62a87e commit 2efa64b
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docker/Dockerfile
Expand Up @@ -42,6 +42,8 @@ RUN apt-get update && apt-get install -y ros-melodic-ros-base python python-pip
RUN pip install -r ./src/firos/requirements.txt
RUN /bin/bash -c '. /opt/ros/melodic/setup.bash; catkin_make'


EXPOSE 10100
CMD /bin/bash -c '. /opt/ros/melodic/setup.bash; . /catkin_ws/devel/setup.bash; rosrun firos core.py'


Expand Down
44 changes: 44 additions & 0 deletions docker/docker-compose.yml
@@ -0,0 +1,44 @@
services:
firos:
build:
context: ".."
dockerfile: docker/Dockerfile
container_name: firos
depends_on:
- orion
- rosmaster
environment:
- PYTHONUNBUFFERED=1
- "ROS_MASTER_URI=http://rosmaster:11311"
image: "firos:localbuild"
ports:
- "10100:10100"
volumes:
- "./docker-config/robots.json:/catkin_ws/src/firos/config/robots.json"
- "./docker-config/whitelist.json:/catkin_ws/src/firos/config/whitelist.json"

mongo:
command: "--nojournal"
container_name: mongo
image: "mongo:3.4"

orion:
command: "-dbhost mongo"
container_name: orion
image: fiware/orion
links:
- mongo
ports:
- "1026:1026"

rosmaster:
command:
- roscore
container_name: rosmaster
hostname: rosmaster
image: "ros:melodic-ros-core"
ports:
- "11311:11311"


version: "3"
14 changes: 14 additions & 0 deletions docker/docker-config/robots.json
@@ -0,0 +1,14 @@
{
"turtle1": {
"topics": {
"cmd_vel": {
"msg": "geometry_msgs.msg.Twist",
"type": "publisher"
},
"pose": {
"msg": "turtlesim.msg.Pose",
"type": "subscriber"
}
}
}
}
7 changes: 7 additions & 0 deletions docker/docker-config/whitelist.json
@@ -0,0 +1,7 @@
{
"turtle1": {
"publisher": ["cmd_vel"],
"subscriber": ["pose"]
}

}

0 comments on commit 2efa64b

Please sign in to comment.