robotology / icub-models

Official URDF and SDF models of the iCub humanoid robot.
Creative Commons Attribution Share Alike 4.0 International
32 stars 33 forks source link

Wrong rotation order in /icubGazeboSim/inertial port #123

Open drdanz opened 9 years ago

drdanz commented 9 years ago

On the real icub, data received from the imu sensor is transmitted on the /inertial port in the order: roll pitch yaw. Anyway the values is produced by the sensor using the aeronautic convention pitch roll yaw.

On the simulator, the imu sensor sends values in the same order, roll pitch yaw, but the data is produced using the robotic convention roll pitch yaw.

The result is that the values are the same when the rotation is only on one of the axes, but when the rotation is on 2 or 3 axes the values are different and the correct rotation matrix must be obtained by switching the order of the roll and pitch terms in the matrix product.

The same issue probably applies to the velocity and acceleration vectors.

I'm not sure if this is a bug that should be fixed in the real robot (i.e. use robotics convention in the robot) or in the model.

traversaro commented 9 years ago

I guess (unless we at least change the name of the port) we cannot change the /icub/inertial behaviour. Hence we should fix this in the simulator.

DanielePucci commented 9 years ago

I agree with @traversaro . @drdanz thanks for reporting this, which I hope will save the time we lost together in figuring this out :)

francesco-romano commented 9 years ago

@traversaro what about changing the IMU implementation in the gazebo plugin to match the robot one?

barbalberto commented 9 years ago

The header file of inertial server explains how the data should be broadcasted through the port, so any imu device using it has to comply with that. https://github.com/robotology/yarp/blob/master/src/libYARP_dev/src/modules/ServerInertial/ServerInertial.h @line 50

drdanz commented 9 years ago

@barbalberto unfortunately the header file does not specify whether roll pitch and yaw should be generated using the robotics or aeronautical convention.

barbalberto commented 9 years ago

Ii know there are a lot of standards, the file now says "xyz in global frame", that should have a unique meaning, once you know how your xyz are oriented. If it not clear enough, let's change again the header in such a way there are no more doubt :-D

barbalberto commented 9 years ago

by the way, global frame usually means aeronautical convention

traversaro commented 9 years ago

For the sake of clarity I propose:

Additional points (probably too much work to do, but would be nice):

traversaro commented 7 years ago

Blocked until we solve https://github.com/robotology/yarp/issues/802 .

traversaro commented 2 years ago

The order is given by the gazebo-yarp-imu plugin, so it is not related specifically to models. Moving this issue to icub-models .