Conversation
…e the Medtech Reference Architecture. Add dockerfile scripts which allow for containerization
Integrated Vector CANoe example/demo and created README. Updated examples README
| # | ||
| # To run the Docker container, run the following command: | ||
| # | ||
| # docker run --rm -it --network host -e DISPLAY -e SDL_AUDIODRIVER=dummy --device=/dev/ttyUSB0 --privileged --hostname rtimedtech -v $XAUTHORITY:/root/.Xauthority -v /tmp/.X11-unix:/tmp/.X11-unix -v $RTI_LICENSE_FILE:/root/rti_license.dat connext:medtech_ra bash |
There was a problem hiding this comment.
I did not have $XAUTHORITY set in my env so this command failed for me. After some brief research I found that $HOME/.Xauthority worked for me for a host-side value in the volume mount.
| # docker run --rm -it --network host -e DISPLAY -e SDL_AUDIODRIVER=dummy --device=/dev/ttyUSB0 --privileged --hostname rtimedtech -v $XAUTHORITY:/root/.Xauthority -v /tmp/.X11-unix:/tmp/.X11-unix -v $RTI_LICENSE_FILE:/root/rti_license.dat connext:medtech_ra bash | |
| # docker run --rm -it --network host -e DISPLAY -e SDL_AUDIODRIVER=dummy --device=/dev/ttyUSB0 --privileged --hostname rtimedtech -v $HOME/.Xauthority:/root/.Xauthority -v /tmp/.X11-unix:/tmp/.X11-unix -v $RTI_LICENSE_FILE:/root/rti_license.dat connext:medtech_ra bash |
There was a problem hiding this comment.
Long term, it may make sense to use a docker compose file to define all the options. I don't think this is necessary at this time.
There was a problem hiding this comment.
I tried that change but it doesn't work for me in my environment. There's a difference between $XAUTHORITY which resolves to /run/user/10633/.mutter-Xwaylandauth.FNAYK3 on my box. I think if Docker is being used, then it's running as root which might cause some issues when sharing a user level xauth. Probably the best way forward is to point the user to a definitive article online. (I'm looking for one)
| # The --device=/dev/ttyUSB0 option is used to give the container access to the USB device (e.g., joystick or xbox controller). | ||
| # The --privileged option is used to give the container additional privileges. | ||
| # The --hostname option is used to set the hostname of the container to rtimedtech. | ||
| # The -v $XAUTHORITY:/root/.Xauthority option is used to mount the X11 authentication file from the host to the container. |
There was a problem hiding this comment.
| # The -v $XAUTHORITY:/root/.Xauthority option is used to mount the X11 authentication file from the host to the container. | |
| # The -v $HOME/.Xauthority:/root/.Xauthority option is used to mount the X11 authentication file from the host to the container. |
| # | ||
| # To run the Docker container, run the following command: | ||
| # | ||
| # docker run --rm -it --network host -e DISPLAY --privileged --hostname rtimedtech -v $XAUTHORITY:/root/.Xauthority -v /tmp/.X11-unix:/tmp/.X11-unix -v $RTI_LICENSE_FILE:/root/rti_license.dat connext:medtech_ra bash |
There was a problem hiding this comment.
| # docker run --rm -it --network host -e DISPLAY --privileged --hostname rtimedtech -v $XAUTHORITY:/root/.Xauthority -v /tmp/.X11-unix:/tmp/.X11-unix -v $RTI_LICENSE_FILE:/root/rti_license.dat connext:medtech_ra bash | |
| # docker run --rm -it --network host -e DISPLAY --privileged --hostname rtimedtech -v $HOME/.Xauthority:/root/.Xauthority -v /tmp/.X11-unix:/tmp/.X11-unix -v $RTI_LICENSE_FILE:/root/rti_license.dat connext:medtech_ra bash |
| # The -e DISPLAY option is used to set the DISPLAY environment variable in the container to the host's DISPLAY variable. | ||
| # The --privileged option is used to give the container additional privileges. | ||
| # The --hostname option is used to set the hostname of the container to rtimedtech. | ||
| # The -v $XAUTHORITY:/root/.Xauthority option is used to mount the X11 authentication file from the host to the container. |
There was a problem hiding this comment.
| # The -v $XAUTHORITY:/root/.Xauthority option is used to mount the X11 authentication file from the host to the container. | |
| # The -v $HOME/.Xauthority:/root/.Xauthority option is used to mount the X11 authentication file from the host to the container. |
| [submodule "resource/cmake/rticonnextdds-cmake-utils"] | ||
| path = resource/cmake/rticonnextdds-cmake-utils | ||
| url = https://github.com/rticommunity/rticonnextdds-cmake-utils | ||
| [submodule "examples/lss_robot/LSS_Library_Python"] |
There was a problem hiding this comment.
For some reason the submodule didn't get added to the git index (maybe not committed?), so git submodule update --init ... didn't pull in the LSS submodule. I used this to add the submodule locally, but examples/lss_robot/LSS_Library_Python just needs to be committed.
git submodule add -f https://github.com/Lynxmotion/LSS_Library_Python.git examples/lss_robot/LSS_Library_Python
README.md
Outdated
|
|
||
| Check out the the [system_arch](./system_arch/) folder, where the system architecture artifacts live and are covered in more depth! | ||
|
|
||
| Also see the [examples](./examples/README.md) folder for runnable, hands-on examples (Joystick, XBox, LSS Robot, Telemetry Bridge, and WIS) that demonstrate devices and services acting as first-class citizens in the reference architecture. |
There was a problem hiding this comment.
I think this is fine to leave here for now, but I want to eventually move all the examples into modules, offering more of a guided workflow/experience.
examples/WIS/scripts/variables.sh
Outdated
|
|
||
| export NDDSHOME=~/rti_connext_dds-7.3.0 | ||
| export PUBLIC_PORT=80 | ||
| export DOC_ROOT=./wis_root |
There was a problem hiding this comment.
NDDSHOME should already be set in the environment by the user (e.g. running the rtisetenv script), we don't want to override it here.
| export DOC_ROOT=./wis_root | |
| # export NDDSHOME=~/rti_connext_dds-7.3.0 |
examples/WIS/scripts/variables.sh
Outdated
|
|
||
| export NDDSHOME=~/rti_connext_dds-7.3.0 | ||
| export PUBLIC_PORT=80 | ||
| export DOC_ROOT=./wis_root |
There was a problem hiding this comment.
Not sure if the WIS example subfolder was copied elsewhere but this was required for me to get the docroot to be applied for my local machine without hardcoding a path.
| export DOC_ROOT=./wis_root | |
| export DOC_ROOT="$(realpath "$(dirname "${BASH_SOURCE[0]}")")/.." |
There was a problem hiding this comment.
I reformatted the style to align with the modules. I will commit these changes in a doc-only commit.
There was a problem hiding this comment.
I reformatted the style to align with the modules. I will commit these changes in a doc-only commit.
There was a problem hiding this comment.
I reformatted the style to align with the modules. I will commit these changes in a doc-only commit.
There was a problem hiding this comment.
I reformatted the style to align with the modules. I will commit these changes in a doc-only commit.
There was a problem hiding this comment.
I reformatted the style to align with the modules. I will commit these changes in a doc-only commit.
There was a problem hiding this comment.
I would like to incorporate this back into the system arch - a separate "telemetry" domain that is isolated from critical teleop/control. I will note this as a todo item.
There was a problem hiding this comment.
I reformatted the style to align with the modules. I will commit these changes in a doc-only commit.
I added a section on "setup" - this should be reviewed for accuracy.
| [DDS::Writer::Reliability=BEST_EFFORT] | ||
| [DDS::Writer::History=KEEP_ALL] |
There was a problem hiding this comment.
I'm unfamiliar with CANoe vCDL, but BEST_EFFORT + KEEP_ALL doesn't usually make sense. For telemetry data, we may want BEST_EFFORT + KEEP_LAST.
| [DDS::Reader::Reliability=RELIABLE] | ||
| [DDS::Reader::History=KEEP_ALL] |
There was a problem hiding this comment.
We should be using RELIABLE + KEEP_LAST if we want to align with the DataFlowLibrary::Command qos used for t/MotorControl elsewhere.
| [DDS::Reader::Reliability=RELIABLE] | ||
| [DDS::Reader::History=KEEP_ALL] |
There was a problem hiding this comment.
We should be using RELIABLE + KEEP_LAST if we want to align with the DataFlowLibrary::Command qos used for t/MotorControl elsewhere.
wcoleman-rti
left a comment
There was a problem hiding this comment.
@ajmhs I made a first pass review. Mostly doc styling changes to the readmes, but a few minor tweaks to variables/config to get things running on my machine.
Please review the suggestions I made and if they're valuable to include, or would break your setup for demoing purposes (in which case we should more clearly document setup expectations and exceptions).
Co-authored-by: wcoleman-rti <108848592+wcoleman-rti@users.noreply.github.com>
Co-authored-by: wcoleman-rti <108848592+wcoleman-rti@users.noreply.github.com>
Co-authored-by: wcoleman-rti <108848592+wcoleman-rti@users.noreply.github.com>
Co-authored-by: wcoleman-rti <108848592+wcoleman-rti@users.noreply.github.com>
Co-authored-by: wcoleman-rti <108848592+wcoleman-rti@users.noreply.github.com>
Co-authored-by: wcoleman-rti <108848592+wcoleman-rti@users.noreply.github.com>
Co-authored-by: wcoleman-rti <108848592+wcoleman-rti@users.noreply.github.com>
… POSIX compliant option
…g demo. Updated xbox & joystick controllers, and telemetry bridge app for commonality.
Additions of examples and dockerfiles to the main codebase of the Reference Architecture as discussed.