{
  "id": 114058,
  "title": "Why is yaw so small in the training data set ?",
  "url": "/competitions/pku-autonomous-driving/discussion/114058",
  "author_name": "SK",
  "post_date": "2019-10-23T23:31:51.985000",
  "votes": 5,
  "comment_count": 8,
  "views": 0,
  "content": "<p>As shown in the table below, the \"yaw\" data in the training dataset seems to be constrained between -0.6 to 0.75 radians or so, while pitch and roll seem to vary between -pi to +pi. </p>\n\n<p>As shown in the second pic below, yaw seems to indicate rotation about a vertical axis, which means the car should be able to do a full 360-degrees with respect to yaw. </p>\n\n<p>Is there a reason for this ? Is the yaw = pi/2 for a car that is parked on the side of the road ? </p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1061767%2Fa978cea0cef310df39fd1ca4213efe44%2Fyaw.PNG?generation=1571873077976095&amp;alt=media\" alt=\"\"></p>\n\n<p><img src=\"https://carsexplained.files.wordpress.com/2017/01/post1-2figure2.jpg\" alt=\"\">\n<img src=\"https://carsexplained.files.wordpress.com/2017/02/yaw.gif?w=920\" alt=\"\"></p>\n\n<p>References: <a href=\"https://carsexplained.wordpress.com/2017/02/21/fundamentals-of-car-science-pitch-and-roll/\">https://carsexplained.wordpress.com/2017/02/21/fundamentals-of-car-science-pitch-and-roll/</a></p>",
  "messages": [
    {
      "id": 658253,
      "postDate": "2019-10-25T20:52:32.967Z",
      "content": "<p>I guess yaw and pitch are mixed up. <br>\nHere is the distribution for \"pitch\":\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1634816%2F670f0dbf25e935d743fcb9ed69018aa3%2F__results___16_0.png?generation=1572093504165880&amp;alt=media\" alt=\"\">\nPitch cannot be that big! Those cars must be upside down -_-  </p>\n\n<p>Also, a few lines from <a href=\"https://www.kaggle.com/zstusnoopy/visualize-the-location-and-3d-bounding-box-of-car\">this notebook</a>:\n```</p>\n\n<h1>I think the pitch and yaw should be exchanged</h1>\n\n<p>yaw, pitch, roll = -pitch, -yaw, -roll\n```</p>",
      "rawMarkdown": "I guess yaw and pitch are mixed up.  \nHere is the distribution for \"pitch\":\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1634816%2F670f0dbf25e935d743fcb9ed69018aa3%2F__results___16_0.png?generation=1572093504165880&amp;alt=media)\nPitch cannot be that big! Those cars must be upside down -_-  \n\nAlso, a few lines from [this notebook](https://www.kaggle.com/zstusnoopy/visualize-the-location-and-3d-bounding-box-of-car):\n```\n# I think the pitch and yaw should be exchanged\nyaw, pitch, roll = -pitch, -yaw, -roll\n```",
      "votes": 5
    },
    {
      "id": 656113,
      "postDate": "2019-10-23T23:31:51.987Z",
      "content": "<p>As shown in the table below, the \"yaw\" data in the training dataset seems to be constrained between -0.6 to 0.75 radians or so, while pitch and roll seem to vary between -pi to +pi. </p>\n\n<p>As shown in the second pic below, yaw seems to indicate rotation about a vertical axis, which means the car should be able to do a full 360-degrees with respect to yaw. </p>\n\n<p>Is there a reason for this ? Is the yaw = pi/2 for a car that is parked on the side of the road ? </p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1061767%2Fa978cea0cef310df39fd1ca4213efe44%2Fyaw.PNG?generation=1571873077976095&amp;alt=media\" alt=\"\"></p>\n\n<p><img src=\"https://carsexplained.files.wordpress.com/2017/01/post1-2figure2.jpg\" alt=\"\">\n<img src=\"https://carsexplained.files.wordpress.com/2017/02/yaw.gif?w=920\" alt=\"\"></p>\n\n<p>References: <a href=\"https://carsexplained.wordpress.com/2017/02/21/fundamentals-of-car-science-pitch-and-roll/\">https://carsexplained.wordpress.com/2017/02/21/fundamentals-of-car-science-pitch-and-roll/</a></p>",
      "rawMarkdown": "As shown in the table below, the \"yaw\" data in the training dataset seems to be constrained between -0.6 to 0.75 radians or so, while pitch and roll seem to vary between -pi to +pi. \n\nAs shown in the second pic below, yaw seems to indicate rotation about a vertical axis, which means the car should be able to do a full 360-degrees with respect to yaw. \n\nIs there a reason for this ? Is the yaw = pi/2 for a car that is parked on the side of the road ? \n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1061767%2Fa978cea0cef310df39fd1ca4213efe44%2Fyaw.PNG?generation=1571873077976095&amp;alt=media)\n\n![](https://carsexplained.files.wordpress.com/2017/01/post1-2figure2.jpg)\n![](https://carsexplained.files.wordpress.com/2017/02/yaw.gif?w=920)\n\nReferences: https://carsexplained.wordpress.com/2017/02/21/fundamentals-of-car-science-pitch-and-roll/\n\n",
      "votes": 5
    },
    {
      "id": 656312,
      "postDate": "2019-10-24T06:17:28.527Z",
      "content": "<p>I think the yaw of a car that is parked on the side of the road is pi/2, but in the dataset it is nearly 0, and the pitch is nearly pi/2.So I think the yaw and pitch are exchanged.</p>",
      "rawMarkdown": "I think the yaw of a car that is parked on the side of the road is pi/2, but in the dataset it is nearly 0, and the pitch is nearly pi/2.So I think the yaw and pitch are exchanged.",
      "votes": 3
    },
    {
      "id": 658347,
      "postDate": "2019-10-25T22:56:34.047Z",
      "content": "<p>Check out <a href=\"https://www.kaggle.com/theshockwaverider/eda-visualization-baseline\">my notebook</a>. It contains analysis of distributions of yaw, pitch and roll with examples from the dataset. Pitch and yaw are definitely mixed up.\nAlso there is a simple function to convert x, y, z to pixel coordinates.</p>",
      "rawMarkdown": "Check out [my notebook](https://www.kaggle.com/theshockwaverider/eda-visualization-baseline). It contains analysis of distributions of yaw, pitch and roll with examples from the dataset. Pitch and yaw are definitely mixed up.\nAlso there is a simple function to convert x, y, z to pixel coordinates.",
      "votes": 2
    },
    {
      "id": 656555,
      "postDate": "2019-10-24T11:43:43.867Z",
      "content": "<p>Maybe the yaw,pitch and roll are related to the difination of the car's coordinate system.\nAnd the value of (x,y,z) is also confusing..Can't find the direction of Y axis.</p>",
      "rawMarkdown": "Maybe the yaw,pitch and roll are related to the difination of the car's coordinate system.\nAnd the value of (x,y,z) is also confusing..Can't find the direction of Y axis."
    },
    {
      "id": 656232,
      "postDate": "2019-10-24T03:13:14.923Z",
      "content": "<p>I guess its relative to the current view so when looking at vehicles facing the same way you dont get as much yaw</p>",
      "rawMarkdown": "I guess its relative to the current view so when looking at vehicles facing the same way you dont get as much yaw",
      "replies": [
        {
          "id": 658150,
          "postDate": "2019-10-25T17:57:16.640Z",
          "content": "<p>But there should be vehicles parked on the side. There are absolutely no vehicles with yaw or pi/2. So, I am guessing the order of the variables is mixed up or something. </p>",
          "rawMarkdown": "But there should be vehicles parked on the side. There are absolutely no vehicles with yaw or pi/2. So, I am guessing the order of the variables is mixed up or something. "
        },
        {
          "id": 661196,
          "postDate": "2019-10-30T02:17:24.373Z",
          "content": "<p>You probably should choose some to validate by hand. They probably excluede those. I didn't participate so idk much.</p>",
          "rawMarkdown": "You probably should choose some to validate by hand. They probably excluede those. I didn't participate so idk much."
        }
      ]
    },
    {
      "id": 659770,
      "postDate": "2019-10-28T08:45:19.550Z",
      "content": "<p>I think you need to interpret [roll,pitch,yaw] as the rotation around the axis [x,y,z] of the camera, not of the car as you show in your pictures. That's not the most intuitive way to have such a representation, but if you do interpret them at this, the observed distribution makes sense:\n- \"roll\" is around the X axis of the camera, which is (almost) horizontal, from left to right, so roll is almost 0 all the time (a car is horizontal). The camera is slightly not horizontal, so the distribution is around 0.15rad, not around 0, but apart from that, we have a nice gaussian with a small sigma\n- \"pitch\" is around the Y axis, which is (almost) parallel to the gravity vector. So we get angles all over the domain (a car can have any orientation for this axis), with large mode at 0 and pi (car in the same direction as us, and in opposite direction)\n- \"yaw\" is around the Z axis, again, almost horizontal, in the direction of driving. We should have something always close to 0 here... but we get only value at pi (or -pi). Not sure exactly on the why we have this, but that's the only \"problem\"</p>\n\n<p>It make sense to have the rotation wrt the camera axis, and not the car axis, because we don't have the extrinsic parameters of the camera (the relation between the camera reference frame and the world or car reference frame)</p>\n\n<p>Using this interpretation, we don't need to swap yaw and pitch (but I still do it when trying to interpret the results, it's almost equivalent if we assume that the camera and car reference frame are only rotated by 90 deg rotations)</p>",
      "rawMarkdown": "I think you need to interpret [roll,pitch,yaw] as the rotation around the axis [x,y,z] of the camera, not of the car as you show in your pictures. That's not the most intuitive way to have such a representation, but if you do interpret them at this, the observed distribution makes sense:\n- \"roll\" is around the X axis of the camera, which is (almost) horizontal, from left to right, so roll is almost 0 all the time (a car is horizontal). The camera is slightly not horizontal, so the distribution is around 0.15rad, not around 0, but apart from that, we have a nice gaussian with a small sigma\n- \"pitch\" is around the Y axis, which is (almost) parallel to the gravity vector. So we get angles all over the domain (a car can have any orientation for this axis), with large mode at 0 and pi (car in the same direction as us, and in opposite direction)\n- \"yaw\" is around the Z axis, again, almost horizontal, in the direction of driving. We should have something always close to 0 here... but we get only value at pi (or -pi). Not sure exactly on the why we have this, but that's the only \"problem\"\n\nIt make sense to have the rotation wrt the camera axis, and not the car axis, because we don't have the extrinsic parameters of the camera (the relation between the camera reference frame and the world or car reference frame)\n\nUsing this interpretation, we don't need to swap yaw and pitch (but I still do it when trying to interpret the results, it's almost equivalent if we assume that the camera and car reference frame are only rotated by 90 deg rotations)",
      "votes": 6,
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 658253,
      "author_name": "Ruslan Baynazarov",
      "author_url": "",
      "post_date": "2019-10-25T20:52:32.967000",
      "content": "<p>I guess yaw and pitch are mixed up. <br>\nHere is the distribution for \"pitch\":\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1634816%2F670f0dbf25e935d743fcb9ed69018aa3%2F__results___16_0.png?generation=1572093504165880&amp;alt=media\" alt=\"\">\nPitch cannot be that big! Those cars must be upside down -_-  </p>\n\n<p>Also, a few lines from <a href=\"https://www.kaggle.com/zstusnoopy/visualize-the-location-and-3d-bounding-box-of-car\">this notebook</a>:\n```</p>\n\n<h1>I think the pitch and yaw should be exchanged</h1>\n\n<p>yaw, pitch, roll = -pitch, -yaw, -roll\n```</p>",
      "votes": 5,
      "replies": []
    },
    {
      "id": 656312,
      "author_name": "Linye Li",
      "author_url": "",
      "post_date": "2019-10-24T06:17:28.527000",
      "content": "<p>I think the yaw of a car that is parked on the side of the road is pi/2, but in the dataset it is nearly 0, and the pitch is nearly pi/2.So I think the yaw and pitch are exchanged.</p>",
      "votes": 3,
      "replies": []
    },
    {
      "id": 658347,
      "author_name": "tswr",
      "author_url": "",
      "post_date": "2019-10-25T22:56:34.047000",
      "content": "<p>Check out <a href=\"https://www.kaggle.com/theshockwaverider/eda-visualization-baseline\">my notebook</a>. It contains analysis of distributions of yaw, pitch and roll with examples from the dataset. Pitch and yaw are definitely mixed up.\nAlso there is a simple function to convert x, y, z to pixel coordinates.</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 656555,
      "author_name": "lpc1996",
      "author_url": "",
      "post_date": "2019-10-24T11:43:43.867000",
      "content": "<p>Maybe the yaw,pitch and roll are related to the difination of the car's coordinate system.\nAnd the value of (x,y,z) is also confusing..Can't find the direction of Y axis.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 656232,
      "author_name": "Mekaveli.",
      "author_url": "",
      "post_date": "2019-10-24T03:13:14.923000",
      "content": "<p>I guess its relative to the current view so when looking at vehicles facing the same way you dont get as much yaw</p>",
      "votes": 0,
      "replies": [
        {
          "id": 658150,
          "author_name": "SK",
          "author_url": "",
          "post_date": "2019-10-25T17:57:16.640000",
          "content": "<p>But there should be vehicles parked on the side. There are absolutely no vehicles with yaw or pi/2. So, I am guessing the order of the variables is mixed up or something. </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 661196,
          "author_name": "Mekaveli.",
          "author_url": "",
          "post_date": "2019-10-30T02:17:24.373000",
          "content": "<p>You probably should choose some to validate by hand. They probably excluede those. I didn't participate so idk much.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 659770,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-10-28T08:45:19.550000",
      "content": "<p>I think you need to interpret [roll,pitch,yaw] as the rotation around the axis [x,y,z] of the camera, not of the car as you show in your pictures. That's not the most intuitive way to have such a representation, but if you do interpret them at this, the observed distribution makes sense:\n- \"roll\" is around the X axis of the camera, which is (almost) horizontal, from left to right, so roll is almost 0 all the time (a car is horizontal). The camera is slightly not horizontal, so the distribution is around 0.15rad, not around 0, but apart from that, we have a nice gaussian with a small sigma\n- \"pitch\" is around the Y axis, which is (almost) parallel to the gravity vector. So we get angles all over the domain (a car can have any orientation for this axis), with large mode at 0 and pi (car in the same direction as us, and in opposite direction)\n- \"yaw\" is around the Z axis, again, almost horizontal, in the direction of driving. We should have something always close to 0 here... but we get only value at pi (or -pi). Not sure exactly on the why we have this, but that's the only \"problem\"</p>\n\n<p>It make sense to have the rotation wrt the camera axis, and not the car axis, because we don't have the extrinsic parameters of the camera (the relation between the camera reference frame and the world or car reference frame)</p>\n\n<p>Using this interpretation, we don't need to swap yaw and pitch (but I still do it when trying to interpret the results, it's almost equivalent if we assume that the camera and car reference frame are only rotated by 90 deg rotations)</p>",
      "votes": 6,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "658253": "I guess yaw and pitch are mixed up.  \nHere is the distribution for \"pitch\":\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1634816%2F670f0dbf25e935d743fcb9ed69018aa3%2F__results___16_0.png?generation=1572093504165880&amp;alt=media)\nPitch cannot be that big! Those cars must be upside down -_-  \n\nAlso, a few lines from [this notebook](https://www.kaggle.com/zstusnoopy/visualize-the-location-and-3d-bounding-box-of-car):\n```\n# I think the pitch and yaw should be exchanged\nyaw, pitch, roll = -pitch, -yaw, -roll\n```",
    "656113": "As shown in the table below, the \"yaw\" data in the training dataset seems to be constrained between -0.6 to 0.75 radians or so, while pitch and roll seem to vary between -pi to +pi. \n\nAs shown in the second pic below, yaw seems to indicate rotation about a vertical axis, which means the car should be able to do a full 360-degrees with respect to yaw. \n\nIs there a reason for this ? Is the yaw = pi/2 for a car that is parked on the side of the road ? \n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1061767%2Fa978cea0cef310df39fd1ca4213efe44%2Fyaw.PNG?generation=1571873077976095&amp;alt=media)\n\n![](https://carsexplained.files.wordpress.com/2017/01/post1-2figure2.jpg)\n![](https://carsexplained.files.wordpress.com/2017/02/yaw.gif?w=920)\n\nReferences: https://carsexplained.wordpress.com/2017/02/21/fundamentals-of-car-science-pitch-and-roll/\n\n",
    "656312": "I think the yaw of a car that is parked on the side of the road is pi/2, but in the dataset it is nearly 0, and the pitch is nearly pi/2.So I think the yaw and pitch are exchanged.",
    "658347": "Check out [my notebook](https://www.kaggle.com/theshockwaverider/eda-visualization-baseline). It contains analysis of distributions of yaw, pitch and roll with examples from the dataset. Pitch and yaw are definitely mixed up.\nAlso there is a simple function to convert x, y, z to pixel coordinates.",
    "656555": "Maybe the yaw,pitch and roll are related to the difination of the car's coordinate system.\nAnd the value of (x,y,z) is also confusing..Can't find the direction of Y axis.",
    "656232": "I guess its relative to the current view so when looking at vehicles facing the same way you dont get as much yaw",
    "659770": "I think you need to interpret [roll,pitch,yaw] as the rotation around the axis [x,y,z] of the camera, not of the car as you show in your pictures. That's not the most intuitive way to have such a representation, but if you do interpret them at this, the observed distribution makes sense:\n- \"roll\" is around the X axis of the camera, which is (almost) horizontal, from left to right, so roll is almost 0 all the time (a car is horizontal). The camera is slightly not horizontal, so the distribution is around 0.15rad, not around 0, but apart from that, we have a nice gaussian with a small sigma\n- \"pitch\" is around the Y axis, which is (almost) parallel to the gravity vector. So we get angles all over the domain (a car can have any orientation for this axis), with large mode at 0 and pi (car in the same direction as us, and in opposite direction)\n- \"yaw\" is around the Z axis, again, almost horizontal, in the direction of driving. We should have something always close to 0 here... but we get only value at pi (or -pi). Not sure exactly on the why we have this, but that's the only \"problem\"\n\nIt make sense to have the rotation wrt the camera axis, and not the car axis, because we don't have the extrinsic parameters of the camera (the relation between the camera reference frame and the world or car reference frame)\n\nUsing this interpretation, we don't need to swap yaw and pitch (but I still do it when trying to interpret the results, it's almost equivalent if we assume that the camera and car reference frame are only rotated by 90 deg rotations)"
  }
}