# Jupyter Notebooks in Undergraduate Mobile Robotics Courses: Educational Tool and Case Study
## 4 Methods
### Educational Tool
#### 4.2.2 The Collection of Jupyter Notebooks
** The first assignment is to implement robot movement using _pose composition_ and _Gaussian noise_, then generating a number of movement commands to traverse a square route, something which will become a familiar routine in the following tasks. * **Differential motion with velocity commands. ** The following notebook introduces the equations for the _differential motion model_. Then asks the student to use _velocity commands_ to move the robot in a serpentine trajectory as seen in Figure 2(a). * **Differential drive with odometry commands**. Lastly, in order to reinforce the concepts of _odometry commands_ the students apply them in both the _analytical form_\((\tilde{x}_{t},\Sigma_{x_{t}})\), and the _sample form_. The latter one is of special interest because of its utilization in particle filters [59]. It also better represents the real movement of a robot base (see Figure 2(b)). _Lab. 3:_ Robot Sensing  
_Problem description._ The gathering of information from the environment, along with the movement models explained in the previous notebooks, comprise the essential basis for mobile robots (recall _Mobile robots_ block in the course syllabus, Table 1). It is an incredibly broad topic, given the variety of sensors there exist, which can be roughly grouped into:  
* **Proprioceptive sensors:** those measuring the internal status of the robot: battery, position, acceleration, inclination. Some examples are: optical encoders, heading sensors (compass, gyroscopes), accelerometers, Inertial Measurement Units (IMUs), potentiometers, etc. * **Exteroceptive sensors:** sensors gathering information from the environment, like distance and/or angle to objects, light intensity reflected by the environment, etc. Examples of these kind of sensors could be range sensors (sonar, laser scanner [64], infrared, etc.) or vision based (cameras or RGB-D cameras [65]). Real sensors do not deliver the exact truth of the quantities they are measuring, but a perturbed version. Thus, their operation is modeled through a probabilistic sensor model defining the function \(p(z|v)\), where \(z\) is the variable representing the measurement and \(v\) the ground truth. For example, when dealing with a laser scan measuring distances, such a  
Figure 3: Example of _demos_ in notebooks from the second _lab_, covering robot motion. (**a**) Simulation of ideal robot motion (red triangles), along with confidence ellipses representing the uncertainty associated with the motion and points stating for sampled positions. (**b**) Demo of how the pose of a robot is represented in sampling form. The expected pose of a robot is represented by the triangle in red. The point clouds are the pose samples at each step. model is defined as \(p(z|x,m)\), being \(x\) the sensor pose in the map \(m\) of the environment. To illustrate the basic concepts of this topic, we mainly focus on landmark observation models dealing with range-bearing sensors (e.g., stereo cameras, features in a scan, etc.). Such models consider that the map of the environment is a collection of landmarks \(m=\{m_{i}\}\), \(i=1,\ldots,N\), hence simplifying problems like _data association_. _Proposed notebook._ Students are challenged to implement a simulation of a range-bearing sensor and manipulate the information in a number of instances. Although it may seem rather plain in comparison to some of the latter exercises, this topic introduces some core concepts applied in latter stages such as: transforming an observation from the robot p.o.v. to the world frame and vice versa, transforming an observation to another robot's p.o.v., or combining the information of different observations. It also reinforces some concepts that, until now, were mentioned only in passing. Moreover, the student has also to implement and compute the interesting inverse composition of poses and the Jacobians of the range-bearing model. _Lab.