ros-industrial / ros2_canopen

CANopen driver framework for ROS2
https://ros-industrial.github.io/ros2_canopen/manual/rolling/
143 stars 63 forks source link

Install Lely CANopen using PPA #38

Open borongyuan opened 2 years ago

borongyuan commented 2 years ago

Hi, It looks like some of the compilation warnings are caused by Lely CANopen (see #35). Is it necessary for us to compile and install Lely CANopen from source? Unlike other compilation warnings, Lely CANopen warnings are treated as Errors. This increases the execution time of ’colcon build’ each time. Since Lely CANopen provides Ubuntu PPA, how about installing from PPA?

hellantos commented 2 years ago

It looks like some of the compilation warnings are caused by Lely CANopen (see https://github.com/ros-industrial/ros2_canopen/issues/35). Is it necessary for us to compile and install Lely CANopen from source?

No not necessary. We created the wrapper to have control over the verbosity of LelyCANopen and with a future binary release via rosdistro in mind.

Unlike other compilation warnings, Lely CANopen warnings are treated as Errors.

Automake marks them as error and prints to std:err, but they are not picked up by colcon as errors. Probably, there is some flag for autotools to not print this, but I am not an expert and haven't found the option yet.

This increases the execution time of ’colcon build’ each time.

I think it is not the error/warning but the cmake wrapper around Lely CANopen autotools, that is not perfect. It will rebuild on every colcon build execution. This can probably be resolved by changing this part of the CMakeLists.txt file in lely_core_libraries, which basically changes the timestamps on files so that the library is rebuilt everytime you execute colcon - but I need to check.

UPDATE_COMMAND touch <SOURCE_DIR>/config.h 
    COMMAND mkdir -p <SOURCE_DIR>/include <SOURCE_DIR>/lib 
    COMMAND touch <SOURCE_DIR>/python/dcf-tools/README.md

This problem might get solved when someone contributes an autotools plugin for colcon.

Since Lely CANopen provides Ubuntu PPA, how about installing from PPA?

This is possible. We created the wrapper for LelyCANopen with the goal of having a binary release of ros2_canopen at some point. Probably, it would be a good idea to put lely_core_libraries package into another repository to give users/devs the option to install from PPA.