icub-tech-iit / ergocub-software

Main collector of ergoCub specific SW
https://icub-tech-iit.github.io/ergocub-software/
BSD 3-Clause "New" or "Revised" License
13 stars 18 forks source link

Add FT IMU in the ergoCubGazeboV1* models #216

Closed GiulioRomualdi closed 6 months ago

GiulioRomualdi commented 6 months ago

Description of the Task

The robot's Force/Torque (FT) sensor is equipped with an Inertial Measurement Unit (IMU) capable of streaming orientation data. Integrating this feature into simulation would be beneficial.

Previously, @G-Cervettini initiated a Pull Request (PR) to integrate this functionality, https://github.com/icub-tech-iit/ergocub-software/pull/145. However, it involved manual modifications to the urdf file.

Definition of Completion

Successfully implement the IMU streaming within the Gazebo model using multipleanalogsensorserver.

Nicogene commented 6 months ago

@martinaxgloria also will benefit of this change

GiulioRomualdi commented 6 months ago

I'm going to open a PR for the feet imu (added with xml blob)

Nicogene commented 6 months ago

I'm going to open a PR for the feet imu (added with xml blob)

Why not as sensors in the yaml? Using the same CSYS of the ft gives problems?

GiulioRomualdi commented 6 months ago

I've never did it. Can you point me some line of the code I can use as inspiration?

GiulioRomualdi commented 6 months ago

Probably something similar to

https://github.com/icub-tech-iit/ergocub-software/blob/master/urdf%2Fcreo2urdf%2Fdata%2Fergocub1_0%2FERGOCUB_all_options.yaml#L808

GiulioRomualdi commented 6 months ago

If I'm not mistaken, @g-cervettini noticed that the imu plugin needs to be attached to a link, and currently, there are no links exposed in the FTs. (The FT plugins are connected to a fixed joint) For this reason @G-Cervettini manually specified the pose of the sensor with respect to the parent. I don't know if this is possible with the approach you propose (for the head imu the pose seems to be zero)

Nicogene commented 6 months ago

At the end in :

We went for adding as xml blobs because we spotted a bug in creo2urdf:

The generated imu sensors had wrong poses, in simmecanics_to_urdf seems not to be a problem exporting an ft and imu that refers to the same csys: