Repository navigation
Migrate to Fields2Cover v2 (Jazzy) - #109
SteveMacenski merged 10 commits into
Conversation
Fields2Cover v2 changed several build-time integration details. Update both packages' CMake so they build against v2 regardless of how F2C is installed (source under /usr/local or the ROS apt package ros-humble-fields2cover under /opt/ros): - Link GDAL explicitly (GDAL::GDAL). v2's exported target no longer propagates GDAL as an interface dependency, so consumers that emit OGR symbols inline must link it themselves. - Resolve tinyxml2 in opennav_row_coverage via tinyxml2_vendor + find_package(TinyXML2); the system libtinyxml2-dev ships no CMake config. - Select the Fields2Cover target by name: source installs expose 'Fields2Cover', the ROS/apt package exposes 'Fields2Cover::Fields2Cover'. - Mark Fields2Cover headers as SYSTEM includes so their own warnings (e.g. -Wshadow in objectives/rp_obj/*) do not break this -Werror build when F2C lives outside the default system include path.
- deps.repos: pin Fields2Cover from v1.2.1-devel to v2.0.0 release tag - lint.yml / test.yml: bump actions/checkout v2→v4, action-ros-ci v0.3→v0.4 - .gitignore: exclude local dev files (.devcontainer, Fields2Cover, audit docs) - README: update Fields2Cover installation section to reflect v2 requirement
|
Hello, I am on Ros Jazzy with F2C installed via sudo apt install ros-jazzy-fields2cover. After cloning, switching to the opennav_coverage jazzy-v2 branch, and running colcon build. I am getting this error: I am assuming this has to do with the API changes, and is this expected since the migration is still ongoing? |
|
Hi @SirAbsolute0, Binary installation was supported until the 128th pr, but unfortunately this is no longer possible after that. Edit: Jazzy-v2 integration is not complete yet, I'm still working on it, but if you want to use it only with F2CV2 instead of trying new features, you can return to this PR from your git history. |
|
@u33549 Thank you for the comment. It was because of the pre-built binary. |
|
I'm glad the problem has been solved. |
Summary
Migrates
opennav_coverageandopennav_row_coveragefrom Fields2Cover 1.2.1 to Fields2Cover v2 (verified against v2.0.0) on thejazzybranch. All breaking API usage is updated so both packages build and pass their tests against F2C v2, with no intended behavioral change to the coverage pipeline.This is the
jazzycounterpart to thehumble-v2migration (PR #105), ported via cherry-pick (zero conflicts — thejazzybranch shares the samenav2_util-based API ashumble).Motivation
Fields2Cover v2 introduced several breaking API changes: encapsulated data models (private members + accessors), renamed methods, and a restructured robot model. This brings the coverage server stack up to date with the current F2C release on the Jazzy distribution.
Changes
Each commit is scoped to one migration area:
types.hppF2CRobotpublic fields → setters/getters (setWidth/setCovWidth/setMinTurningRadius/setMaxDiffCurv,getWidth/getCovWidth); same in both dynamic-parameter callbacksBruteForce::step_anglefield →setStepAngle()PathPlanning::searchBestPath→planPath;turn_point_distfield →TurningBase::setDiscretization()F2CFieldcoord_sys/fieldmembers →getCRS()/getField()utils.hppPath::states→operator[]/size()/back()(now private)LineString::StartPoint()/EndPoint()→ camelCasestartPoint()/endPoint()generateRandFieldargument order (swapped in v2) andPathState::typenow defaulting toSWATHHeadland and route generators required no source changes (their APIs are unchanged in v2).
Build system
GDAL::GDALexplicitly — v2's CMake target no longer propagates GDAL as an interface dependency.tinyxml2inopennav_row_coverageviatinyxml2_vendor+find_package(TinyXML2)(the systemlibtinyxml2-devships no CMake config).Fields2Coverfor source installs,Fields2Cover::Fields2Coverfor the ROS/apt package) and mark F2C headers asSYSTEMincludes so their own-Wshadowwarnings do not break this-Werrorbuild.<depend>libgdal-dev</depend>to bothpackage.xmlfiles (GDAL::GDAL is now linked explicitly but was not declared as a rosdep dependency).Validation
ros-jazzy-fields2cover).Notes
Verified against the F2C v2.0.0 tag. Behavioral parity with v1 (e.g. turn-point density via
setDiscretizationvs the oldturn_point_dist) was sanity-checked visually; a deterministic golden-output test would be a good follow-up.This PR also includes small CI fixes (
upload-artifact/checkoutaction bumps to v4,action-ros-cito v0.4, and pinning F2C tov2.0.0indeps.repos).Fields2Cover v2 is available as a binary package on Jazzy —
apt-get install ros-jazzy-fields2cover(currently 2.0.0) — so a from-source install is no longer required.rosdepresolves thefields2coverkey to it directly, and both packages build and pass tests against the apt package. CI still pins F2C tov2.0.0from source indeps.reposfor reproducibility.