sense_bridge is a ROS 2 (Humble) package that provides utility functions to convert between NumPy arrays and custom EEGBlock messages defined in sense_msgs. It enables the structured EEG data collected to be flattened and transmitted as ROS messages.
- Convert EEG data from NumPy arrays to
EEGBlockmessages and vice versa. - Ensures compatibility with the
sense_eegpublisher and downstream ROS 2 nodes.
Clone the sense-base/base and create the directory workspace/src. Clone sense_bridge package into the workspace/src:
mkdir sense-base && cd sense-base
git clone git@github.com:sense-base/base.git
cd base
mkdir workspace/src
# Clone this sense_bridge repo
git clone git@github.com:sense-base/sense_bridge.git
# Clone the sense_msgs package
git clone git@github.com:sense-base/sense_msgs.gitOpen the sense-base/base folder in VS Code and Reopen in Container when prompted. In the .devcontainer, build the workspace:
colcon build --packages-select eeg_msgs eeg_bridge
source install/setup.bashOnce sourced, you can use the bridge in Python (or in other related packages):
python 3from eeg_bridge.bridge import EEGBridgeTo run the test locally:
cd sense-base/base/workspace/src/sense_bridge
uv pip install ."[dev]"
uv run pytest eeg_bridge/test