ros-naoqi / naoqi_driver

c++ bridge based on libqi
Apache License 2.0
51 stars 93 forks source link

Did not get IMU data #117

Closed kuku6118 closed 5 years ago

kuku6118 commented 5 years ago

Hi We learned that the pepper has two IMU sensors located in the torso and base. But after the individual rostopic echo, the following message

  1. rostopic echo /naoqi_driver/imu/base Screenshot from 2019-07-23 14-11-23
  2. rostopic echo/naoqi_driver/imu/torso Screenshot from 2019-07-23 14-11-38

There are two problems:

  1. rostopic echo/naoqi_driver/imu/torso clearly did not get IMU data. A log similar to the following occurs [W] 1563862311.485091 32079 qitype.genericvalue: Conversion from v(void) to f(float) failed Conversion from v(void) to f(float) failed=> set to -1
  2. Did not provide all the covariance information. Is there a way to solve this?
mbusy commented 5 years ago

Hi, Regarding your first point, on the Pepper robot the only accessible IMU is located in the base of the robot (specified here). On the NAO robot, the only accessible IMU is located in the torso of the robot (as mentioned here).

The values for Pepper's IMU are retrieved in imu.cpp, using the memory keys specified there.

I totally get your confusion though, naoqi_driver will publish torso IMU values even if you're connected to Pepper. This snippet is responsible for that, we should have the following snippet instead:

if(robot_ == robot::NAO)
{
  /** IMU TORSO **/
  if ( imu_torso_enabled )
  {

Regarding your second issue, in its current situation, naoqi_driver will publish the estimation values depicted in your logs (see this snippet), following the directives of sensor_msgs/Imu. Unfortunately I don't think that there is an easy way to get those covariances...

kuku6118 commented 5 years ago

@Pandhariix Thank you for all your assistance. It seems that we can only give up the IMU of the torso first.