Data from experiments with Fabric-Based Multimodal Tactile Sensing Skin (2016) ________________________________________________________________________________ Type of Data: The data collected includes raw temperature data from the thermal sensors in the multimodal skin. The data was collected from pressing and sliding tasks done with the skin on samples of aluminum and pinewood. In the pressing tasks, the skin was pressed onto a sample for 4 seconds. For the sliding task, the skin was used to push and slide the sample a distance of 20 cm in 2 seconds. For both tasks, a force detection threshold of .1 N was used to determine the start of contact with the sample. ________________________________________________________________________________ Data File Format The data is formated in a Pickle file. ________________________________________________________________________________ Accessing and Plotting the Data The code used here accesses the data from the pickle file using the pickle module. Follow this link to see the python documentation of pickle https://docs.python.org/3/library/pickle.html#what-can-be-pickled-and-unpickled We used Python 2.7.12 on Ubuntu 12.04 to create the pickle file. You can look at the documentation that corresponds to the version of Python that you are using. We also used the Plotly api to generate the graphs you see on the website. To use the api, create an account on https://plot.ly/ . Once you set up your account, follow the setup instructions to use the Plotly api with python. The setup instructions can be found here: https://plot.ly/python/getting-started/ ________________________________________________________________________________ Sample Code The code below uses Python 2.7.12 on Ubuntu 14.04 to access the data and generate graphs using the plotly api. #!/usr/bin/python # -*- coding: utf-8 -*- import pickle as pk import plotly.plotly as py import plotly.graph_objs as go ## Retrieves data from the Pickle File def load_pickle(filename): try: p = open(filename, 'r') except IOError: print("The file cannot be opened") return None try: pickle_obj = pk.load(p) except ValueError: print("Loading Pickle File failed. Trying Again.") p.close() p = open(filename, 'r') pickle_obj = pk.load(p) p.close() return pickle_obj ## Plots the data using the plotly api def plot_data_ply(data): t = [] force = [] for item in data: t.append(item[0]) force.append(item[4]) trace0 = go.Scatter( x = t, y = force, mode = 'line', line = dict( color = ('rgb(22, 96, 67)'), width = 4 ) ) plot_data = [trace0] plot_layout = dict( title = 'Force over Time', xaxis = dict(title = 'Time (seconds)'), yaxis = dict(title = 'Force (N)'), ) figure = dict(data = plot_data, layout = plot_layout) py.plot(figure) data = load_pickle('trial_5_processed.pkl') plot_data_ply(data)