1<element name="imu" required="0"> 2 <description>These elements are specific to the IMU sensor.</description> 3 4 <element name="orientation_reference_frame" required="0"> 5 <!-- move this under custom_rpy? --> 6 <element name="localization" type="string" default="CUSTOM" required="1"> 7 <description> 8 This string represents special hardcoded use cases that are commonly seen with typical robot IMU's: 9 - CUSTOM: use Euler angle custom_rpy orientation specification. 10 The orientation of the IMU's reference frame is defined by adding the custom_rpy rotation 11 to the parent_frame. 12 - NED: The IMU XYZ aligns with NED, where NED orientation relative to Gazebo world 13 is defined by the SphericalCoordinates class. 14 - ENU: The IMU XYZ aligns with ENU, where ENU orientation relative to Gazebo world 15 is defined by the SphericalCoordinates class. 16 - NWU: The IMU XYZ aligns with NWU, where NWU orientation relative to Gazebo world 17 is defined by the SphericalCoordinates class. 18 - GRAV_UP: where direction of gravity maps to IMU reference frame Z-axis with Z-axis pointing in 19 the opposite direction of gravity. IMU reference frame X-axis direction is defined by grav_dir_x. 20 Note if grav_dir_x is parallel to gravity direction, this configuration fails. 21 Otherwise, IMU reference frame X-axis is defined by projection of grav_dir_x onto a plane 22 normal to the gravity vector. IMU reference frame Y-axis is a vector orthogonal to both 23 X and Z axis following the right hand rule. 24 - GRAV_DOWN: where direction of gravity maps to IMU reference frame Z-axis with Z-axis pointing in 25 the direction of gravity. IMU reference frame X-axis direction is defined by grav_dir_x. 26 Note if grav_dir_x is parallel to gravity direction, this configuration fails. 27 Otherwise, IMU reference frame X-axis is defined by projection of grav_dir_x onto a plane 28 normal to the gravity vector. IMU reference frame Y-axis is a vector orthogonal to both 29 X and Z axis following the right hand rule. 30 </description> 31 </element> 32 <element name="custom_rpy" type="vector3" default="0 0 0" required="0"> 33 <description> 34 This field and parent_frame are used when localization is set to CUSTOM. 35 Orientation (fixed axis roll, pitch yaw) transform from parent_frame to this IMU's reference frame. 36 Some common examples are: 37 - IMU reports in its local frame on boot. IMU sensor frame is the reference frame. 38 Example: parent_frame="", custom_rpy="0 0 0" 39 - IMU reports in Gazebo world frame. 40 Example sdf: parent_frame="world", custom_rpy="0 0 0" 41 - IMU reports in NWU frame. 42 Uses SphericalCoordinates class to determine world frame in relation to magnetic north and gravity; 43 i.e. rotation between North-West-Up and world (+X,+Y,+Z) frame is defined by SphericalCoordinates class. 44 Example sdf given world is NWU: parent_frame="world", custom_rpy="0 0 0" 45 - IMU reports in NED frame. 46 Uses SphericalCoordinates class to determine world frame in relation to magnetic north and gravity; 47 i.e. rotation between North-East-Down and world (+X,+Y,+Z) frame is defined by SphericalCoordinates class. 48 Example sdf given world is NWU: parent_frame="world", custom_rpy="M_PI 0 0" 49 - IMU reports in ENU frame. 50 Uses SphericalCoordinates class to determine world frame in relation to magnetic north and gravity; 51 i.e. rotation between East-North-Up and world (+X,+Y,+Z) frame is defined by SphericalCoordinates class. 52 Example sdf given world is NWU: parent_frame="world", custom_rpy="0 0 -0.5*M_PI" 53 - IMU reports in ROS optical frame as described in http://www.ros.org/reps/rep-0103.html#suffix-frames, which is 54 (z-forward, x-left to right when facing +z, y-top to bottom when facing +z). 55 (default gazebo camera is +x:view direction, +y:left, +z:up). 56 Example sdf: parent_frame="local", custom_rpy="-0.5*M_PI 0 -0.5*M_PI" 57 </description> 58 <element name="parent_frame" type="string" default="" required="0"> 59 <description> 60 Name of parent frame which the custom_rpy transform is defined relative to. 61 It can be any valid fully scoped Gazebo Link name or the special reserved "world" frame. 62 If left empty, use the sensor's own local frame. 63 </description> 64 </element> 65 </element> 66 <element name="grav_dir_x" type="vector3" default="1 0 0" required="0"> 67 <description> 68 Used when localization is set to GRAV_UP or GRAV_DOWN, a projection of this vector 69 into a plane that is orthogonal to the gravity vector 70 defines the direction of the IMU reference frame's X-axis. 71 grav_dir_x is defined in the coordinate frame as defined by the parent_frame element. 72 </description> 73 <element name="parent_frame" type="string" default="" required="0"> 74 <description> 75 Name of parent frame in which the grav_dir_x vector is defined. 76 It can be any valid fully scoped Gazebo Link name or the special reserved "world" frame. 77 If left empty, use the sensor's own local frame. 78 </description> 79 </element> 80 </element> 81 </element> 82 83 <element name="topic" type="string" default="__default_topic__" required="0"> 84 <description>Topic on which data is published.</description> 85 </element> 86 87 <element name="angular_velocity" required="0"> 88 <description>These elements are specific to body-frame angular velocity, 89 which is expressed in radians per second</description> 90 <element name="x" required="0"> 91 <description>Angular velocity about the X axis</description> 92 <include filename="noise.sdf" required="0"/> 93 </element> 94 <element name="y" required="0"> 95 <description>Angular velocity about the Y axis</description> 96 <include filename="noise.sdf" required="0"/> 97 </element> 98 <element name="z" required="0"> 99 <description>Angular velocity about the Z axis</description> 100 <include filename="noise.sdf" required="0"/> 101 </element> 102 </element> 103 104 <element name="linear_acceleration" required="0"> 105 <description>These elements are specific to body-frame linear acceleration, 106 which is expressed in meters per second squared</description> 107 <element name="x" required="0"> 108 <description>Linear acceleration about the X axis</description> 109 <include filename="noise.sdf" required="0"/> 110 </element> 111 <element name="y" required="0"> 112 <description>Linear acceleration about the Y axis</description> 113 <include filename="noise.sdf" required="0"/> 114 </element> 115 <element name="z" required="0"> 116 <description>Linear acceleration about the Z axis</description> 117 <include filename="noise.sdf" required="0"/> 118 </element> 119 </element> 120 121</element> 122