Kelompok 3 - Latihan 1 Setup Python Dan Aljabar Linier
Kelompok 3 - Latihan 1 Setup Python Dan Aljabar Linier
1 Sheet 0
• Kelompok 3 :
1. Muhammad Farhan Fathurrahman (23219344)
2. Adityas Regita P. (23220020)
3. Satrya Budi Pratama (23219305)
Link Question : http://ais.informatik.uni-freiburg.de/teaching/ss20/robotics/exercises/sheet00.pdf
42.09920106253839
1
1.2.2 b. save plot to png
2
1.3 3 : Generating random numbers
we can find the random numpy function API on https://docs.scipy.org/doc/numpy-
1.14.0/reference/routines.random.html
np.
,→std(normal_distribution)))
np.
,→std(uniform_distribution)))
3
Uniform Distribution : Mean : 5.006721764270011 , Standart Deviation
2.8892754249272854
The result of mean and standart deviation of normal distribution seems same with 5 and 2
[10]: plt.hist(uniform_distribution)
[10]: (array([ 9940., 10066., 9938., 10040., 9982., 10011., 9857., 10062.,
9990., 10114.]),
array([1.91223788e-05, 1.00001324e+00, 2.00000735e+00, 3.00000146e+00,
3.99999558e+00, 4.99998969e+00, 5.99998380e+00, 6.99997792e+00,
7.99997203e+00, 8.99996614e+00, 9.99996026e+00]),
<a list of 10 Patch objects>)
4
1.3.5 e. random value same as we run again
add seed(1000) method before calling the random method. source https://pynative.com/python-
random-seed/.
2 Sheet 1
Link Question : http://ais.informatik.uni-freiburg.de/teaching/ss20/robotics/exercises/sheet01.pdf
5
2.1 Exercise 1 : 2D Transformation as Affine Matrices
6
7
8
2.2 Exercise 2 : Sensing
2.2.1 Use Python to plot all laser end-points in the frame of reference of the laser
rangefinder.
plt.xlabel('X (m)')
plt.ylabel('Y (m)')
9
2.2.2 The provided scan exhibits an unexpected property. Identify it an suggest an
explanation
From plot above, we can see some of the laser scan can penetrate the walls which should be
impossible. This can happen if the walls is a non-opaque walls such as glass.
2.2.3 Use homogeneous transformation matrices in Python to compute and plot the
centerof the robot, the center of the laser range finder, and all laser end-points
in worldcoordinates
[14]: # set robot location
x_robot = 1.0
y_robot = 0.5
theta_robot = np.pi / 4
10
[0, 0, 1]
])
11
12