Conversation
| RegistrationID registerValue(const std::string& name, const std::array<T, N>* value); | ||
|
|
||
| #if DATA_TAMER_EIGEN_SUPPORT | ||
| RegistrationID registerValue(const std::string& prefix, const Eigen::VectorXd* value); |
There was a problem hiding this comment.
Hi @PepMS, how are you doing?
Thank you very much for this PR, it's really helpful.
I have my 2 cents comment on this work.
I would believe that using the ground rules for Eigen for passing Eigen object into functions would be beneficial here.
Either using templates or Eigen::Ref.
See: https://libeigen.gitlab.io/eigen/docs-5.0/TopicFunctionTakingEigenTypes.html
My comment applies for the full PR.
There was a problem hiding this comment.
@PepMS any plans on continuing this PR?
There was a problem hiding this comment.
@MaximilienNaveau yes, indeed. Sorry for not having done this before. I'll try to allocate some time to continue that during this week.
|
I just pushed my changes @MaximilienNaveau. Here's a recap
This PR has been developed with the support of Claude. |
MaximilienNaveau
left a comment
There was a problem hiding this comment.
Some packaging issue at first glance,
@henrygerardmoore as you are targeted as the main reviewer, could you start the CI so we see the sanity?
| ValuePtr() = default; | ||
|
|
||
| template <typename T, bool = true> | ||
| template <typename T, std::enable_if_t<!IsEigenType<T>, bool> = true> |
There was a problem hiding this comment.
is IsEigenType<> defined is the Eigen include is not loaded?
There was a problem hiding this comment.
IsEigenType<> evaluates to true whenever the type T is an object from the Eigen library. Otherwise is false.
If Eigen is not included IsEigenType defaults to false.
There was a problem hiding this comment.
I missed it!
Sorry for that!!
| endif() | ||
| endif() | ||
|
|
||
| option(DATA_TAMER_EIGEN_SUPPORT "Enable Eigen support" ON) |
There was a problem hiding this comment.
Good job but see below the option to mcap make the package.xml needing the mcap_vendor as well as a dependency.
Hence you need to add Eigen to the package.xml as well. And you need to update the conanfile.py as well to declare eigen3 there as well. Pick the version of Eigen that is default on the lowest version of the OS. i.e. ros2 humble meaning Ubunut22.04. I will let you find the proper Eigen version for this.
| endif() | ||
|
|
||
| option(DATA_TAMER_EIGEN_SUPPORT "Enable Eigen support" ON) | ||
| if (DATA_TAMER_EIGEN_SUPPORT) |
There was a problem hiding this comment.
An additional comment here, we would need a CI that build with/without the different options.
Maybe it's a bit brute force and you actually set the option to ON by default so I guess it's ok, but did you try to build with the option OFF on a fresh build?
As discussed in #66 , this PR adds the possibility to log Eigen::VectorXd objects.
Adding Eigen compatibility is configurable through cmake variables and the use of preprocessor directives inside the code.