Skip to content

Conversation

@grizzi
Copy link
Contributor

@grizzi grizzi commented Oct 17, 2025

This solves various compilation errors. Probably as I am building with clang, I am seeing themwhile they probably went unnoticed when using gcc.

This is coupled with fixposition/fixposition-sdk#156

I am also a bit confused. How was this compiling before? I have just noticed that main is not working with the latest of fixposition_sdk. This has been compiling with the latest fixposition_sdk (patched with the referenced PR).

I would appreciate if you could make a new release incorporating these changes, so that also clang-based build can work. Thanks for your support!

case fpsdk::common::parser::nmea::NmeaSignalId::GLO_L1OF: return msg.consts.SIGNAL_ID_GLO_L1OF;
case fpsdk::common::parser::nmea::NmeaSignalId::GLO_L2OF: return msg.consts.SIGNAL_ID_GLO_L2OF;
case fpsdk::common::parser::nmea::NmeaSignalId::NAVIC_L5A: return msg.consts.SIGNAL_ID_NAVIC_L5A;
default: return msg.consts.SIGNAL_ID_UNSPECIFIED;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang complains about unhandled cases otherwise

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add and handle all enum values here and not use a default case. I'll fix that.

if (pub->get_subscription_count() > 0) {
fpmsgs::NmeaGga msg;
msg.talker = NmeaTalkerIdToMsg(msg, payload.talker);
msg.talker = NmeaTalkerIdToMsg(msg, payload.talker_);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you want to align conventions and remove the underscore from talker_, being this a public member

Comment on lines +670 to +671
msg.latitude = (payload.ll.latlon_valid ? payload.ll.lat : NAN);
msg.longitude = (payload.ll.latlon_valid ? payload.ll.lon : NAN);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

llh does not exist on this struct

// Output jump warning
if (params_.cov_warning_ && odometry_data.valid && jump_detector_.Check(odometry_data)) {
RCLCPP_WARN(logger_, jump_detector_.warning_.c_str());
RCLCPP_WARN(logger_, "%s", jump_detector_.warning_.c_str());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second argument should be a format string

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's better. Thanks.

@flipflip8952
Copy link
Contributor

Hi. The fixpostion_driver is tested and linked to a specific version (commit) of the Fixposition SDK. If you use the correct commit in the SDK, most of the compilation problems you see won't appear. Basically all but the "clang stuff" should not be a problem (so says our CI [1], see also [2]). For this purpose the fixposition_driver repo comes with the SDK as a git submodule, which links it to the correct version (commit).

The non-clang compilation problems you see are very recent changes/additions/fixes to the SDK. We'll update the fixposition_driver accordingly. Until then, please use this Fixposition SDK commit.

I'll have a look at that in the next days/week(s).

[1] https://github.com/fixposition/fixposition_driver/actions/runs/18140587873
[2] #91

@flipflip8952
Copy link
Contributor

(OK, I see now that clang related problems are only in the SDK.)

@flipflip8952 flipflip8952 marked this pull request as draft October 17, 2025 15:07
@flipflip8952 flipflip8952 self-assigned this Oct 17, 2025
@grizzi
Copy link
Contributor Author

grizzi commented Oct 20, 2025

Attempt 1 - Latest driver tag and SDK pointed to from the driver commit

  • Fixposition driver: 8.0.2
  • Fixposition sdk: 4822a88
Starting >>> fixposition_driver_lib
Starting >>> rtcm_msgs
--- stderr: fixposition_driver_lib                                                                       
/home/arc/robot/external/fixposition_driver/fixposition_driver_lib/src/fixposition_driver.cpp:42:5: error: no matching constructor for initialization of 'fpsdk::common::thread::Thread'
   42 |     worker_   { "driver", std::bind(&FixpositionDriver::Worker, this, std::placeholders::_1) }  // clang-format on
      |     ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/etc/arc/releases/local/colcon/install/fpsdk_common/include/fpsdk_common/thread.hpp:200:5: note: candidate constructor not viable: no known conversion from 'typename _Bind_helper<__is_socketlike<void (FixpositionDriver::*)(void *)>::value, void (FixpositionDriver::*)(void *), FixpositionDriver *, const _Placeholder<1> &>::type' (aka '_Bind<void (fixposition::FixpositionDriver::*(fixposition::FixpositionDriver *, std::_Placeholder<1>))(void *)>') to 'ThreadFunc' (aka 'function<bool (Thread &, void *)>') for 2nd argument
  200 |     Thread(const std::string& name, ThreadFunc func, void* arg = nullptr, PrepFunc prep = nullptr,
      |     ^                               ~~~~~~~~~~~~~~~
/etc/arc/releases/local/colcon/install/fpsdk_common/include/fpsdk_common/thread.hpp:161:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
  161 | class Thread
      |       ^~~~~~
/home/arc/robot/external/fixposition_driver/fixposition_driver_lib/src/fixposition_driver.cpp:314:17: error: value of type 'WaitRes' is not contextually convertible to 'bool'
  314 |             if (worker_.Sleep(params_.reconnect_delay_ * 1000)) {
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
gmake[2]: *** [CMakeFiles/fixposition_driver_lib.dir/build.make:76: CMakeFiles/fixposition_driver_lib.dir/src/fixposition_driver.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
/home/arc/robot/external/fixposition_driver/fixposition_driver_lib/src/helper.cpp:307:19: error: no member named 'llh' in 'fpsdk::common::parser::nmea::NmeaRmcPayload'; did you mean 'll'?
  307 |     else if (rmc_.llh.latlon_valid) { llh_ = rmc_.llh; }
      |                   ^~~
      |                   ll
/etc/arc/releases/local/colcon/install/fpsdk_common/include/fpsdk_common/parser/nmea.hpp:586:13: note: 'll' declared here
  586 |     NmeaLlh ll;                                                  //!< Position (no height)
      |             ^
/home/arc/robot/external/fixposition_driver/fixposition_driver_lib/src/helper.cpp:307:51: error: no member named 'llh' in 'fpsdk::common::parser::nmea::NmeaRmcPayload'; did you mean 'll'?
  307 |     else if (rmc_.llh.latlon_valid) { llh_ = rmc_.llh; }
      |                                                   ^~~
      |                                                   ll
/etc/arc/releases/local/colcon/install/fpsdk_common/include/fpsdk_common/parser/nmea.hpp:586:13: note: 'll' declared here
  586 |     NmeaLlh ll;                                                  //!< Position (no height)
      |             ^
2 errors generated.
gmake[2]: *** [CMakeFiles/fixposition_driver_lib.dir/build.make:90: CMakeFiles/fixposition_driver_lib.dir/src/helper.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/fixposition_driver_lib.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
---
Failed   <<< fixposition_driver_lib [1.72s, exited with code 2]
Aborted  <<< rtcm_msgs [1.73s]

Attempt 2: Building fpsdk-common on the commit suggested in the previous comment

fpsdk-common: 53fa5b5

/home/arc/robot/external/fixposition_driver/fixposition-sdk/fpsdk_common/include/fpsdk_common/parser/ubx.hpp:1020:97: note: place parentheses around the '+' expression to silence this warning
 1019 |     sizeof(UBX_ESF_MEAS_V0_GROUP0) + UBX_FRAME_SIZE + (UBX_ESF_MEAS_V0_FLAGS_NUMMEAS_GET(*((uint16_t *)&((uint8_t *)(msg))[UBX_HEAD_SIZE + 4])) * sizeof(UBX_ESF_MEAS_V0_GROUP1)) +
      |     (
 1020 |     UBX_ESF_MEAS_V0_FLAGS_CALIBTTAGVALID(*((uint16_t *)&((uint8_t *)(msg))[UBX_HEAD_SIZE + 4])) ? sizeof(UBX_ESF_MEAS_V0_GROUP2) : 0; }  //!< @todo documentation
      |                                                                                                 ^
      |                                                                                                )
/home/arc/robot/external/fixposition_driver/fixposition-sdk/fpsdk_common/include/fpsdk_common/parser/ubx.hpp:1020:97: note: place parentheses around the '?:' expression to evaluate it first
 1020 |     UBX_ESF_MEAS_V0_FLAGS_CALIBTTAGVALID(*((uint16_t *)&((uint8_t *)(msg))[UBX_HEAD_SIZE + 4])) ? sizeof(UBX_ESF_MEAS_V0_GROUP2) : 0; }  //!< @todo documentation
      |                                                                                                 ^                                   
      |     (                                                                                                                               )
/home/arc/robot/external/fixposition_driver/fixposition-sdk/fpsdk_common/src/parser/types.cpp:111:60: error: sizeof on pointer operation will return size of 'char *' instead of 'char[400]' [-Werror,-Wsizeof-array-decay]
  111 |                 std::snprintf(&sinfo[ix * 3], sizeof(sinfo - (ix * 3)), "%02x ", mdata[ix]);
      |                                                      ~~~~~ ^
2 errors generated.

/home/arc/robot/external/fixposition_driver/fixposition-sdk/fpsdk_common/include/fpsdk_common/ext/eigen_core.hpp:14:32: error: unknown warning group '-Wclass-memaccess', ignored [-Werror,-Wunknown-warning-option]
   14 | #pragma GCC diagnostic ignored "-Wclass-memaccess"  // NOLINT

Attempt 3: Using the latest fpsdk-common

fpsdk-common: 408dc893a

/home/ascento/arc/robot/external/fixposition_driver/fixposition-sdk/fpsdk_common/include/fpsdk_common/ext/eigen_core.hpp:14:32: error: unknown warning group '-Wclass-memaccess', ignored [-Werror,-Wunknown-warning-option]
   14 | #pragma GCC diagnostic ignored "-Wclass-memaccess"  // NOLINT

Attempt 4: Latest fpsdk-common and latest fixposition-driver (solving manually clang warnings)

fpsdk-common: 408dc893a
fixposition-driver: 9a8ea55

/home/ascento/arc/robot/external/fixposition_driver/fixposition_driver_lib/src/helper.cpp:307:19: error: no member named 'llh' in 'fpsdk::common::parser::nmea::NmeaRmcPayload'; did you mean 'll'?
  307 |     else if (rmc_.llh.latlon_valid) { llh_ = rmc_.llh; }
      |                   ^~~
      |                   ll
/etc/arc/releases/local/colcon/install/fpsdk_common/include/fpsdk_common/parser/nmea.hpp:586:13: note: 'll' declared here
  586 |     NmeaLlh ll;                                                  //!< Position (no height)
      |             ^
/home/ascento/arc/robot/external/fixposition_driver/fixposition_driver_lib/src/helper.cpp:307:51: error: no member named 'llh' in 'fpsdk::common::parser::nmea::NmeaRmcPayload'; did you mean 'll'?
  307 |     else if (rmc_.llh.latlon_valid) { llh_ = rmc_.llh; }
      |                                                   ^~~
      |                                                   ll
/etc/arc/releases/local/colcon/install/fpsdk_common/include/fpsdk_common/parser/nmea.hpp:586:13: note: 'll' declared here
  586 |     NmeaLlh ll;                                                  //!< Position (no height)
      |             ^
2 errors generated.

So, currently there is no combination that compiles for us.

I think the problem is the following:

  • There is a parsing bug that you solved in main but that is not part of any fixposition-driver/fixposition-sdk combination at the moment. This is part of sdk 53fa5b5 that is linke to by main on fixposition_driver: Fix exception in UBX-RXM-SFRBX stringification, docu fixposition-sdk#155
  • The sdk currently won't compile in any version with clang because of the unsupported warnings: Fix compilation errors #92
  • The fixposition_driver compiles agains certain functions that have a bug (wrong access on 'fpsdk::common::parser::nmea::NmeaRmcPayload') which probably clang is able to catch but gcc not.

@flipflip8952
Copy link
Contributor

flipflip8952 commented Oct 20, 2025

I haven't tried all your combinations, but for me using driver tag 8.0.2 and SDK at 4822a88 works fine (Using GCC, not clang...). There's no "ll" vs "llh" issue. I think you have another commit checked out for the SDK there

This is not SDK @ :4822a88
image

This is currently the latest supported and tested driver release (as far as I know..). Clearly, it doesn't support clang. So you'd have to use GCC if you wanted to use that.

@flipflip8952
Copy link
Contributor

Can you check if this branch works for you (using clang): https://github.com/fixposition/fixposition_driver/tree/feature/bump-sdk
This should work with the latest main of the SDK (8198450)

What's the command to "colcon build" using clang?

@flipflip8952
Copy link
Contributor

I have merged #93, i.e. main should now work with (today's) main of the fixposition-sdk repo.

This is for GCC and only the changes that were required to update for the changes in the SDK (talker_ vs talker, ll vs llh).

The fixes for clang (that missing "%s") as well as some CI for clang is coming here: #94

@flipflip8952
Copy link
Contributor

flipflip8952 commented Oct 20, 2025

OK, I merged this: #94
So now fixposition_driver should compile with latest fixposition-sdk, also with clang.

Note that none of this is thoroughly tested. The latest fully tested and known-working version still is tag 8.0.4 (with corresponding commit of the fixposition-sdk).

I'm closing this PR as all the changes are now in main by means of #93 and #94.

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.

2 participants