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

Bosch IMU never starts the first time #876

Closed
S-Dafarra opened this issue Oct 29, 2019 · 23 comments
Closed

Bosch IMU never starts the first time #876

S-Dafarra opened this issue Oct 29, 2019 · 23 comments
Labels
iCubGenova04 (iRonCub1) S/N:031 stale This issue will be soon closed automatically

Comments

@S-Dafarra
Copy link

Brief description of the request/failure

Every time we switch on the robot head, the Bosch IMU device fails to start and we get the following error:

578	9.241254	ERROR	First read from the device failed, check everything is fine and retry
581	9.251476	ERROR	cannot create device <imuBosch_BNO055>
582	9.251492	ERROR	ControlBoardWrapper: error while opening subdevice
603	9.677945	ERROR	xsensmt: Sensor timeout, no sensor measurement received in the last 0.212098 seconds.
605	9.677950	ERROR	xsensmt: Sensor timeout, no sensor measurement received in the last 0.217149 seconds.
1057	21.947317	ERROR	One or more devices failed opening... see previous log messages for more info

To run the robot is sufficient to restart the yarprobotinterface.

Detailed context

log_icub-head_bosch_not_starting.txt

Accompanying material

@julijenv
Copy link
Collaborator

Hi @S-Dafarra ,
it is a known issue, it is on the pipe of issue to be resolved, it should be fixed in the near, stay tuned

@Nicogene
Copy link
Member

