-
Notifications
You must be signed in to change notification settings - Fork 11
Adding and Implementing New Sensors
-
Add the name of the new sensor to the
SensorType
enum class -
Add the sensor interface header file with all the member variables and methods inside the Sensor directory. Take a look at IVirtualLinkSensor to understand the interface implementation.
-
Add the interface header file of the new sensor to the IWear.h
- Add single sensor virtual definition of the new sensor and update the sensor utilities.
- Add the inline definitions of the sensor interfaces following the same order as done for the other sensors.
-
Update the WearableData.thrift file that contains the data structure of the wearable message streamed by the wearable devices.
- Add the new sensor data type under Sensor data types. Make use of already available Elementary Data Types to construct the new sensor data type. If the are not meeting your requirements, you can define new
data types
. - Add the new sensor data type under WearData structure.
- Add the new sensor data type under Sensor data types. Make use of already available Elementary Data Types to construct the new sensor data type. If the are not meeting your requirements, you can define new
-
Implement the newly added sensor in SensorImpl.h and SensorImpl.cpp
-
Update the IWearWrapper.cpp with the implementation of the new sensor.
-
Update the IWearRemapper.h with the virtual method overrided and implement the new sensor related data handling in IWearRemapper.cpp.
-
Update all the currently available wearable devices
header
andcpp
files with the new sensor virtual methods overrider. Inside thecpp
file return anullptr
if the device does not contain the new sensor. -
If the new sensor is present in a wearable device, implement all the sensor methods and handle the sensor information correctly. For example, check
VirtualJointKinSensor
implementation inICub
wearable device.
NOTE: After adding a new sensor and updating the WearableData.thrift with the data of the new sensor, old data of wearable devices like XsensSuit
that is saved without the updated WearableData.thrift
file fail to work. This is because inside remapper, the call back methods on the wearable ports expects the new WearableData
format.