Skip to content

Additions of examples#1

Open
ajmhs wants to merge 15 commits intorticommunity:mainfrom
ajmhs:ajmh_additions
Open

Additions of examples#1
ajmhs wants to merge 15 commits intorticommunity:mainfrom
ajmhs:ajmh_additions

Conversation

@ajmhs
Copy link

@ajmhs ajmhs commented Feb 3, 2026

Additions of examples and dockerfiles to the main codebase of the Reference Architecture as discussed.

ajmhs added 2 commits February 3, 2026 12:29
…e the Medtech Reference Architecture.

Add dockerfile scripts which allow for containerization
@ajmhs ajmhs requested a review from franporcel February 3, 2026 16:09
ajmhs added 2 commits February 4, 2026 16:24
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
# 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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 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"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.


export NDDSHOME=~/rti_connext_dds-7.3.0
export PUBLIC_PORT=80
export DOC_ROOT=./wis_root
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
export DOC_ROOT=./wis_root
# export NDDSHOME=~/rti_connext_dds-7.3.0


export NDDSHOME=~/rti_connext_dds-7.3.0
export PUBLIC_PORT=80
export DOC_ROOT=./wis_root
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
export DOC_ROOT=./wis_root
export DOC_ROOT="$(realpath "$(dirname "${BASH_SOURCE[0]}")")/.."

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reformatted the style to align with the modules. I will commit these changes in a doc-only commit.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajmhs I pushed doc-only commit fc19708, please review for accuracy.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reformatted the style to align with the modules. I will commit these changes in a doc-only commit.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajmhs I pushed doc-only commit fc19708, please review for accuracy.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reformatted the style to align with the modules. I will commit these changes in a doc-only commit.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajmhs I pushed doc-only commit fc19708, please review for accuracy.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reformatted the style to align with the modules. I will commit these changes in a doc-only commit.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajmhs I pushed doc-only commit fc19708, please review for accuracy.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reformatted the style to align with the modules. I will commit these changes in a doc-only commit.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajmhs I pushed doc-only commit fc19708, please review for accuracy.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajmhs I pushed doc-only commit fc19708, please review for accuracy.

Comment on lines +97 to +98
[DDS::Writer::Reliability=BEST_EFFORT]
[DDS::Writer::History=KEEP_ALL]
Copy link
Collaborator

@wcoleman-rti wcoleman-rti Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +91 to +92
[DDS::Reader::Reliability=RELIABLE]
[DDS::Reader::History=KEEP_ALL]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be using RELIABLE + KEEP_LAST if we want to align with the DataFlowLibrary::Command qos used for t/MotorControl elsewhere.

Comment on lines +103 to +104
[DDS::Reader::Reliability=RELIABLE]
[DDS::Reader::History=KEEP_ALL]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be using RELIABLE + KEEP_LAST if we want to align with the DataFlowLibrary::Command qos used for t/MotorControl elsewhere.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajmhs I pushed doc-only commit fc19708, please review for accuracy.

Copy link
Collaborator

@wcoleman-rti wcoleman-rti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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).

ajmhs and others added 9 commits February 25, 2026 16:07
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>
…g demo.

Updated xbox & joystick controllers, and telemetry bridge app for commonality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants