Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use standard messages for AHRS #7

Merged
merged 3 commits into from
Apr 25, 2022
Merged

Use standard messages for AHRS #7

merged 3 commits into from
Apr 25, 2022

Conversation

chapulina
Copy link
Contributor

@chapulina chapulina commented Apr 19, 2022

I didn't find a standard representation for data coming from an AHRS sensor, so here's a first draft for how we could use some messages from common_interfaces.

I'm not sure about the frame of reference for the IMU values, it would be good to document them.

Another thing to consider is to break this message apart and publish each standard message on a separate topic. The advantage of that is to have immediate access to all the existing tooling around the standard messages, like visualizing IMU data on RViz, plotting lat/lon to a map, and so on.

Let me know what you think, @andermi !


This is the mapping from the previous fields to the new ones:

Before After
header header (no change}
roll_angle, pitch_angle yaw_angle_true sensor_msgs/Imu: imu.orientation (this is a quaternion, not RPY)
x_rate_corrected sensor_msgs/Imu: imu.angular_velocity.x (stays as rad/s)
y_rate_corrected sensor_msgs/Imu: imu.angular_velocity.y (stays as rad/s)
z_rate_corrected sensor_msgs/Imu: imu.angular_velocity.z (stays as rad/s)
x_accel sensor_msgs/Imu: imu.linear_acceleration,x (the message documentation recommends m/s^2 instead of g)
y_accel sensor_msgs/Imu: imu.linear_acceleration.y (the message documentation recommends m/s^2 instead of g)
z_accel sensor_msgs/Imu: imu.linear_acceleration.z (the message documentation recommends m/s^2 instead of g)
n_velocity geometry_msgs/Vector3: ned_velocity.x
e_velocity geometry_msgs/Vector3: ned_velocity.y
d_velocity geometry_msgs/Vector3: ned_velocity.z
latitude sensor_msgs/NavSatFix: gps.latitude
longitude sensor_msgs/NavSatFix: gps.longitude
altitude sensor_msgs/NavSatFix: gps.altitude
x_rate_temp sensor_msgs/Temperature: x_rate_temp.temperature (still in Celsius)

Signed-off-by: Louise Poubel <louise@openrobotics.org>
@chapulina chapulina requested a review from andermi April 19, 2022 17:55
@chapulina chapulina self-assigned this Apr 19, 2022
@andermi
Copy link
Collaborator

andermi commented Apr 21, 2022

publish each standard message on a separate topic

I agree with this as long as those messages would each have headers.

Where should we put documentation that those messages/topics exist? Should our ICD exist in buoy_entrypoint?

@chapulina
Copy link
Contributor Author

I agree with this as long as those messages would each have headers.

Sounds good 👍🏽 So we could do something like:

- type: `sensor_msgs/Imu`
  topic: `/xb_record/imu`

- type: `geometry_msgs/Vector3Stamped`
  topic: `/xb_record/ned_velocity`

- type: `sensor_msgs/NavSatFix`
  topic: `/xb_record/gps`

- type: `sensor_msgs/Temperature`
  topic: `/xb_record/x_rate_temp`

Where should we put documentation that those messages/topics exist? Should our ICD exist in buoy_entrypoint?

Buoy entrypoint sounds like a good place to me.

Signed-off-by: Louise Poubel <louise@openrobotics.org>
@chapulina
Copy link
Contributor Author

As discussed earlier, we'll keep the existing aggregated messages being published in a single topic, but within these messages, make as much use of standard ROS messages as possible.

In the future, we may publish separate standard messages in their own topics alongside the aggregated ones, so users have a choice to subscribe to one or the other.

@chapulina chapulina enabled auto-merge (squash) April 25, 2022 22:29
@chapulina chapulina merged commit dbc4b60 into main Apr 25, 2022
@chapulina chapulina deleted the chapulina/ahrs branch April 25, 2022 22:29
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants