icub-tech-iit / xcub-moveit2

Collect the outcomes of our study on the use of MoveIT with our robots
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

CI to compile ros2 packages #23

Closed martinaxgloria closed 9 months ago

martinaxgloria commented 9 months ago

This PR introduces a workflow to check whether all the ros2 packages contained inside this repo are properly compiled without any errors. It includes:

Moreover, I refactored the repository to have the ros2 packages under the src folder. In this way, they could be compiled starting from the root, i.e.:

git clone https://github.com/icub-tech-iit/study-moveit
cd study-moveit
colcon build
source install/setup.bash

instead of:

mkdir -p ros2_ws/src
cd ros2_ws/src
git clone https://github.com/icub-tech-iit/study-moveit
cd ..
colcon build
source install/setup.bash

In my opinion, this makes the repository and the folder tree cleaner and easier to compile. But if you do not agree, I could revert it.

I tried it on my fork and this was the result:

Screenshot from 2023-11-28 16-18-54

traversaro commented 9 months ago

In my opinion, this makes the repository and the folder tree cleaner and easier to compile. But if you do not agree, I could revert it.

I do not have a strong opinion on this, but all the ros2 repos I know of, even if composed by different C++/Python packages in different directories, place this package directories directly in the root, with no src directory, see for example:

martinaxgloria commented 9 months ago

Hi @traversaro, thanks for the feedback! Actually, you're right, it's better to have the packages in the root to be aligned to what already exists. I'm going to revert it and fix the CI

martinaxgloria commented 9 months ago

I reverted the changes regarding the folder tree, fixed the CI, and added a check to force the CI to exit when almost one of the packages fails. This is why I tried to run the workflow with an error but the CI completed the jobs successfully:

image