GithubHelp home page GithubHelp logo

wearable-biosensors-ros2's Introduction

Usage:

  1. Wet polarh10 strap, affix high on chest, and click the device into place
  2. Optionally check if it is discoverable on your phone to make sure it is on (make sure it is NOT CONNECTED TO ANY OTHER DEVICES but is discoverable)
  3. Press the VRespBelt power button once. It should flash RED.
  • The script can only connect to the device if it is in this state. Flashing green is not sufficient.
  • If VResbpBelt connection is lost, the script will throw an error and restart… in this case: HOLD THE POWER BUTTON UNTIL ALL LIGHTS TURN OFF, THEN RE-RUN STEP 2
  • The script will ideally re-establish a connection.
  1. Ensure that the check-mark has a green light. If there is no light, tighten strap. If there is red light, loosen strap.
  2. Turn on Rpi, and check for topics to come alive within the next minute.

Installation:

  1. Install ROS2 and all relevant packages on the Rpi. Necessary packages are listed below:
  • crontab
  • gdx
  • pexpect
  • godirect
  • pigpiod
  • Rpi.GPIO
  • Potential missing dependencies (pls notify me)
  1. Change relevant device name variables in polar_h10 and vernier_respiration_belt nodes
  • The vernier says its ID in the necessary format on the hardware
  • You must connect to the polarh10 to find its bluetooth address in the desired format (make sure to forget the device after this)
  1. (Optional) Setup your ~/.bashrc to also source all necessary libraries for troubleshooting and testing
  2. Ensure that your Rpi is on the router network to access published data remotely
  3. Configure the script.sh to run on Rpi startup using crontab:
  • $ crontab -e
  • Add the following line to the document (if prompted, just choose nano as your editor): @reboot /home/username/wearable-biosensors-ros2.script.sh
  • might need to run: chmod +x ~/wearable-biosensors-ros2/startup_script.sh
  1. Setup pigpio w/ daemon
  • sudo apt-get update
  • sudo apt-get install -y gcc make python3-dev python3-setuptools
  • cd /tmp
  • git clone https://github.com/joan2937/pigpio.git
  • cd pigpio
  • make
  • sudo make install
  • sudo systemctl enable pigpiod
  • sudo systemctl start pigpiod
  • pip install pigpio
  1. Give sudo control to user to enable shutdown button and pigpiodaemon
  • sudo visudo
  • Below %sudo ALL=(ALL:ALL) ALL, insert:
  • <your_username> ALL=(ALL) NOPASSWD: /sbin/shutdown
  • <your_username> ALL=(ALL) NOPASSWD: /usr/local/bin/pigpiod
  1. Restart Rpi (with above usage information in action) and check ROS topics to ensure that your setup works
  2. Test bag output into the /wearable-biosensors-ros2/ros_bags folder if this is important to you
  3. Outstanding question of whether or not the bags are corrupted by a sudden power-off

THE FOLLOWING IS OLD PACKAGE RELATED INFORMATION TO RUN BASIC ROS2 FUNCTIONALITY For vernier respiration belt

ros2 run vernier_respiration_belt vernier_respiration_belt_node

** This might fail sometimes, try to run this again to make it work.

You can also use the launch file to run the device

ros2 launch vernier_respiration_belt ros2-vernier_respiration_belt.launch.py

To view bpm data,

ros2 topic echo /biosensors/vernier_respiration_belt/bpm

For polar h10, You will have to connect the polar h10 to your laptop manually via bluetooth

ros2 run polar_h10 polar_h10_node

In case of failures, turn the bluetooth OFF and ON or even try forgetting the device and pair it again and run the above node again.

You can also use the launch file to run the device

ros2 launch polar_h10 ros2-polar_h10.launch.py

To view hr data,

ros2 topic echo /biosensors/polar_h10/hr

You can view the below screen recording for reference

Screen recording for running docker and sensors

For more details refer the below document

Biosensors Usage

Original REAMDE

ros2-foxy-wearable-biosensors

Wearable biosensors enable continuous human data capture, facilitating the development of real-world Human-Robot Interaction (HRI) systems. However, a lack of standardized libraries and implementations add extraneous complexity to HRI system designs, and preclude collaboration across disciplines and institutions. Here, we propose a novel wearable biosensor package for the Robot Operating System 2 (ROS 2). The package standardizes biosensor HRI integration, lowers the technical barrier of entry, and expands the biosensor ecosystem in the robotics field. Each biosensor package node follows a generalized node and topic structure concentrated on ease of use. Current package capabilities, listed by the biosensor, highlight package standardization. Collected example data demonstrates integration of each biosensor into ROS 2. Standardization of a biosensors package for ROS 2 will greatly simplify use and cross-collaboration across many disciplines.

Requirements

$ pip3 install open-e4-client pexpect websocket-client

Installation

$ cd ~
$ source /opt/ros/foxy/setup.bash
$ git clone https://github.com/SMARTlab-Purdue/ros2-foxy-wearable-biosensors.git
$ cd ros2-foxy-wearable-biosensors
$ colcon build --symlink-install
$ source install/setup.bash

Supported Wearable Biosensors

v0.0.1, updated on Sep.11th 2021.

  1. Empatica E4 wristband
  2. Emotiv Insight
  3. Shimmer3-GSR Unit+
  4. Polar H10
  5. Vernier Respiration Belt
  6. Zephyr Bioharness
  7. TBD (will be added new sensors on v0.0.2)

Contributors

Wonse Jo, Jaeeun Kim, and Dr. Byung-Cheol Min are with SMART Lab, Department of Computer and Information Technology, Purdue University, West Lafayette, IN 47907, USA.



Purdue University


🌍Wonse Jo
Ph.D. Candidate
[email protected]

🌍Jaeeun Kim
Undergradute
[email protected]

🌍Dr. Byung-Cheol Min
Director
[email protected]

Dr. Robert Wilson, and Dr. Steve McGuire are with HARE Lab, Department of Electrical and Computer Engineering, University of California Santa Cruz, Santa Cruz, CA 95064, USA.



University of California,
Santa Cruz

🌍Dr. Robert Wilson
PostDoc. researcher
[email protected]

🌍Dr. Steve McGuire
Director
[email protected]

(TBD) We are looking for new contributors to expand the biosensor ecosystem on ROS 2 environment. Please contact us if you are interested.






🌍TBD
(TBD)position
[email protected]

🌍TBD
(TBD)position
[email protected]

Acknowledgements

This material is based upon work supported by the National Science Foundation under Grant No. IIS-1846221 and by DARPA under grant HR0011-18-2-0043. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation or DARPA.

wearable-biosensors-ros2's People

Contributors

jj5421 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.