Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement actuators pipeline #104

Closed
yeshasvitirupachuri opened this issue Jan 12, 2021 · 6 comments · Fixed by #105
Closed

Implement actuators pipeline #104

yeshasvitirupachuri opened this issue Jan 12, 2021 · 6 comments · Fixed by #105

Comments

@yeshasvitirupachuri
Copy link
Member

Following the discussion on how to update wearables library with actuators related pipeline #103, this issue tracks the implementation details related to it.

After the update from the meeting #103 (comment), we start with the actuators interface implementation first.

IActuator interface will be similar to the ISensor. Considering only a haptic actuators, we start with IHaptic interface, that inherits from IActuator with set and get (may be not so relevant for a haptic actuator, TBD) methods for the actuation commands. This choice is driven by the haptic actuators we are currently using in some of the projects. The actuation depends on a command that indicates how the haptic actuator buzzes i.e. the magnitude and duration of actuation.

@yeshasvitirupachuri
Copy link
Member Author

This implementation is carried in feature/actuators.

I realized defining and implementing a new IWearActuator interface is redundant, and updating the IWear interface with actuators is more maintainable, albeit all the current devices needs to be updated with the virtual methods of the actuators.

I will proceed along this direction, and further cleanup as following can be updated during the code review,

e.g., the current definition of castVectorOfSensorPtr() can be replaced by

template <typename D, typename T>
wearable::VectorOfDevicePtr<const D>
wearable::IWear::castVectorOfDevicePtr(const VectorOfDevicePtr<const T>& iDevices)

that can be used with both the sensors and actuators.

@yeshasvitirupachuri
Copy link
Member Author

Following the addition of actuator related interfaces to IWear interface, I developed a IWearActuatorsWrapper, which access the available actuators that are implemented in a particular wearable device to which it is attached to, and accesses the setter method of them.

Unlike the IWearWrapper that pools in all the available sensors information, and streams out the wearableData, the actuator IWearActuatorsWrapper listens to the WearableActuatorCommand, and process the received actuator command in the onRead() callback.

To test the actuators pipeline I update the current implementation of the Paexo wearable device, with one motor actuator, that will facilitate us to do the activities related adaptive paexo. The pipeline for the actuators implementation is as shown below:

photo_2021-01-15_16-41-18

and I wrote a simple test application to send the motor actuation commands to the Paexo wearable device, and tested

wearable.actuator.test.mp4

CC @lrapetti @evalli-iit @diegoferigo @claudia-lat @traversaro @claudia-lat

@yeshasvitirupachuri
Copy link
Member Author

yeshasvitirupachuri commented Jan 15, 2021

Thanks @traversaro for the support in understanding how thrift header files are handled, and how to handle the library built from thrift files 2273d01 2273d01

@yeshasvitirupachuri
Copy link
Member Author

yeshasvitirupachuri commented Jan 20, 2021

Haptic actuator implementation and testing is also carried 7622ad6
A couple of small but important updates are done in 41a2be3 5b92a34

@yeshasvitirupachuri
Copy link
Member Author

Monday @claudia-lat and I will perform further testing with the Adaptive Paexo.
I will implement and test the actual move command for the Paexo and proceed with closing the PR #105

@yeshasvitirupachuri
Copy link
Member Author

I will implement and test the actual move command for the Paexo and proceed with closing the PR #105

Done in 915aec2, we could not run the hardware to perform tests on it. However, with the test application the move command for motor actuation seems to be parsed correctly

simplescreenrecorder-2021-01-25_11.48.31.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant