robotology / yarp-device-realsense2

realsense2 device for YARP (https://www.yarp.it/)
Other
7 stars 10 forks source link

Stream T256 tracking camera pose using `analogServer` device #18

Closed HosameldinMohamed closed 3 years ago

HosameldinMohamed commented 3 years ago

Details in https://github.com/robotology/yarp-device-realsense2/issues/7.

With this PR:

You can also publish RealSense T256 pose using the analogServer device. Run it using:

yarpdev --device analogServer --name /t265 --period 10 --subdevice realsense2Tracking

:bulb: NOTE: also here, the user should specify the parameters --name and --period as needed.

The command will open a port /t256 that streams the pose as follows:

<positionX positionY positionZ QuaternionW QuaternionX QuaternionY QuaternionZ>
HosameldinMohamed commented 3 years ago

LGTM, could you please add a line to the CHANGELOG.md? Thanks!

@Nicogene I rebased on master then updated the CHANGELOG file.

traversaro commented 3 years ago

Thanks @HosameldinMohamed @Nicogene !

randaz81 commented 3 years ago

I have to say that using a super generic interface such as AnalogSensor to stream out quaternions sounds very dirty to me.

The elements of the vector of that interface are expected to be independent analog channels. But the four elements of a quaternion are not independent. Additionally: analogServer is marked for deprecation in the very near future!! Additionally2: there exists an ad-hoc yarp::math::Quaternion class.

Can't you use a better interface?

HosameldinMohamed commented 3 years ago

I have to say that using a super generic interface such as AnalogSensor to stream out quaternions sounds very dirty to me.

The elements of the vector of that interface are expected to be independent analog channels. But the four elements of a quaternion are not independent. Additionally: analogServer is marked for deprecation in the very near future!!

I was actually looking for a quick way to stream the pose in Simulink using wb-toolbox. This was the quickest way I could do it. But I agree it wasn't what analogServer is made for.

Can't you use a better interface?

mmmmm I don't know a better solution that involves an interface. Do you suggest another way to be able to stream the pose in Simulink?

Additionally2: there exists an ad-hoc yarp::math::Quaternion class.

I'll look into this.

traversaro commented 3 years ago

Hi @HosameldinMohamed @randaz81, I added a few pointers related to this issue in https://github.com/robotology/yarp-device-realsense2/issues/7#issuecomment-850506935 .