mdrwiega/bosch_imu_driver

ROS interfacing how to ?

Closed this issue · 9 comments

Hi,
I have interfaced the IMU with the arduino and can use the adafruit library. I do not understand how to then connect this with ROS ? Can you help me with this. There are no information on the ros wiki page. I think its not been updated for a long time.
Thanks

Alex

Hello,
unfortunatelly I don't have experience with Arduino. As I understand you have driver (based on adafruit library) for IMU on Arduino. So, you need to write the driver for ROS which get data from Arduino (e.g. by serial port, exist ROS package rosserial_arduino may be helpful). You could use the part of my node bosch_imu_driver for publishing IMU data, but you must replace the part responsible for communication with device (in your case Arduino).

Best Regards,
Michal

Hi Michael,
Thanks for the pointers. Can you describe how did you connected the IMU with ROS? What microcontroller did you use for the communication with ROS?

Thanks
Alex

Hi,
I connected IMU (Bosch BNO055) to computer with ROS by UART-USB converter. In that case the additional microcontroller is unnecessary.

Best Regards,
Michal

Hi Michael,

Wow, did not knew that. In that case, can I use your package out of the box? that would save me a lot of time.

Many Thanks

Alex

Hi Alex,
no problem. I think that it'll be working. I used it in that way. However I had a problem with one of USB-UART coverter (I don't remember chip). But then I used one based on chip FT232 (FTDI) and it was OK.

Best Regards,
Michal

Hi Michal,

Thanks a lot for your reply. This will be much helpful. I will get the FTDI to usb and report back on the progress in few days.

Many thanks for your kind help.

Best Regards
Alex

Hi Michal,

So following your advice, I was able to use the IMU on ROS using the UART . Its working nice. Thanks to your help. Can you tell me which of the data is the sensor fused data coming from the IMU, /imu_bosch/raw or /imu_bosch/data?
The /imu_bosch/raw topic gives stable readings, however the /data topic is very weird and very random. I am not able to understand. Can you help me with this?

Thanks
Alex

Hi Alex,

I'm glad that you ran the sensor with UART interface.
The sensor fused data should be on topic: /imu_bosch/data. However, I'm not sure if sensor don't needs some kind of calibration in currently choosen fusion mode. For details, I propose you to read the Bosch BN055 datasheet, especially in section 3.3.

Unfortunatelly, the fusion mode in driver can be changed only in code. More precisely in line 219 of file bosch_imu_node.py which looks like following:
if not(write_to_dev(ser, OPER_MODE, 1, OPER_MODE_NDOF)):
All permissible modes of sensor (based on datasheet) are defined between 87 and 99 lines.

Best Regards,
Michal

Dear Michal,

Thanks. I will figure it out. Thanks for your help.

Alex