Skip to content

Commit

Permalink
Entry three added
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanFernandezEva committed Oct 27, 2024
1 parent 27fafc4 commit 5f7bbc4
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/_posts/2024-10-27-Week3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Fixing Build Error
date: 2024-10-27 11:00:00 +0100
tags: [weekly progress]
author: juan
img_path: /assets/img/
toc: true
comments: true
---

## Fixing a Build Error

This week I was tasked to help one of my peers to solve a problem involving building a RADI.

## The Problem

In one of the branches in the Robotics Academy repository, we were trying to make a version of RA with both Gazebo 11 and Gazebo Harmonic working together. It also had its own branch on the Robotics Infrastructure and Robotics Application Manager repositories. When building the RADI for this branch, it printed an error, saying that it couldn't find a gazeboConfig.cmake file.

## The Solution

The script build.sh uses two dockerfiles, found in the same directory. Dockerfile.dependencies_humble which builds the base image and Dockerfile.mini_humble which builds the Robotics Academy Backend image. We were working on our own branch trying to make it work but there was already another branch in the RA repository where someone else managed to succesfully build the RADI with both versions of Gazebo running.

I looked at these files in both branches to see any differences and in our branch, some lines were commented. One in mini_humble, `RUN /bin/bash -c "source /home/drones_ws/install/setup.bash; rosdep install --from-paths src --ignore-src -r --rosdistro humble -y"`, just before the line that gives the error message which builds the workspace of Robotics Academy, `RUN /bin/bash -c "source /opt/ros/humble/setup.bash; colcon build --symlink-install"`. The other one was in dependencies_humble which builds the workspace of aerostack2 (from drones_ws): `RUN /bin/bash -c "source /opt/ros/humble/setup.bash; colcon build --symlink-install"`.

Undoing the comment in the mini_humble line, it solved the error of not finding gazeboConfig.cmake but got replaced with another error about aerostack2. This was of course related to the line commented in Dockerfile.dependencies_humble so I undid the comment in that line as well and now another problem happened. This time, when building the base image, just when it reaches the line that builds the aerostack2 workspace, my PC freezes and I have to restart it, this problem also was happening to my peer. In order to see what was freezing our computers, I replaced that line in dependencies_humble with multiple ones, using colcon build but only for one package in aerostack2, one by one, and check which one freezes the PC. However, after doing that, the script managed to build the RADI succesfully, so the problem was that when trying to use colcon build on the entire aerostack2 workspace, it was too much work for our computers.

0 comments on commit 5f7bbc4

Please sign in to comment.