frame_conventions - osrf/vrx GitHub Wiki
This page captures some of the reference frames and conventions that we use in VRX. In general, VRX follows REP 103: Standard Units of Measure and Coordinate Conventions.
World frame
Gazebo's simulation is always performed in Cartesian coordinates (good old XYZ). You can visualize the Gazebo origin by selecting View->Origin
in the GUI menu.
Additionally, Gazebo supports the use of real world latitude and longitude coordinates in its simulations using the WGS84 geodetic system. The world's Cartesian coordinates correspond to a local tangent plane at a given point on the planetary surface. By default, this plane follows the ENU (East-North-Up) convention, as shown on the image below:
Model frame
Gazebo follows the right-hand rule. The robot front facing surface is in the positive x direction, left facing being in the positive y direction, top facing being in the positive z direction and so forth.
The next diagram shows the transformation of the model when applying positive roll, pitch and yaw respectively.
Note: This image is courtesy of https://www.pix4d.com/
Wind
The wind plugin publishes the wind vector that is applied to calculate forces on the WAM-V, rather than a wind reading like you would get from a weather report. Thus, the direction value that is reported is where the wind is going to, rather than coming from, so the WAM-V will move in the direction of reported wind. The wind vector direction is expressed in the Gazebo world frame, and in degrees. So, for example, a wind direction of 360 (or 0) will push the WAM-V in the direction of the world frame x-axis, which is towards the east. A wind direction of 090 will push the WAM-V towards the north. The magnitude reported is in meters per second.
Acoustic pinger
Bearings are reported in the WAM-V frame and coordinate system: the x-axis is towards the vehicle’s nose, the y-axis is towards the port side, and the z-axis points upwards. Following the right-hand rule, bearing angles are measured counter-clockwise beginning from the x-axis. As an example, imagine that the acoustic pinger is located below the light buoy as depicted in the image below.
The measurement from the WAM-V (with some noise) is:
header:
seq: 21
stamp:
secs: 22
nsecs: 249000000
frame_id: "wamv/pinger"
range: 64.8294677734375
bearing: 0.2934380769729614
elevation: -0.4265419840812683
Important: It seems that we have a bug in the way we calculate the elevation angle as it should be positive in this example. We'll fix this issue after the 2022 VRX finals.