diff --git a/config/config-a-docker.yaml b/config/config-a-docker.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6ad1378bac6728b6021a273fda9afff2aad9b495 --- /dev/null +++ b/config/config-a-docker.yaml @@ -0,0 +1,5 @@ +mqttHost: "mosquitto" +filenameRegions: "src/main/resources/regions-a-placeworld.json" +forA: + filenameInitialScene: "src/main/resources/config-scene-a-placeworld.json" +coordinatorMqttTopicPrefix: "coordinating/rag-a" diff --git a/config/config-b-docker.yaml b/config/config-b-docker.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5ea81083e1e96a3ee01ee5166e6fc94190beb10f --- /dev/null +++ b/config/config-b-docker.yaml @@ -0,0 +1,9 @@ +mqttHost: "mosquitto" +filenameRegions: "src/main/resources/regions-b-placeworld.json" +forB: + topicsSceneUpdate: + - "/ceti_cell_placeworld/scene/update" + - "/ceti_cell_2_placeworld/scene/update" + topicCommand: "/ceti_cell_placeworld/command" + filenameReachability: "src/main/resources/reachability-b-placeworld.json" +coordinatorMqttTopicPrefix: "coordinating/rag-b" diff --git a/config/mosquitto.conf b/config/mosquitto.conf new file mode 100644 index 0000000000000000000000000000000000000000..40dd92b9ec719904784b85a8de35c26dc89fc18d --- /dev/null +++ b/config/mosquitto.conf @@ -0,0 +1,5 @@ +# This is a Mosquitto configuration file that creates a listener on port 1883 +# that allows unauthenticated access. + +listener 1883 +allow_anonymous true diff --git a/ros3rag.coordinator b/config/ros3rag.coordinator similarity index 100% rename from ros3rag.coordinator rename to config/ros3rag.coordinator diff --git a/config/web-config.yaml b/config/web-config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7a826981b815423bb26005874018a178ab81712a --- /dev/null +++ b/config/web-config.yaml @@ -0,0 +1,3 @@ +image_directory: "/shared_directory_images" +mqtt_server: "mosquitto" +docker: true diff --git a/docker-compose.yml b/docker-compose.yml index e71c853d764cd339c70b8060eb945dcc620cb13d..f656f093c5d86f11843480b96f98a4a16a7fe4aa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,65 +1,73 @@ version: '3' services: - ros_core: - build: . - network_mode: host - user: "user" - command: ['roscore'] + # ros_core: + # build: "robotic-controller" + # user: "user" + # command: ['/entrypoint.sh', 'roscore'] - ros_place_a: - build: . - network_mode: host - user: "user" - # TODO: update command - command: ['rosrun', 'cgv_connector', 'dummy_rag_connector'] + # ros_place_a: + # build: "robotic-controller" + # user: "user" + # # TODO: update command + # command: ['/entrypoint.sh', 'rosrun', 'cgv_connector', 'dummy_rag_connector'] ros_place_b1: - build: . - network_mode: host + build: "robotic-controller" user: "user" - # TODO: update command - command: ['rosrun', 'cgv_connector', 'dummy_rbg_connector'] + command: ['/entrypoint.sh', 'roslaunch', 'ccf_immersive_sorting', 'noop-sim-cell_ceti-table-1-placeworld.launch'] - ros_place_b1: - build: . - network_mode: host - user: "user" - # TODO: update command - command: ['rosrun', 'cgv_connector', 'dummy_rbg_connector'] + ros_place_b2: + build: "robotic-controller" + command: ['/entrypoint.sh', 'roslaunch', 'ccf_immersive_sorting', 'noop-sim-cell_ceti-table-2-placeworld.launch'] + volumes: + - "/tmp/.X11-unix:/tmp/.X11-unix:rw" + - "/tmp/.docker.xauth:/tmp/.docker.xauth:rw" + environment: + - "XAUTHORITY=/tmp/.docker.xauth" + - "DISPLAY=$DISPLAY" + devices: + - "/dev/dri" + user: "ros" coordinator: build: coordinator - network_mode: host volumes: - - "./coordinator/examples/ros3rag.coordinator:/config.coordinator" + # - "./coordinator/examples/ros3rag.coordinator:/config.coordinator" + - "./config/ros3rag.coordinator:/config.coordinator" # TODO: remove --dry-run entrypoint: ["/bin/bash", "-c", "./build/install/coordinator/bin/coordinator /config.coordinator --dry-run"] rag_place_a: build: ros3rag - network_mode: host environment: - "TARGET=ros3rag.placeA" + - "CONFIG_FILE=/ros3rag/config-a-docker.yaml" + volumes: + - "./config/config-a-docker.yaml:/ros3rag/config-a-docker.yaml" rag_place_b: build: ros3rag - network_mode: host environment: - "TARGET=ros3rag.placeB" + - "CONFIG_FILE=/ros3rag/config-b-docker.yaml" + volumes: + - "./shared_directory_images:/ros3rag/ros3rag.placeB/images" + - "./config/config-b-docker.yaml:/ros3rag/config-b-docker.yaml" - web_rag: + web: build: web-ros3rag - network_mode: host + volumes: + - "./shared_directory_images:/shared_directory_images" + - "./config/web-config.yaml:/app/config.yaml" ports: - "8050:8050" mosquitto: image: eclipse-mosquitto container_name: mqtt - network_mode: host restart: unless-stopped - # volumes: - # - ./docker/mosquitto.conf:/mosquitto/config/mosquitto.conf - ports: - - "1883:1883" - - "9001:9001" + volumes: + - ./config/mosquitto.conf:/mosquitto/config/mosquitto.conf + # ports: + # - "41883:1883" + # - "49001:9001" diff --git a/robotic-controller/Dockerfile b/robotic-controller/Dockerfile index 798ad636735024057bfb1f24a9082f0f8172d2dc..79f054ad6c7590de8bca96712360e02bf9cc5b01 100644 --- a/robotic-controller/Dockerfile +++ b/robotic-controller/Dockerfile @@ -1,5 +1,7 @@ FROM ros:noetic-ros-core +RUN sed -i 's/^deb/deb [trusted=yes]/' /etc/apt/sources.list.d/ros1-latest.list + # update and install dependencies RUN apt-get update && apt-get upgrade -y && apt-get install -y \ python3-osrf-pycommon \ @@ -40,6 +42,8 @@ RUN apt-get install -y \ ros-noetic-moveit-ros-visualization \ ros-noetic-joint-state-publisher-gui +RUN apt-get install -y \ + libnng1 libnng-dev ENV HOME /home/user RUN useradd --create-home --home-dir $HOME user && chmod -R u+rwx $HOME && chown -R user:user $HOME @@ -54,7 +58,7 @@ RUN rosdep update # temporary switch to root to be able to install the ROS package dependencies of the workspace USER root -RUN rosdep install --from-paths ${HOME}/catkin_ws -i -y +RUN rosdep install --from-paths ${HOME}/catkin_ws -i -y -r USER user RUN ls -al /home/user diff --git a/ros3rag b/ros3rag index eafdc0741cba0abb82a88c295d1a3d365ef2a04b..31974114f8867e38907a5100ad0b9a33f78aa076 160000 --- a/ros3rag +++ b/ros3rag @@ -1 +1 @@ -Subproject commit eafdc0741cba0abb82a88c295d1a3d365ef2a04b +Subproject commit 31974114f8867e38907a5100ad0b9a33f78aa076 diff --git a/web-ros3rag b/web-ros3rag index 28f4dd83d8cd993c8a94bc129c85439048f24d90..525211869b81bbaaab0e56f267dd5c831f709720 160000 --- a/web-ros3rag +++ b/web-ros3rag @@ -1 +1 @@ -Subproject commit 28f4dd83d8cd993c8a94bc129c85439048f24d90 +Subproject commit 525211869b81bbaaab0e56f267dd5c831f709720