This patch(robotology/yarp#2034) introduced an error message in case the first 10 read from the sensor fail(at startup time).
Maybe increasing the number of trial to ~50 (50x0.01ms) could fix the problem.
I suspect that once you turn on the icub-head the IMU takes some time to wake up.

@Nicogene
Copy link
Member

I want to underline that probably it is a problem that exists since forever, simply before robotology/yarp#2034 there was that other problem robotology/yarp#1994.

BTW the imubosch mounted on the rfe board seems to not have this issue and it is ready to be used(robotology/icub-main#570).

@Nicogene
Copy link
Member

I tried on iCubGenova02 with 1000 trials, and the read on i2c doesn't fail, but it read garbage, after the power on this condition is always false:

      double sum_squared = quaternion_tmp.w() * quaternion_tmp.w() +
                             quaternion_tmp.x() * quaternion_tmp.x() +
                             quaternion_tmp.y() * quaternion_tmp.y() +
                             quaternion_tmp.z() * quaternion_tmp.z();

        if( (sum_squared < 0.9) || (sum_squared > 1.2) )
        {
            dataIsValid = false;
            return;
        }

I don't remember the rationale behind this check.

@S-Dafarra
Copy link
Author

I think it is checking the quaternion to have unit norm 🤔

@julijenv
Copy link
Collaborator

julijenv commented Nov 4, 2019

Would it be possible to find the reason why it needs 2 tarts to have the condition accpeted? or how long it takes to have the condition accpeted?

@Nicogene
Copy link
Member

Nicogene commented Nov 4, 2019

The reason of the fail of the condition is this robotology/yarp#1994.

Removing that check, at the first startup the imu doesn't work, it gives only 0.0 and nan.

how long it takes to have the condition accpeted?

I'm afraid forever, unless restarting the yarprobotinterface 😢

@stale
Copy link

stale bot commented Jan 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale This issue will be soon closed automatically label Jan 3, 2020
@pattacini
Copy link
Member

@Nicogene @julijenv
What's the status of this?

Is the problem related to software or hardware?
Is the RFE available on iCubGenova04?

@stale stale bot removed the stale This issue will be soon closed automatically label Jan 3, 2020
@Nicogene
Copy link
Member

Nicogene commented Jan 3, 2020

I honestly don't know how to approach this issue 🤔

In my opinion is not something software related, but I don't know how to check it.
The imu on the rfe should not have this kind of problem, but unfortunately iCubGenova04 doesn't have it.

@traversaro
Copy link
Member

I honestly don't know how to approach this issue 🤔

I just noticed that in the error log posted by @S-Dafarra there is also a related error from the xsensmt driver (see https://github.com/robotology/xsensmt-yarp-driver/blob/6c63c90ebb15dc42dc78a44ff5abef3051e8b18a/xsensmt/XsensMT.cpp#L71) :

603	9.677945	ERROR	xsensmt: Sensor timeout, no sensor measurement received in the last 0.212098 seconds.
605	9.677950	ERROR	xsensmt: Sensor timeout, no sensor measurement received in the last 0.217149 seconds.

I wonder if the two issues may be related, even if the device are attached to the robot using two different bus.

If we want to investigate the issue, I would try the following:

@stale
Copy link

stale bot commented Mar 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale This issue will be soon closed automatically label Mar 3, 2020
@S-Dafarra
Copy link
Author

This has not been fixed yet and the suggestions in #876 (comment) have not been tried AFAIK.

@stale stale bot removed the stale This issue will be soon closed automatically label Mar 3, 2020
@Nicogene
Copy link
Member

Nicogene commented Mar 4, 2020

A workaround could be do the restart of the device inside of the code of imuBosch_BNO055 in case of failure of startup, in order to avoid to re-run the yarprobotinterface

@stale
Copy link

stale bot commented May 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale This issue will be soon closed automatically label May 3, 2020
@traversaro
Copy link
Member

Hi good friend @Stale, I am afraid that this issue is still present.

@stale stale bot removed the stale This issue will be soon closed automatically label May 3, 2020
@julijenv
Copy link
Collaborator

julijenv commented Jul 1, 2020

@Nicogene , do u have any other good ideas to make it ok?

@julijenv
Copy link
Collaborator

julijenv commented Jul 1, 2020

A bug fix has been requested on icub-fix channel and will be addressed when FW guy available
icub-tech-iit/fix#145

@julijenv julijenv closed this as completed Jul 1, 2020
@Nicogene
Copy link
Member

Nicogene commented Jul 1, 2020

@Nicogene , do u have any other good ideas to make it ok?

Unfortunately not, but I'd try what @traversaro suggested here -> #876 (comment)

@DanielePucci
Copy link

Hi all, unfortunately we keep having this issue. So, I am going to re-open it. Let un know how you prefer to proceed

CC
@maggia80

@DanielePucci DanielePucci reopened this Jun 7, 2021
@maggia80 maggia80 assigned violadelbono and Uboldi80 and unassigned julijenv Jun 7, 2021
@pattacini pattacini added the pinned This label prevents an issue from being closed automatically label Jun 23, 2021
@Uboldi80
Copy link
Contributor

Uboldi80 commented Jan 25, 2022

a feasibility study was recently carried out to introduce RFE master on the robot head, which should help solve this problem as well as the problem of face expressions #1083.
It remains to be seen whether this upgrade will be introduced or not.

@gsisinna gsisinna removed their assignment Aug 1, 2022
@pattacini pattacini assigned gsisinna and unassigned Uboldi80 Sep 1, 2022
@pattacini pattacini moved this to Triage in iCub Tech Support Dec 7, 2022
@pattacini pattacini moved this from Triage to Icebox in iCub Tech Support Dec 7, 2022
@Fabrizio69 Fabrizio69 removed the pinned This label prevents an issue from being closed automatically label Dec 14, 2022
@github-actions
Copy link

This issue has been automatically marked as stale because it did not have recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale This issue will be soon closed automatically label Feb 13, 2023
@github-actions
Copy link

This issue has been automatically closed due to inactivity. Feel free to open it again if needed.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 21, 2023
@github-project-automation github-project-automation bot moved this from On Hold to Done in iCub Tech Support Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iCubGenova04 (iRonCub1) S/N:031 stale This issue will be soon closed automatically
Projects
Status: Done
Development

No branches or pull requests

10 participants