From aa003b8766028695317c286baa7e5e23dd7b4ea8 Mon Sep 17 00:00:00 2001 From: dirksavage88 Date: Fri, 9 Aug 2024 14:25:30 -0400 Subject: [PATCH 1/2] implement hardware rendering (fixes #159) Signed-off-by: dirksavage88 --- space_robots/Dockerfile | 4 ++-- space_robots/run.sh | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/space_robots/Dockerfile b/space_robots/Dockerfile index 561802c..2a7b389 100644 --- a/space_robots/Dockerfile +++ b/space_robots/Dockerfile @@ -48,7 +48,7 @@ ARG DEBIAN_FRONTEND=noninteractive # the cache won't make it into the built image but will be maintained between steps. RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ - sudo apt-get update -y && sudo apt-get install -y python3-rosinstall-generator + sudo apt-get update -y && sudo apt-get install -y python3-rosinstall-generator libgl1-mesa-glx libgl1-mesa-dri # TODO(anyone): remove demo-pkgs.txt, no packages left after exclusions # Generate repos file for demo dependencies, excluding packages from Space ROS core. @@ -83,7 +83,7 @@ RUN cd mongo-cxx-driver-r3.6.7/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCM # Get the source for the dependencies # RUN vcs import src < /tmp/demo_generated_pkgs.repos COPY --chown=${USERNAME}:${USERNAME} demo_manual_pkgs.repos /tmp/ -RUN vcs import src < /tmp/demo_manual_pkgs.repos && /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' +RUN vcs import src < /tmp/demo_manual_pkgs.repos && /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ diff --git a/space_robots/run.sh b/space_robots/run.sh index 39c9993..1d4c358 100755 --- a/space_robots/run.sh +++ b/space_robots/run.sh @@ -13,4 +13,6 @@ CONTAINER_NAME="$(tr '/' '_' <<< "$IMG_NAME")" # Start the container docker run --rm -it --name $CONTAINER_NAME --network host \ + --volume=/tmp/.X11-unix:/tmp/.X11-unix\ + --device=/dev/dri:/dev/dri \ -e DISPLAY -e TERM -e QT_X11_NO_MITSHM=1 $IMG_NAME From a863d048c055722f9145350f96ec2d0f78703cee Mon Sep 17 00:00:00 2001 From: dirksavage88 Date: Wed, 11 Sep 2024 05:02:05 -0400 Subject: [PATCH 2/2] add foxglove config Signed-off-by: dirksavage88 --- space_robots/curiosity_foxglove.json | 83 ++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 space_robots/curiosity_foxglove.json diff --git a/space_robots/curiosity_foxglove.json b/space_robots/curiosity_foxglove.json new file mode 100644 index 0000000..2c30df5 --- /dev/null +++ b/space_robots/curiosity_foxglove.json @@ -0,0 +1,83 @@ +{ + "configById": { + "CallService!26i0ivb": { + "requestPayload": "{}", + "layout": "vertical", + "timeoutSeconds": 10, + "serviceName": "/close_arm", + "buttonText": "Close Arm", + "buttonColor": "#000000" + }, + "Image!2h1h9is": {}, + "CallService!n2xdj1": { + "requestPayload": "{}", + "layout": "vertical", + "timeoutSeconds": 10, + "serviceName": "/move_forward", + "buttonText": "Forward", + "buttonColor": "#000000" + }, + "CallService!40l6rnm": { + "requestPayload": "{}", + "layout": "vertical", + "timeoutSeconds": 10, + "serviceName": "/turn_left", + "buttonText": "Left", + "buttonColor": "#000000" + }, + "CallService!3kc2rth": { + "requestPayload": "{}", + "layout": "vertical", + "timeoutSeconds": 10, + "serviceName": "/move_stop", + "buttonText": "Stop", + "buttonColor": "#000000" + }, + "CallService!3qfcuxh": { + "requestPayload": "{}", + "layout": "vertical", + "timeoutSeconds": 10, + "serviceName": "/turn_right", + "buttonText": "Right", + "buttonColor": "#000000" + }, + "CallService!16vat9y": { + "requestPayload": "{}", + "layout": "vertical", + "timeoutSeconds": 10, + "serviceName": "/open_arm", + "buttonText": "Open Arm", + "buttonColor": "#000000" + } + }, + "globalVariables": {}, + "userNodes": {}, + "playbackConfig": { + "speed": 1 + }, + "layout": { + "first": { + "first": "CallService!26i0ivb", + "second": "CallService!16vat9y", + "direction": "row" + }, + "second": { + "first": "Image!2h1h9is", + "second": { + "first": { + "first": "CallService!n2xdj1", + "second": "CallService!40l6rnm", + "direction": "column" + }, + "second": { + "first": "CallService!3kc2rth", + "second": "CallService!3qfcuxh", + "direction": "column" + }, + "direction": "row" + }, + "direction": "row" + }, + "direction": "column" + } +} \ No newline at end of file