This document contains a set of preliminary questions that should help you getting acquainted with HPP and the Python environment.
The questions are optional, and your answers should be directly prompted in the python shell (third terminal).
%~ \section{Motion planning}
\begin{questions}
\question Shoot a random configuration and display it. Find its nearest neighbour in each connected component. Connected component are indexed by a number, and we recall
that only two connected components are used in this context.
\begin{solutionorlines}
\begin{lstlisting}[language=python]
qrand = robot.shootRandomConfig ()
viewer (qrand)
qnear, dist = ps.getNearestNeighbor (qrand, 0)
qnear, dist = ps.getNearestNeighbor (qrand, 1)
\end{lstlisting}
\end{solutionorlines}
\question Build a direct path between configurations $q1$ and $q2$. Do the same between $q2$ and $q3$. Visualize the paths obtained with or without
setting the validation parameter to True. Explain the differences.
\question Write a small routine that shoots a random configuration, then tries to connect the nearest neighbour of the first connected component to this configuration.
The routine should return the valid portion of the path. Write a similar routine for the second connected component. Pay extra care to the actual
path that is relevant in this case. Vizualize the generated path to validate your answer.
\begin{solutionorlines}
\begin{lstlisting}[language=python]
todo
\end{lstlisting}
\end{solutionorlines}
\question Add the configurations and the paths from the previous question to the roadmap. You must first add the new configuration(s) to the roadmap, before