osrf / vrx

Virtual RobotX (VRX) resources.
Apache License 2.0
389 stars 178 forks source link

Set IMU to reflect sensor position in global coordinates #708

Closed crvogt closed 11 months ago

crvogt commented 11 months ago

In reference to Issue #675

Issue:

IMU initializes to local reference frame on WAM-V spawn. This can be checked by echoing IMU sensor data on spawn.

Fix Proposed by User:

Add the following to wamv_imu.xacro to link IMU to parent reference frame:

<orientation_reference_frame>
    <localization>ENU</localization>
</orientation_reference_frame>

Result

Launch with

ros2 launch vrx_gz competition.launch.py world:=sydney_regatta

Confirm orientation values with

ros2 topic echo /wamv/sensors/imu/imu/data

Change orientation values in competition.launch.py and re-launch. Changing spawn orientation to align with world axes shows IMU reflects orientation in global frame.