Skip to content

eurobench/pi_bench

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Purposes

The given code is responsible for the data transmission in the Bench project with the help of Matlab using ROS. There exists a publisher which is responsible for acquiring and sending the data to a subscriber which is receiving the data as ROS messages to different topics.

Installation

Installation of the following Matlab Toolboxes is necessary:

  • Data Acquisition Toolbox
  • ROS Toolbox

Installation of the following NI Software is necessary:

Usage

There exists a publisher and a subscriber on two different machines.

The Publisher needs to open the Matlab file AutomaticStop_ROS1_pub and follow these instructions:

  • create a Master ROS node:
rosinit
  • enter the needed values in the section ENTER VALUES
%% ENTER VALUES
% ENTER SUBJECT NUMBER HERE
subject = 1;
% ENTER WHETHER RECORDING IS CONTINOUS OR TAKES A SPECIAL DURATION
iscont = 0;
duration =  5;
  • if the acquisition should have a special duration, set iscont = 0, type in duration and run the script
  • if the acquisition should be continuous, set iscont = 1 and run the script
  • to stop the acquisition type any button while having the figure opened
  • close the ROS node:
rosshutdown

The Subscriber needs to open the Matlab file final_ROS1_sub and follow these instructions:

  • connect to the ROS Master
rosinit('<URI of the ROS Master>')
  • type in the amount of time you want your measured data to have in ENTER VALUES
%%ENTER VALUES
% ENTER SUBJECT NUMBER HERE
subject = 1;
% TYPE IN DURATION  YOU WANT TO RECEIVE DATA FROM
global duration
duration = 5;
  • run script to start and stop streaming with the GUI
  • close the ROS node:
rosshutdown

Acknowledgements

rosin_logo

Supported by Eurobench - the European robotic platform for bipedal locomotion benchmarking. More information: Eurobench website

eu_flag

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement no. 779963.

The opinions and arguments expressed reflect only the author‘s view and reflect in no way the European Commission‘s opinions. The European Commission is not responsible for any use that may be made of the information it contains.