Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add AHRS to Tethys equipped model #158

Merged
merged 6 commits into from
Mar 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 115 additions & 1 deletion lrauv_description/models/tethys_equipped/model.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<model name="tethys">
<include merge="true">
<!-- align with NED (face North) -->
<pose degrees="true">0 0 0 0 0 -90</pose>
<pose degrees="true">0 0 0 0 0 -90</pose>
<uri>tethys</uri>

<!-- Sensors -->
Expand Down Expand Up @@ -76,6 +76,120 @@
</noise>
</ignition:current>
</sensor>
<!--
Sparton AHRS-M2 arrangement of IMU + Magnetometer

See https://www.spartonnavex.com/product/ahrs-m2 for
AHRS specifications and additional documentation.
-->
<sensor
element_id="base_link"
action="add"
name="sparton_ahrs_m2_imu"
type="imu">
<!--IMU in a Sparton AHRS-M2 -->
<always_on>1</always_on>
<!-- Flip body frame to match FSK frame convention -->
<!--
Also account for model being rotated 180 degrees
See https://github.com/osrf/lrauv/issues/80.
-->
<pose degrees="true">0 0 0 180 0 180</pose>
<orientation_reference_frame>
<localization>NED</localization>
</orientation_reference_frame>
<enable_orientation>1</enable_orientation>
<update_rate>10</update_rate>
<linear_acceleration>
<!--
Use zero-mean gaussian distributions for each
linear acceleration component and its (turn on)
bias.

Standard deviation is assumed to be the same for all
linear acceleration components. It is computed from
reported noise density ND = 250 ug/√Hz and chosen
sample rate SR = 10 Hz as ND √SR.

Standard deviation is assumed to be the same for all
linear acceleration component (turn on) biases. It is
made equal to the reported bias stability BS = 0.07441 mg.
-->
<x>
<noise type="gaussian">
<stddev>0.00775283755402256</stddev>
<bias_stddev>0.007297128265</bias_stddev>
</noise>
</x>
<y>
<noise type="gaussian">
<stddev>0.00775283755402256</stddev>
<bias_stddev>0.007297128265</bias_stddev>
</noise>
</y>
<z>
<noise tzpe="gaussian">
<stddev>0.00775283755402256</stddev>
<bias_stddev>0.007297128265</bias_stddev>
</noise>
</z>
</linear_acceleration>
<angular_velocity>
<!--
Use zero-mean gaussian distributions for each
angular velocity component and its (turn on)
bias.

Standard deviation is assumed to be the same for all
angular velocity components. It is computed from
reported noise density ND = 0.04 °/s/√Hz and chosen
sample rate SR = 10 Hz as ND √SR.

Standard deviation is assumed to be the same for all
angular velocity component (turn on) biases. It is made
equal to the reported bias stability BS = 6.415 °/hr.
-->
<x>
<noise type="gaussian">
<stddev>0.0022076862812880228</stddev>
<bias_stddev>0.0017819444444444445</bias_stddev>
</noise>
</x>
<y>
<noise type="gaussian">
<stddev>0.0022076862812880228</stddev>
<bias_stddev>0.0017819444444444445</bias_stddev>
</noise>
</y>
<z>
<noise type="gaussian">
<stddev>0.0022076862812880228</stddev>
<bias_stddev>0.0017819444444444445</bias_stddev>
</noise>
</z>
</angular_velocity>
<topic>/tethys/ahrs/imu</topic>
<plugin filename="ignition-gazebo-imu-system"
name="ignition::gazebo::systems::Imu"/>
</sensor>
<!--Magnetometer in a Sparton AHRS-M2 -->
<sensor
element_id="base_link"
action="add"
name="ahrs_magnetometer"
type="magnetometer">
<always_on>1</always_on>
<update_rate>10</update_rate>
<!-- Flip body frame to match FSK frame convention -->
<!--
Also account for model being rotated 180 degrees
See https://github.com/osrf/lrauv/issues/80.
-->
<pose degrees="true">0 0 0 180 0 180</pose>
<topic>/tethys/ahrs/magnetometer</topic>
<plugin filename="ignition-gazebo-magnetometer-system"
name="ignition::gazebo::systems::Magnetometer"/>
</sensor>
</experimental:params>
<!-- Joint controllers -->
<plugin
Expand Down
1 change: 1 addition & 0 deletions lrauv_ignition_plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ if(BUILD_TESTING)

# Tests
foreach(TEST_TARGET
test_ahrs
test_buoyancy_action
test_controller
test_drop_weight
Expand Down
Loading