Skip to content

Python based ROS2 Humble driver for CMS-50D-PLUS (Pulox PO-250) device

Notifications You must be signed in to change notification settings

AndreasZachariae/cms50dplus_ros2_driver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python and ROS2 Driver for the pulse oximeter Contec CMS-50D-PLUS / Pulox PO-250

This driver will retrieve BPM, SpO2, and waveform values in realtime via a usb seriallink to a linux host system. There is a standalone python version as well as a ROS2 Humble node. The data visualization tool PlotJuggler allows for viewing the live data.

How to start

Standalone python script (This may also work on Windows)

# requirements
pip3 install pyserial

# find USB port number
sudo dmesg

# start as python script
sudo python3 cms50dplus.py /dev/ttyUSB0

Start in docker container and with ROS2 Humble support

# build container once
source build_docker.sh

# run container
source start_docker.sh
ros2 launch cms50dplus_ros2_driver driver.launch.py

Start PlotJuggler for data visualization

# attach new shell to container
docker exec -it cms50dplus_ros2_driver bash
# launch plotjuggler
ros2 run plotjuggler plotjuggler
# or with saved layout configuration
ros2 run plotjuggler plotjuggler -n -l ~/ros2_ws/src/cms50dplus_ros2_driver/ros2/config/plotjuggler.xml

Further ressources

  • This documentation seems to be most accurate for the model version I have (not everything matches)
  • Inital repo this work is based on
  • related project repo in Pascal
  • this is a very detailed repo for CMS50dplus but apparently also wrong data format
  • this is a helpful article, especially the tips in the comments on newer versions

Pulse oximeter There are apparently different versions of the cms50e and cms50dplus. Not having found a code allowing me to retrieve the data from the version I had (above picture), I created this one. Moreover, the difference between the versions is often the serial opening baud and the real time raw data exchange protocol. Changing these may work for similar devices

plotjuggler

Debugging tricks

  • If the device is not recognized, maybe this driver is not installed in your PC. Check out on the internet if it is the case, and how to install that. But if you have the SPO2 Assistant software provided with the device installed in you PC, and if you can connect the device to that software, you should not have this issue.
  • In Ubuntu, to make sure the device is well plug and recognized, enter dmesg in the terminal after plug in the device and look at the output. You should see something like the screen below : Alt text

About

Python based ROS2 Humble driver for CMS-50D-PLUS (Pulox PO-250) device

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 76.4%
  • Dockerfile 18.8%
  • Shell 4.8%