Skip to content

Conversation

@discodyer
Copy link

Description

This PR fixes a compilation issue caused by duplicate definition of the collect_metrics gflags flag.

Issue

as issue #80 said, running cartographer_ros fails with the following error:

 [cartographer_node-2] ERROR: flag 'collect_metrics' was defined more than once (in files '/home/.../cartographer_ws/src/cartographer_ros/cartographer_ros/src/offline_node.cpp' and '/home/.../cartographer_ws/src/cartographer_ros/cartographer_ros/src/node_main.cpp').

This occurred because src/offline_node.cpp was being linked into both the cartographer_ros shared library and the cartographer_offline_node executable, causing a symbol conflict.

Changes Made

  1. Removed src/offline_node.cpp from the shared library source list to avoid duplicate symbol definitions.
  2. Added src/offline_node.cpp to the cartographer_offline_node executable target.
  3. Added missing urdf dependency to the offline node target.
  4. Added macro definitions PRE_JAZZY_SERIALIZED_BAG_MSG_FIELD_NAME to maintain consistency.

Verification

  • All targets build successfully without new warnings.
  • Verified in ROS Humble environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant