Skip to content

Colcon Build Error on opennav_coverage source code with F2C v1.2.1 #86

Open
@catherinec57

Description

@catherinec57

Colcon build with Humble on Raspberry Pi 4B running Ubuntu 22.04 gives error:

In file included from /home/cstar-capstone/ros2_ws/install/fields2cover/include/fields2cover.h:35, from /home/cstar-capstone/ros2_ws/src/opennav_coverage/opennav_coverage/include/opennav_coverage/swath_generator.hpp:22, from /home/cstar-capstone/ros2_ws/src/opennav_coverage/opennav_coverage/src/swath_generator.cpp:18: /home/cstar-capstone/ros2_ws/install/fields2cover/include/fields2cover/objectives/rp_obj/complete_turn_path_obj.h: In constructor ‘f2c::obj::CompleteTurnPathObj<T, R>::CompleteTurnPathObj(const F2CRobot&)’: /home/cstar-capstone/ros2_ws/install/fields2cover/include/fields2cover/objectives/rp_obj/complete_turn_path_obj.h:58:64: error: declaration of ‘robot’ shadows a member of ‘f2c::obj::CompleteTurnPathObj<T, R>’ [-Werror=shadow] 58 | CompleteTurnPathObj<T, R>::CompleteTurnPathObj(const F2CRobot& robot) { | ~~~~~~~~~~~~~~~~^~~~~ /home/cstar-capstone/ros2_ws/install/fields2cover/include/fields2cover/objectives/rp_obj/complete_turn_path_obj.h:52:12: note: shadowed declaration is here 52 | F2CRobot robot; | ^~~~~ In file included from /home/cstar-capstone/ros2_ws/install/fields2cover/include/fields2cover.h:35, from /home/cstar-capstone/ros2_ws/src/opennav_coverage/opennav_coverage/include/opennav_coverage/headland_generator.hpp:21, from /home/cstar-capstone/ros2_ws/src/opennav_coverage/opennav_coverage/src/headland_generator.cpp:18: /home/cstar-capstone/ros2_ws/install/fields2cover/include/fields2cover/objectives/rp_obj/complete_turn_path_obj.h: In constructor ‘f2c::obj::CompleteTurnPathObj<T, R>::CompleteTurnPathObj(const F2CRobot&)’: /home/cstar-capstone/ros2_ws/install/fields2cover/include/fields2cover/objectives/rp_obj/complete_turn_path_obj.h:58:64: error: declaration of ‘robot’ shadows a member of ‘f2c::obj::CompleteTurnPathObj<T, R>’ [-Werror=shadow] 58 | CompleteTurnPathObj<T, R>::CompleteTurnPathObj(const F2CRobot& robot) { | ~~~~~~~~~~~~~~~~^~~~~ /home/cstar-capstone/ros2_ws/install/fields2cover/include/fields2cover/objectives/rp_obj/complete_turn_path_obj.h:52:12: note: shadowed declaration is here 52 | F2CRobot robot; | ^~~~~ In file included from /home/cstar-capstone/ros2_ws/install/fields2cover/include/fields2cover.h:35, from /home/cstar-capstone/ros2_ws/src/opennav_coverage/opennav_coverage/include/opennav_coverage/coverage_server.hpp:21, from /home/cstar-capstone/ros2_ws/src/opennav_coverage/opennav_coverage/src/coverage_server.cpp:15: /home/cstar-capstone/ros2_ws/install/fields2cover/include/fields2cover/objectives/rp_obj/complete_turn_path_obj.h: In constructor ‘f2c::obj::CompleteTurnPathObj<T, R>::CompleteTurnPathObj(const F2CRobot&)’: /home/cstar-capstone/ros2_ws/install/fields2cover/include/fields2cover/objectives/rp_obj/complete_turn_path_obj.h:58:64: error: declaration of ‘robot’ shadows a member of ‘f2c::obj::CompleteTurnPathObj<T, R>’ [-Werror=shadow] 58 | CompleteTurnPathObj<T, R>::CompleteTurnPathObj(const F2CRobot& robot) { | ~~~~~~~~~~~~~~~~^~~~~ /home/cstar-capstone/ros2_ws/install/fields2cover/include/fields2cover/objectives/rp_obj/complete_turn_path_obj.h:52:12: note: shadowed declaration is here 52 | F2CRobot robot; | ^~~~~ In file included from /home/cstar-capstone/ros2_ws/install/fields2cover/include/fields2cover.h:35, from /home/cstar-capstone/ros2_ws/src/opennav_coverage/opennav_coverage/include/opennav_coverage/route_generator.hpp:21, from /home/cstar-capstone/ros2_ws/src/opennav_coverage/opennav_coverage/src/route_generator.cpp:18: /home/cstar-capstone/ros2_ws/install/fields2cover/include/fields2cover/objectives/rp_obj/complete_turn_path_obj.h: In constructor ‘f2c::obj::CompleteTurnPathObj<T, R>::CompleteTurnPathObj(const F2CRobot&)’: /home/cstar-capstone/ros2_ws/install/fields2cover/include/fields2cover/objectives/rp_obj/complete_turn_path_obj.h:58:64: error: declaration of ‘robot’ shadows a member of ‘f2c::obj::CompleteTurnPathObj<T, R>’ [-Werror=shadow] 58 | CompleteTurnPathObj<T, R>::CompleteTurnPathObj(const F2CRobot& robot) { | ~~~~~~~~~~~~~~~~^~~~~ /home/cstar-capstone/ros2_ws/install/fields2cover/include/fields2cover/objectives/rp_obj/complete_turn_path_obj.h:52:12: note: shadowed declaration is here 52 | F2CRobot robot;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions