Modified 2018-06-22 by Andrea Censi
Modified 2018-06-22 by Andrea Censi
In order to uniquely specify a position in some space, we use some numbers, coordinates, in a coordinate system. For example, in daily life, we would use the intersection of two streets, each with a unique name in the city, to specify the location of some cafe. If you find yourself in the ocean, you might communicate your location to someone by telling them the latitude and longitude readout on your GPS device. Generally speaking, a coordinate system provides us a way to denote any position in an unambiguous way. So you can communicate any position to another person, and by using the given coordinates, that person can arrive at the same exact position in space. Note, however, different coordinates can correspond to the same point.
Modified 2018-06-22 by Andrea Censi
Coordinate system A coordinate system is a surjective function mapping from a tuple of reals to some space $S$, respecting the local topology. (The local topology, which is beyond the scope of this chapter, roughly means that “nearby” points have coordinates “close” together.)
Modified 2018-06-22 by Andrea Censi
Because the ability of naming or specifying a point in space is so fundamentally important, we often take that coordinates given by some coordinate system, often a Cartesian coordinate system, as the name of the point.
Modified 2018-06-22 by Andrea Censi
Consider the real number line $\reals$ as the space $S$. We can name an arbitrary point $x \in \reals$, which happens to be a real number, by itself. So to check with our definition, any two distinct points on the real line would have two distinct coordinates. Furthermore any point has a coordinate. Let’s call this coordinate system $A$.
One should note that the coordinate system given above is not the only possible way to name the points on a real line. We can assign coordinate $-x$ to the point $x \in \reals$ and obtain an equally valid coordinate system $B$. To be more specific, given a point $p$ with the coordinate $a$ in the first coordinate system $A$, we know that in the second coordinate system $B$, $p$ would have the coordinate $-a$. Therefore, there is a way to translate between coordinates in the two systems.
Modified 2018-06-22 by Andrea Censi
Consider the real plane $\reals^2$ as the space $S$. This is an important space within robotics and beyond. It can be used to represent images, with each pixel having its own position, or the location of your Duckiebot in Duckietown.
We can draw two perpendicular lines on the plane $S$. We call these two lines the $x$-axis and the $y$-axis. We assign $(0, 0)$ to the point of intersection, which we call the origin. Then we decide on the positive directions and units for each axis and the unit. We will use coordinates $(x, y)$ to specify a point located $x$-many units in the positive $x$-direction and $y$-many units in the positive $y$-direction away from the origin, respectively. If we draw the axis-parallel lines with integral $x$ coordinate and lines with integral $y$ coordinate, we obtain a visualization similar to that in Figure 5.2.
When representing the location of your Duckiebot in Duckietown, you might decide to choose a corner of the map as the origin and take east as the positive $x$-direction and north as the positive $y$-direction, and 1 meter as the unit length. In this case, a Duckiebot with location $(1, -2)$ would sit at 1 meter east and 2 meters south of the designated corner of the map.
Image space
It is customary to put the origin of an image at the top-left corner with the $x$-axis being horizontal and increasing to the right and the $y$-axis vertical and increasing downwards. In this way, the $x$ and $y$ coordinates index the column and row, respectively, of a particular pixel in the image. Such a convention is observed in OpenCV
and other software libraries.
An alternative coordinate system for the plane is the polar coordinate system, where we specify a point by its direction and distance from a fixed reference point. To set up a polar coordinate system, you first decide on the pole, the reference point, then the polar axis, the reference direction. We will call the distance from the pole, the radial coordinate or radius, commonly denoted by $r$ or $\rho$, and the angle from the polar axis, the angular coordinate or polar angle, commonly denoted by $\phi$, $\varphi$ or $\theta$. See an example in Figure 5.4.
Note that in a polar coordinate system, a point has many equally valid names.
Exercise to readers: provide two such points and a few of their coordinates each.
Now, consider a Cartesian coordinate system $C$ whose origin is at the pole and its positive $x$-direction coincides with the polar axis. It is not hard to convert polar coordinates to Cartesian coordinates in $C$.
Exercise to readers: consult Figure 5.6 and write out the conversion formulae.)
Given the many options, you might wonder which coordinate system to use in any given situation. The answer is a practical one. Choose the one that helps simplify the problem at hand. As a trivial example, consider the equation for a unit circle. In a Cartesian coordinate system, it would be $x^2 + y^2 = 1$ whereas in a polar coordinate system, it would be much simpler: $r = 1$.
Exercise to readers: how about the equation for a straight line in polar coordinates?
Modified 2018-06-22 by Andrea Censi
This is an important space since we live in a three-dimensional world. Since many of our robots operate in this same world, many robots similarly represent coordinates in three dimensions, including unmanned aerial vehicles (UAVs) and autonomous underwater vehicles (AUVs).
Suppose the plane is the page or screen you are reading from, which is just a slice through the 3D space around it, we can extend a 2D Cartesian coordinate system on the plane to 3D by adding a $z$-axis that is perpendicular to the page, i.e., the $z$-, $x$-, and $y$-axis are mutually perpendicular. As done before, we need to choose a positive $z$-direction and there are two choices: coming out of the page or going into the page. They form the right-handed coordinate system or the left-handed coordinate system, respectively. We shall use right-handed coordinate systems unless otherwise noted. For more on handedness, see Wikipedia. Now the resulting coordinates become $(x, y, z)$, see Figure 5.8.
Similarly, we can extend the polar coordinate systems on the page or screen to 3D by defining a zenith direction (upwards) perpendicular to the plane, the polar angle to be the angle away from zenith, and the azimuth angle to be the orthogonal projection of a point’s angle away from the polar axis on the plane. Together, a point has coordinates $(r, \theta, \phi)$ where $\theta$ denotes the polar angle and $\phi$, the azimuth angle. See Figure 5.10.
Exercise to readers: how to convert spherical coordinates to 3D Cartesian coordinates? and back?
Modified 2018-06-22 by Andrea Censi
If you find this topic interesting, there are many more coordinate systems than the ones covered here, such as the:
cylindrical coordinate system in 3D space and
parabolic coordinate system in 2D space.
Maintainer: Falcon Dai
No questions found. You can ask a question on the website.