In this blog, I'll be posting about my experience as an intern at JdeRobot.
First of all, during this eleventh week of internship, I have been mainly reviewing the Unibotics exercises’ evaluation button error, focusing first on the style evaluation, which did not work when activated.
Reviewing this error, I have discovered that it is happening because the content of the variable "context.localBackend" is now 'undefined', making it not possible to detect correctly if the user is using a local or remote backend and, consequently, not taking the correct style evaluation URL.
At the end, after several tests, I have managed to find a solution by introducing a new variable, which indicates if the user is using a local or remote RoboticsBackend, in the exercise configuration in "get_configuration_for_exercise" helper. In this way, the new variable "is_local_docker" can be taken from the exercise-config in the evaluation button script. This has solved the problem. I have reviewed the performance of the style evaluation in all exercises on D1 with RoboticsBackend 4.6.0 locally and it works correctly.
On the other hand, although the style evaluation already works correctly in all exercises, there is a problem with the efficacy evaluation by which it does not appear in the evaluation list of the following exercises: Follow Line, Basic Vacuum Cleaner and Localized Vacuum Cleaner. Therefore, I have created an issue to solve this problem.
In the end, after several tests, I have managed to fix that the efficacy evaluation option is shown in these exercises. The problem was due to a prop "efficacy" that should be indicated in the ExerciseControl component of the Unibotics exercise template and was not added when adapting the code to use Robotics Academy as a submodule. With this, the visibility problem has been fixed, but, when you activate the button, the efficacy evaluation does not work, showing various problems related to RAM commands, as well as certain variables that are not detected, among others.
With this in mind, I have managed to correct several of these errors, adapting the commands used in the “SendEfficacyEvaluation” helper to the ones of the new commsManager; fixing the access to the exercise_id in the exercise-config in "Evaluations.py"; and by adding the UpdateView component into the FollowLine template to give access to the HTML elements of the variables. However, although this fixes most of the previous errors, new errors have appeared linked to a not found URL, among others. Also, the final efficacy score in Follow Line is always 0.
In addition to the advances with the evaluations, I have opened an issue for the exercises’ maps problem to better try the new solution found. However, during this process I realized that the solution was not valid, as the path was being adapted to Unibotics particular case, making the maps stop working in Robotics Academy.
Because of this, I have tried to investigate and create both symbolic and hard links of the Robotics Academy submodule’s exercise folder in Unibotics in order to maintain the same path for both cases. In the end, none of these solutions have worked at all since Linux does not allow to create hard links of folders and the symbolic link is created in a way that does not allow proper access to the static resources of the exercises. Finally, Carlos, who was helping me reviewing the use of links and who reviewed the use of mounts, has found a solution that does not require the use of links, but obtains the static files through the Django settings. Once the solution was implemented, I have checked the maps locally and remotely on D2 and they are already loading correctly in all cases.
Also, I have been reviewing the frequency problem by which, when activating the exercises’ frequency button, the frequency values are always displayed as 0, except in the Follow Line and 3D Reconstruction exercises. I have discovered that the error comes from the “GUI.py” script of the exercises in which the methods responsible for sending the frequency values are missing. However, although I have tried to add this code to the Vacuum Cleaner exercise “GUI.py”, it did not work. It seems that it will be necessary to build a new RoboticsBackend image that includes these adaptations for it to work properly.
Finally, during the review of the style evaluation in the exercises, I have found an error in the Autoparking exercise that I mentioned to Carlos. This was related to a component of Obstacle Avoidance that was being used by error in Autoparking, causing it to show an error during application execution. Carlos has already fixed this.