robotology / icub-models-generator

Resources and programs to generated models (URDF, SDF) of the iCub robot
14 stars 23 forks source link

STRAIN2 bno055 orientation #91

Closed traversaro closed 4 years ago

traversaro commented 6 years ago

In the model generated using simmechanics, we do not have the frames corresponding to the bno055 sensors mounted on the new STRAIN2 electronics. As adding them to the CREO cad will take time (if it is worth at all) it would be already helpful if we could extract the transform between the sensor frame of the bno055 documented in Page 24 of ~https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST_BNO055_DS000_14.pdf~ updated URL https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bno055-ds000.pdf and the FT sensor frame defined in http://wiki.icub.org/wiki/FT_sensor .

If the STRAIN2 electronics is already model in the iCub's CAD, I think this should be trivial.

traversaro commented 6 years ago

I extracted manually for now the transform. It is:

{}^{ft_sensor_frame} H_{bno055_sensor_frame} 
= 
-1.00   0.00    0.000     0.00750013
 0.00   1.00    0.000     0.00860000
 0.00   0.00    -1.00    -0.0150180
 0.0     0.0      0.0     1.0

(linear translation part in meters).

See the attached image for reference (note: creo uses millimeters for distance): bno055_strain2

traversaro commented 6 years ago

Important document for getting the orientation of the bno055 in the STRAIN2: STRAIN-2_11996_B_ASS_TOP_ASS_BOT.pdf

traversaro commented 6 years ago

cc @hu-yue

traversaro commented 6 years ago

cc @fiorisi

hu-yue commented 6 years ago

cc @nunoguedelha here is the transformation between the IMU and the FT.

LOC2Bot commented 6 years ago

cc @nunoguedelha and @fiorisi as discussed F2F, we should regenerate the URDF with the sensor frames.

fiorisi commented 6 years ago

I had a look at the problem. As mentioned F2F the frames are not in the FT sensors used in the CAD model of iCub. More in details, in the CAD model are used the old FT sensor (1st generation) that don't have the new strain2 board. In order to generate the model we have to:

fiorisi commented 6 years ago

I checked with S. Dussoni, and the sensor should be located on the TOP face of the strain2 board (yellow pins in the figure). strain2tutta

To correctly define the orientation of the frame we need to locate the PIN 1 in the chip (in the manual is highlighted with the black dot). image

From the electronic schematics we see that is the lower right pin. strain2zoom

This is confirmed by the small white dot on the chip. img_20180813_132623

The frame has been placed in the center of the chip (on the upper surface). image

fiorisi commented 6 years ago

If the placement of the sensor frame is correct, the transform is different from the one obtained by @traversaro.

image

nunoguedelha commented 6 years ago

Hi @fiorisi I've crosschecked and find the same orientation as you did, as long as the board has the default configuration P1, among the possible values below (AXIS_REMAP_CONFIG, AXIS_REMAP_SIGN registers): screen shot 2018-08-13 at 18 33 08

traversaro commented 6 years ago

Thanks @fiorisi and @nunoguedelha for the check. I am not sure were I did the error, probably it was when placing the frame in the CAD as the document linked in https://github.com/robotology/icub-model-generator/issues/91#issuecomment-391323851 contains the dot of the U10 board in the right position.

@hu-yue this was probably affecting the results of the analysis of the IMU euler angles output.

fiorisi commented 6 years ago

The FT are connected to the EMS boards. The frames in the CAD model will be named as follows (similar to the convention used for the gyro and accelerometers): SCSYSL/R BODY-PART FT-IMUELECTRICAL-NAME

The ELECTRICAL-NAME is documented here.

cc @nunoguedelha

fiorisi commented 6 years ago

Here the names of the frames in the CAD model: SCSYS_L_UPPER_LEG_FT-IMU_3B12 SCSYS_R_UPPER_LEG_FT-IMU_3B11 SCSYS_L_FOOT_FT-IMU_3B13 SCSYS_R_FOOT_FT-IMU_3B14 SCSYS_L_UPPER_ARM_FT-IMU_1B6 (not exported yet) SCSYS_R_UPPER_ARM_FT-IMU_2B6 (not exported yet)

nunoguedelha commented 6 years ago

The FT are connected to the EMS boards.

As a side note, it's a pitty the number of the EMS is not in the FT board electronic name, as it is the case for the other sensors. For instance :

fiorisi commented 6 years ago

@nunoguedelha, I actually wanted to add it but the name of the features in Creo is limited to 31 characters.

fiorisi commented 6 years ago

In the iCub Mechanism CAD model the FT sensor frames of the arms are defined in the link the contains the FT sensor itself.

image

As specified in the documentation of the simmechanics-to-urdf:

Note that for now the FT sensors sensor frame is required to be coincident with child link frame, due to URDF limitations.

Currently there is a frameReferenceLink parameter to remap the frame to the correct link, but while redefining the Mechanism model, we can also move the FT frames in the CAD model and update the simmechanics-to-urdf configuration file.

traversaro commented 6 years ago

Note that for now the FT sensors sensor frame is required to be coincident with child link frame, due to URDF limitations.

The actual limitation is in the SDF, in particular it is tracked by this issue: https://bitbucket.org/osrf/sdformat/issues/130/position-part-of-force_torque-sensor-pose .

fiorisi commented 6 years ago

The mass of the following links is different. I am trying to understand what happened. Maybe I will release a first version with the different masses. Please remember to double check that the simulations behavior is not different and to check that visually the inertia box is similar to the old ones (inside gazebo).

CAD LINK NAME Mass difference c.a. [kg] COMMENTS
SIM_SEA_2-5_L_ELBOW 0.06 Inertia tensor is also very different
SIM_SEA_2-5_R_ELBOW 0.06 Inertia tensor is also very different

The difference in mass is not relevant, the real problem is the inertia tensor.

fiorisi commented 6 years ago

PR opened: https://github.com/robotology/icub-model-generator/pull/111

cc @FabioBergonti

traversaro commented 4 years ago

This was fixed by https://github.com/robotology/icub-model-generator/pull/122, thanks to everyone that contributed.