ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

How to calculate sensor_msgs/Imu data from IMU sensor

asked 2013-10-30 05:36:55 -0500

I've got a Shimmer2R module from which I obtain 9 axis: Acceleration X, Y, and Z; Gyroscope X, Y, and Z; and Magnetometer X, Y, and Z.

I would like to transmit this data using standard ROS messages. I found the sensor_msgs/MagneticField messages for the magnetometer. I thought the sensor_msgs/Imu messages would be appropriate for the other data.

However, the Imu message seems to present the data in a different way than how I obtain it. I am unfamiliar with this representation and I'm looking for guidance on how to convert my data to the sensor_msgs/Imu representation. An internet search didn't provide me with any useful pointers.

On a side note, I have also read that to obtain a heading from the magnetometer, the data from the Gyroscope is also necessary. Is there any ROS node that does this calculation?

edit retag flag offensive close merge delete

Comments

Hi, I also want to interface Shimmer2R module in ROS groovy running on Ubuntu. But I don't know how to interface Shimmer2R module on linux. Any help would be more than appreciated.

shivesh_sk gravatar image shivesh_sk  ( 2014-06-24 03:04:36 -0500 )edit

I've quickly thrown what I have on GitHub: https://github.com/RafBerkvens/shimmer. It supports a shimmer Bluetooth connection, but documentation is lacking and there a lot of work in progress. But you might find inspiration in the Python script accel_gyro_mag.py.

RafBerkvens gravatar image RafBerkvens  ( 2014-06-24 13:58:32 -0500 )edit

Thanks a ton! I will check it out. :)

shivesh_sk gravatar image shivesh_sk  ( 2014-06-24 15:11:02 -0500 )edit

I tried your executing your node but I am getting this error: ================================================================================REQUIRED process [shimmer/accel_gyro_mag-1] has died! process has died [pid 3166, exit code 1, cmd /home/shivesh/catkin_ws/src/shimmer-master/scripts/accel_gyro_mag.py __name:=accel_gyro_mag __log:=/home/shivesh/.ros/log/7e16bdb6-fc6a-11e3-9f41-001e65ca05f4/shimmer-accel_gyro_mag-1.log]. log file: /home/shivesh/.ros/log/7e16bdb6-fc6a-11e3-9f41-001e65ca05f4/shimmer-accel_gyro_mag-1*.log Initiating shutdown! ================================================================================ Shimmer2R modules are working normally on my linux. I am able to get the data in a CSV file through ShimmerConnect application for linux. Also, I didn't understand how your program will identify the shimmer we want to connect. For eg, I don't know where to put its rfcomm id for communication.

shivesh_sk gravatar image shivesh_sk  ( 2014-06-25 08:19:40 -0500 )edit

Bluetooth settings are configured on lines 101 and 102. Admittedly, the code is undocumented. I believe that issues with this specific node are better handled on the GitHub website than using these comments.

RafBerkvens gravatar image RafBerkvens  ( 2014-06-25 08:49:02 -0500 )edit

Hi I updated my bd_addr and port as directed. But still it throws an error. I have put the issue in the github. Kindly help.

shivesh_sk gravatar image shivesh_sk  ( 2014-06-25 09:49:10 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-10-30 06:12:21 -0500

dornhege gravatar image

The IMU data does map pretty well to your data: angular_velocity would be your gyro data and linear_acceleration the acceleration data.

edit flag offensive delete link more

Comments

Seems fair enough. Any idea what I could do with the orientation quaternion?

RafBerkvens gravatar image RafBerkvens  ( 2013-10-30 21:13:41 -0500 )edit

Depends on how far you want to go. The simplest is to just integrate the gyros. The better solution is to include the accells and filter all data.

dornhege gravatar image dornhege  ( 2013-11-14 00:59:16 -0500 )edit

but how can i integrate with the other sensors. do you can a code to give me the orientation Yaw, pitch and roll ?thanks in advance

kerollosghobrial gravatar image kerollosghobrial  ( 2016-04-28 07:54:21 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2013-10-30 05:36:55 -0500

Seen: 3,684 times

Last updated: Oct 30 '13