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

JimmyTheFace's profile - activity

2020-09-18 10:53:02 -0500 received badge  Notable Question (source)
2020-09-18 10:53:02 -0500 received badge  Popular Question (source)
2020-09-18 10:53:02 -0500 received badge  Famous Question (source)
2020-04-18 21:07:17 -0500 commented answer Converting vector to orientation in sensor_msgs/Imu

Thanks. Yeah, that worked. I just used the algorithm on the wikipedia page to change it to a quaternion and it seems to

2020-04-18 21:05:57 -0500 received badge  Supporter (source)
2020-04-18 21:05:52 -0500 marked best answer Converting vector to orientation in sensor_msgs/Imu

I'm using the Lego Control+ Technic Hub as an IMU using the node-poweredup library. I am getting the imu data from the hub into ROS just fine but I am having trouble knowing how to correctly publish the orientation data in the sensor_msgs/imu message.

The data I'm getting from the hub is:

  • Gyro: This is coming from the hub as [x, y, z] in degrees per second. I am converting this to radians per second and publishing it on the angular_velocity property of the imu message.
  • Accel: This is the linear acceleration coming from the hub as [x, y, z] in milli-Gs. I am converting this to m/s^2 and publishing it on the linear_velocity property of the imu message.
  • Tilt: This is coming from the hub as [x, y, z] where each value is in (-180, 180]. This is the one I'm not sure how to use. It seems like this is the orientation of the hub but the sensor_msgs/imu message expects a quaternion for the orientation.

If I convert the 'tilt' vector to a quaternion via this method would that work? My understanding of quaternions isn't very strong, but I think it represents a rotation from another position. Is there some information not represented in that vector that would be necessary to accurately track the robot?

2020-04-18 21:05:52 -0500 received badge  Scholar (source)
2020-04-18 13:35:49 -0500 asked a question Converting vector to orientation in sensor_msgs/Imu

Converting vector to orientation in sensor_msgs/Imu I'm using the Lego Control+ Technic Hub as an IMU using the node-pow