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

IMU impemented as analogDevice #41

Closed
EnricoMingo opened this issue Nov 18, 2013 · 5 comments
Closed

IMU impemented as analogDevice #41

EnricoMingo opened this issue Nov 18, 2013 · 5 comments
Assignees
Milestone

Comments

@EnricoMingo
Copy link
Member

IMU is now implemented as a port, I have to convert it as an AnalogDevice.

@ghost ghost assigned EnricoMingo Nov 18, 2013
@barbalberto
Copy link
Collaborator

Note:
The module 3DM_GX3 can be used as a reference. It is the device used to read data from the real IMU sensor on coman.
The moudle is in iCub/main/src/libraries/icubmod/imu3dm_gx3

the IGenericSensor interface has to be implemented and the appropriate wrapper to use is the ServerInertial, which is into yarp/libYARP_dev/include/yarp/dev/ServerInertial.h

@traversaro
Copy link
Member

I am trying to tackle this issue, but apparently there is no way to obtain the parent ModelPtr from the SensorPtr provided as an argument of the Sensor Plugin (at least I was not able to find a way: http://gazebosim.org/api/2.0.0/classgazebo_1_1sensors_1_1Sensor.html ). So it is not possible to use directly the singleton handler.

Do you think it could make sense to extend the handler to handle also sensor pointers (by using as a key the scoped name of the sensor, to avoid name clashes between robots with sensor with the same name)?
This could potentially mean a lot more values in the handler, but as long as the handler is used only in initialization I don't think this would be a big issue.

@traversaro
Copy link
Member

I add a little clarification because I am afraid I was not clear: my idea is to use the runtime scoped name of the sensor (obtained by GetScopedName()) as a key for the handler, and to pass this key to the driver by adding it at runtime to the properties that are passed to the driver, without any sensor name/key hardcoded in the configuration files.

@traversaro
Copy link
Member

I have implemented the proposed solution in commit d53d8ea of development branch. I am not really sure about the solution of using the ScopedName of the sensor as the key for the singleton because I find (but It can be a wrong assumption on my side) that the traditional spirit of yarp device configuration file is that everything needed to create a device (possibly using also yarpdev utility) is found in the relative .ini file.
On the other hand I think every gazebo yarp device will always be created explicitly by the relative gazebo yarp plugin (correct me if I am wrong) so having an "incomplete" configuration file is not an issue.

@traversaro
Copy link
Member

Done in a31320c

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

No branches or pull requests

3 participants